Go to the documentation of this file.
7 #ifndef INCLUDE_JET_CELL_CENTERED_SCALAR_GRID3_H_
8 #define INCLUDE_JET_CELL_CENTERED_SCALAR_GRID3_H_
38 double gridSpacingX = 1.0,
39 double gridSpacingY = 1.0,
40 double gridSpacingZ = 1.0,
44 double initialValue = 0.0);
52 double initialValue = 0.0);
66 std::shared_ptr<ScalarGrid3>
clone()
const override;
100 size_t resolutionX,
size_t resolutionY,
size_t resolutionZ);
107 double gridSpacingX,
double gridSpacingY,
double gridSpacingZ);
114 double gridOriginX,
double gridOriginY,
double gridOriginZ);
134 double initialVal)
const override;
137 Size3 _resolution{1, 1, 1};
140 double _initialVal = 0.0;
145 #endif // INCLUDE_JET_CELL_CENTERED_SCALAR_GRID3_H_
Builder & withResolution(size_t resolutionX, size_t resolutionY, size_t resolutionZ)
Returns builder with resolution.
Size3 dataSize() const override
Returns the actual data point size.
Abstract base class for 3-D cartesian grid structure.
Definition: grid3.h:30
CellCenteredScalarGrid3 & operator=(const CellCenteredScalarGrid3 &other)
Sets the contents with the given other grid.
std::shared_ptr< CellCenteredScalarGrid3 > CellCenteredScalarGrid3Ptr
Shared pointer for the CellCenteredScalarGrid3 type.
Definition: cell_centered_scalar_grid3.h:87
std::shared_ptr< ScalarGrid3 > ScalarGrid3Ptr
Shared pointer for the ScalarGrid3 type.
Definition: scalar_grid3.h:193
Abstract base class for 3-D scalar grid builder.
Definition: scalar_grid3.h:196
Builder & withGridSpacing(double gridSpacingX, double gridSpacingY, double gridSpacingZ)
Returns builder with grid spacing.
Definition: advection_solver2.h:18
Builder & withResolution(const Size3 &resolution)
Returns builder with resolution.
const Vector3D & origin() const
Returns the grid origin.
const Size3 & resolution() const
Returns the grid resolution.
CellCenteredScalarGrid3()
Constructs zero-sized grid.
Builder & withOrigin(double gridOriginX, double gridOriginY, double gridOriginZ)
Returns builder with grid origin.
void swap(Grid3 *other) override
Swaps the contents with the given other grid.
static Builder builder()
Returns builder fox CellCenteredScalarGrid3.
Builder & withInitialValue(double initialVal)
Returns builder with initial value.
const Vector3D & gridSpacing() const
Returns the grid spacing.
Front-end to create CellCenteredScalarGrid3 objects step by step.
Definition: cell_centered_scalar_grid3.h:93
3-D size class.
Definition: size3.h:19
CellCenteredScalarGrid3(const Size3 &resolution, const Vector3D &gridSpacing=Vector3D(1.0, 1.0, 1.0), const Vector3D &origin=Vector3D(), double initialValue=0.0)
ScalarGrid3Ptr build(const Size3 &resolution, const Vector3D &gridSpacing, const Vector3D &gridOrigin, double initialVal) const override
Builds shared pointer of CellCenteredScalarGrid3 instance.
Abstract base class for 3-D scalar grid structure.
Definition: scalar_grid3.h:21
Vector3< double > Vector3D
Double-type 3D vector.
Definition: vector3.h:349
std::shared_ptr< ScalarGrid3 > clone() const override
Returns the copy of the grid instance.
CellCenteredScalarGrid3(const CellCenteredScalarGrid3 &other)
Copy constructor.
3-D vector class.
Definition: vector3.h:25
Builder & withGridSpacing(const Vector3D &gridSpacing)
Returns builder with grid spacing.
Vector3D dataOrigin() const override
CellCenteredScalarGrid3(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 initialValue=0.0)
CellCenteredScalarGrid3 build() const
Builds CellCenteredScalarGrid3 instance.
#define JET_GRID3_TYPE_NAME(DerivedClassName)
Definition: grid3.h:119
3-D Cell-centered scalar grid structure.
Definition: cell_centered_scalar_grid3.h:23
void set(const CellCenteredScalarGrid3 &other)
Sets the contents with the given other grid.
CellCenteredScalarGrid3Ptr makeShared() const
Builds shared pointer of CellCenteredScalarGrid3 instance.
Builder & withOrigin(const Vector3D &gridOrigin)
Returns builder with grid origin.