Go to the documentation of this file.
7 #ifndef INCLUDE_JET_VERTEX_CENTERED_SCALAR_GRID3_H_
8 #define INCLUDE_JET_VERTEX_CENTERED_SCALAR_GRID3_H_
39 double gridSpacingX = 1.0,
40 double gridSpacingY = 1.0,
41 double gridSpacingZ = 1.0,
45 double initialValue = 0.0);
53 double initialValue = 0.0);
67 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_VERTEX_CENTERED_SCALAR_GRID3_H_
std::shared_ptr< VertexCenteredScalarGrid3 > VertexCenteredScalarGrid3Ptr
Shared pointer for the VertexCenteredScalarGrid3 type.
Definition: vertex_centered_scalar_grid3.h:89
VertexCenteredScalarGrid3(const VertexCenteredScalarGrid3 &other)
Copy constructor.
VertexCenteredScalarGrid3(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)
Builder & withResolution(size_t resolutionX, size_t resolutionY, size_t resolutionZ)
Returns builder with resolution.
Abstract base class for 3-D cartesian grid structure.
Definition: grid3.h:30
Builder & withOrigin(double gridOriginX, double gridOriginY, double gridOriginZ)
Returns builder with grid origin.
std::shared_ptr< ScalarGrid3 > clone() const override
Returns the copy of the grid instance.
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
static Builder builder()
Returns builder fox VertexCenteredScalarGrid3.
Builder & withResolution(const Size3 &resolution)
Returns builder with resolution.
Size3 dataSize() const override
Returns the actual data point size.
A grid builder class that returns 3-D vertex-centered scalar grid.
Definition: vertex_centered_scalar_grid3.h:93
Definition: advection_solver2.h:18
Builder & withOrigin(const Vector3D &gridOrigin)
Returns builder with grid origin.
VertexCenteredScalarGrid3 build() const
Builds VertexCenteredScalarGrid3 instance.
const Vector3D & origin() const
Returns the grid origin.
const Size3 & resolution() const
Returns the grid resolution.
void set(const VertexCenteredScalarGrid3 &other)
Sets the contents with the given other grid.
const Vector3D & gridSpacing() const
Returns the grid spacing.
3-D size class.
Definition: size3.h:19
VertexCenteredScalarGrid3(const Size3 &resolution, const Vector3D &gridSpacing=Vector3D(1.0, 1.0, 1.0), const Vector3D &origin=Vector3D(), double initialValue=0.0)
void swap(Grid3 *other) override
Swaps the contents with the given other grid.
VertexCenteredScalarGrid3Ptr makeShared() const
Builds shared pointer of VertexCenteredScalarGrid3 instance.
Builder & withGridSpacing(const Vector3D &gridSpacing)
Returns builder with grid spacing.
3-D Vertex-centered scalar grid structure.
Definition: vertex_centered_scalar_grid3.h:24
Builder & withInitialValue(double initialVal)
Returns builder with initial value.
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
Builder & withGridSpacing(double gridSpacingX, double gridSpacingY, double gridSpacingZ)
Returns builder with grid spacing.
3-D vector class.
Definition: vector3.h:25
Vector3D dataOrigin() const override
ScalarGrid3Ptr build(const Size3 &resolution, const Vector3D &gridSpacing, const Vector3D &gridOrigin, double initialVal) const override
Builds shared pointer of VertexCenteredScalarGrid3 instance.
#define JET_GRID3_TYPE_NAME(DerivedClassName)
Definition: grid3.h:119
VertexCenteredScalarGrid3()
Constructs zero-sized grid.
VertexCenteredScalarGrid3 & operator=(const VertexCenteredScalarGrid3 &other)
Sets the contents with the given other grid.