Loading...
Searching...
No Matches
GridSystemData.hpp
Go to the documentation of this file.
size_t AddScalarData(const std::shared_ptr< ScalarGridBuilder< N > > &builder, double initialVal=0.0)
Adds a non-advectable scalar data grid by passing its builder and initial value.
size_t AddAdvectableScalarData(const std::shared_ptr< ScalarGridBuilder< N > > &builder, double initialVal=0.0)
Adds an advectable scalar data grid by passing its builder and initial value.
GridSystemData(const GridSystemData &other)
Copy constructor.
void Serialize(std::vector< uint8_t > *buffer) const override
Serialize the data to the given buffer.
size_t AddAdvectableVectorData(const std::shared_ptr< VectorGridBuilder< N > > &builder, const Vector< double, N > &initialVal=Vector< double, N >{})
Adds an advectable vector data grid by passing its builder and initial value.
GridSystemData & operator=(GridSystemData &&other) noexcept
Move assignment operator.
void Deserialize(const std::vector< uint8_t > &buffer) override
Serialize the data from the given buffer.
size_t NumberOfAdvectableVectorData() const
Returns the number of advectable vector data.
size_t NumberOfAdvectableScalarData() const
Returns the number of advectable scalar data.
size_t VelocityIndex() const
Returns the index of the velocity field.
void Resize(const Vector< size_t, N > &resolution, const Vector< double, N > &gridSpacing, const Vector< double, N > &origin)
Resizes the whole system with given resolution, grid spacing, and origin.
size_t AddVectorData(const std::shared_ptr< VectorGridBuilder< N > > &builder, const Vector< double, N > &initialVal=Vector< double, N >{})
Adds a non-advectable vector data grid by passing its builder and initial value.
Vector< size_t, N > Resolution() const
Returns the resolution of the grid.
Vector< double, N > GridSpacing() const
Return the grid spacing.
const std::shared_ptr< VectorGrid< N > > & AdvectableVectorDataAt(size_t idx) const
Returns the advectable vector data at given index.
size_t NumberOfVectorData() const
Returns the number of non-advectable vector data.
GridSystemData(const Vector< size_t, N > &resolution, const Vector< double, N > &gridSpacing, const Vector< double, N > &origin)
Constructs a grid system with given resolution, grid spacing and origin.
GridSystemData & operator=(const GridSystemData &other)
Copy assignment operator.
BoundingBox< double, N > GetBoundingBox() const
Returns the bounding box of the grid.
GridSystemData(GridSystemData &&other) noexcept
Move constructor.
const std::shared_ptr< VectorGrid< N > > & VectorDataAt(size_t idx) const
Returns the non-advectable vector data at given index.
const std::shared_ptr< FaceCenteredGrid< N > > & Velocity() const
Returns the velocity field.
size_t NumberOfScalarData() const
Returns the number of non-advectable scalar data.
~GridSystemData() override=default
Default virtual destructor.
const std::shared_ptr< ScalarGrid< N > > & ScalarDataAt(size_t idx) const
Returns the non-advectable scalar data at given index.
const std::shared_ptr< ScalarGrid< N > > & AdvectableScalarDataAt(size_t idx) const
Returns the advectable scalar data at given index.
Definition Matrix.hpp:30
Abstract base class for any serializable class.
Definition Serialization.hpp:22
Definition pybind11Utils.hpp:21
std::shared_ptr< GridSystemData2 > GridSystemData2Ptr
Shared pointer type of GridSystemData2.
Definition GridSystemData.hpp:273
std::shared_ptr< GridSystemData3 > GridSystemData3Ptr
Shared pointer type of GridSystemData3.
Definition GridSystemData.hpp:276
1.9.8