Go to the documentation of this file.
7 #ifndef INCLUDE_JET_CELL_CENTERED_VECTOR_GRID3_H_
8 #define INCLUDE_JET_CELL_CENTERED_VECTOR_GRID3_H_
40 double gridSpacingX = 1.0,
41 double gridSpacingY = 1.0,
42 double gridSpacingZ = 1.0,
46 double initialValueU = 0.0,
47 double initialValueV = 0.0,
48 double initialValueW = 0.0);
70 std::shared_ptr<VectorGrid3>
clone()
const override;
112 size_t resolutionX,
size_t resolutionY,
size_t resolutionZ);
119 double gridSpacingX,
double gridSpacingY,
double gridSpacingZ);
126 double gridOriginX,
double gridOriginY,
double gridOriginZ);
133 double initialValX,
double initialValY,
double initialValZ);
150 const Vector3D& initialVal)
const override;
153 Size3 _resolution{1, 1, 1};
161 #endif // INCLUDE_JET_CELL_CENTERED_VECTOR_GRID3_H_
ExecutionPolicy
Execution policy tag.
Definition: parallel.h:13
std::shared_ptr< VectorGrid3 > VectorGrid3Ptr
Shared pointer for the VectorGrid3 type.
Definition: vector_grid3.h:103
Abstract base class for 3-D cartesian grid structure.
Definition: grid3.h:30
Front-end to create CellCenteredScalarGrid3 objects step by step.
Definition: cell_centered_vector_grid3.h:105
VectorGrid3Ptr build(const Size3 &resolution, const Vector3D &gridSpacing, const Vector3D &gridOrigin, const Vector3D &initialVal) const override
Builds shared pointer of CellCenteredVectorGrid3 instance.
CellCenteredVectorGrid3 build() const
Builds CellCenteredScalarGrid3 instance.
std::shared_ptr< VectorGrid3 > clone() const override
Returns the copy of the grid instance.
Builder & withGridSpacing(double gridSpacingX, double gridSpacingY, double gridSpacingZ)
Returns builder with grid spacing.
Abstract base class for 3-D collocated vector grid structure.
Definition: collocated_vector_grid3.h:18
Vector3D dataOrigin() const override
CellCenteredVectorGrid3(const CellCenteredVectorGrid3 &other)
Copy constructor.
CellCenteredVectorGrid3Ptr makeShared() const
Builds shared pointer of CellCenteredVectorGrid3 instance.
Definition: advection_solver2.h:18
CellCenteredVectorGrid3()
Constructs zero-sized grid.
const Vector3D & origin() const
Returns the grid origin.
const Size3 & resolution() const
Returns the grid resolution.
CellCenteredVectorGrid3 & operator=(const CellCenteredVectorGrid3 &other)
Sets the contents with the given other grid.
Builder & withInitialValue(const Vector3D &initialVal)
Returns builder with initial value.
std::shared_ptr< CellCenteredVectorGrid3 > CellCenteredVectorGrid3Ptr
Shared pointer for the CellCenteredVectorGrid3 type.
Definition: cell_centered_vector_grid3.h:99
Size3 dataSize() const override
Returns the actual data point size.
Abstract base class for 3-D vector grid builder.
Definition: vector_grid3.h:106
const Vector3D & gridSpacing() const
Returns the grid spacing.
Builder & withGridSpacing(const Vector3D &gridSpacing)
Returns builder with grid spacing.
void fill(const std::function< Vector3D(const Vector3D &)> &func, ExecutionPolicy policy=ExecutionPolicy::kParallel) override
Fills the grid with given function.
Builder & withResolution(const Size3 &resolution)
Returns builder with resolution.
3-D size class.
Definition: size3.h:19
Builder & withOrigin(const Vector3D &gridOrigin)
Returns builder with grid origin.
Vector3< double > Vector3D
Double-type 3D vector.
Definition: vector3.h:349
3-D vector class.
Definition: vector3.h:25
void swap(Grid3 *other) override
Swaps the contents with the given other grid.
Builder & withOrigin(double gridOriginX, double gridOriginY, double gridOriginZ)
Returns builder with grid origin.
static Builder builder()
Returns builder fox CellCenteredVectorGrid3.
void fill(const Vector3D &value, ExecutionPolicy policy=ExecutionPolicy::kParallel) override
Fills the grid with given value.
3-D Cell-centered vector grid structure.
Definition: cell_centered_vector_grid3.h:25
Builder & withResolution(size_t resolutionX, size_t resolutionY, size_t resolutionZ)
Returns builder with resolution.
CellCenteredVectorGrid3(size_t resolutionX, size_t resolutionY, size_t resolutionZ, double gridSpacingX=1.0, double gridSpacingY=1.0, double gridSpacingZ=1.0, double originX=0.0, double originY=0.0, double originZ=0.0, double initialValueU=0.0, double initialValueV=0.0, double initialValueW=0.0)
#define JET_GRID3_TYPE_NAME(DerivedClassName)
Definition: grid3.h:119
Builder & withInitialValue(double initialValX, double initialValY, double initialValZ)
Returns builder with initial value.
void set(const CellCenteredVectorGrid3 &other)
Sets the contents with the given other grid.
CellCenteredVectorGrid3(const Size3 &resolution, const Vector3D &gridSpacing=Vector3D(1.0, 1.0, 1.0), const Vector3D &origin=Vector3D(), const Vector3D &initialValue=Vector3D())