|
| | VertexCenteredScalarGrid ()=default |
| | Constructs zero-sized grid.
|
| |
| | VertexCenteredScalarGrid (const Vector< size_t, N > &resolution, const Vector< double, N > &gridSpacing=Vector< double, N >::MakeConstant(1), const Vector< double, N > &origin=Vector< double, N >{}, double initialValue=0.0) |
| |
| | ~VertexCenteredScalarGrid () override=default |
| | Default virtual destructor.
|
| |
| | VertexCenteredScalarGrid (const VertexCenteredScalarGrid &other) |
| | Copy constructor.
|
| |
| | VertexCenteredScalarGrid (VertexCenteredScalarGrid &&other) noexcept |
| | Move constructor.
|
| |
| VertexCenteredScalarGrid< N > & | operator= (const VertexCenteredScalarGrid &other) |
| | Copy assignment operator.
|
| |
| VertexCenteredScalarGrid< N > & | operator= (VertexCenteredScalarGrid &&other) noexcept |
| | Move assignment operator.
|
| |
| Vector< size_t, N > | DataSize () const override |
| | Returns the actual data point size.
|
| |
| Vector< double, N > | DataOrigin () const override |
| |
| std::shared_ptr< ScalarGrid< N > > | Clone () const override |
| | Returns the copy of the grid instance.
|
| |
| void | Swap (Grid< N > *other) override |
| | Swaps the contents with the given other grid.
|
| |
| void | Set (const VertexCenteredScalarGrid< N > &other) |
| | Sets the contents with the given other grid.
|
| |
| | ScalarGrid () |
| | Constructs an empty grid.
|
| |
| | ~ScalarGrid () override=default |
| | Default virtual destructor.
|
| |
| | ScalarGrid (const ScalarGrid &other) |
| | Copy constructor.
|
| |
| | ScalarGrid (ScalarGrid &&other) noexcept |
| | Move constructor.
|
| |
| ScalarGrid & | operator= (const ScalarGrid &other) |
| | Copy assignment operator.
|
| |
| ScalarGrid & | operator= (ScalarGrid &&other) noexcept |
| | Move assignment operator.
|
| |
| void | Clear () |
| | Clears the contents of the grid.
|
| |
| void | Resize (const Vector< size_t, N > &resolution, const Vector< double, N > &gridSpacing=Vector< double, N >::MakeConstant(1), const Vector< double, N > &origin=Vector< double, N >{}, double initialValue=0.0) |
| | Resizes the grid using given parameters.
|
| |
| void | Resize (const Vector< double, N > &gridSpacing, const Vector< double, N > &origin) |
| | Resizes the grid using given parameters.
|
| |
| const double & | operator() (const Vector< size_t, N > &idx) const |
| | Returns the grid data at given data point.
|
| |
| double & | operator() (const Vector< size_t, N > &idx) |
| | Returns the grid data at given data point.
|
| |
| template<typename... Indices> |
| const double & | operator() (size_t i, Indices... indices) const |
| | Returns the grid data at given data point.
|
| |
| template<typename... Indices> |
| double & | operator() (size_t i, Indices... indices) |
| | Returns the grid data at given data point.
|
| |
| Vector< double, N > | GradientAtDataPoint (const Vector< size_t, N > &idx) const |
| | Returns the gradient vector at given data point.
|
| |
| template<typename... Indices> |
| Vector< double, N > | GradientAtDataPoint (size_t i, Indices... indices) const |
| | Returns the gradient vector at given data point.
|
| |
| double | LaplacianAtDataPoint (const Vector< size_t, N > &idx) const |
| | Returns the Laplacian at given data point.
|
| |
| template<typename... Indices> |
| double | LaplacianAtDataPoint (size_t i, Indices... indices) const |
| | Returns the Laplacian at given data point.
|
| |
| ScalarDataView | DataView () |
| | Returns the read-write data array accessor.
|
| |
| ConstScalarDataView | DataView () const |
| | Returns the read-only data array accessor.
|
| |
| GridDataPositionFunc< N > | DataPosition () const |
| | Returns the function that maps data point to its position.
|
| |
| void | Fill (double value, ExecutionPolicy policy=ExecutionPolicy::Parallel) |
| | Fills the grid with given value.
|
| |
| void | Fill (const std::function< double(const Vector< double, N > &)> &func, ExecutionPolicy policy=ExecutionPolicy::Parallel) |
| | Fills the grid with given position-to-value mapping function.
|
| |
| void | ForEachDataPointIndex (const std::function< void(const Vector< size_t, N > &)> &func) const |
| | Invokes the given function func for each data point.
|
| |
| template<size_t M = N> |
| std::enable_if_t< M==2, void > | ForEachDataPointIndex (const std::function< void(size_t, size_t)> &func) const |
| |
| template<size_t M = N> |
| std::enable_if_t< M==3, void > | ForEachDataPointIndex (const std::function< void(size_t, size_t, size_t)> &func) const |
| |
| void | ParallelForEachDataPointIndex (const std::function< void(const Vector< size_t, N > &)> &func) const |
| | Invokes the given function func for each data point in parallel.
|
| |
| template<size_t M = N> |
| std::enable_if_t< M==2, void > | ParallelForEachDataPointIndex (const std::function< void(size_t, size_t)> &func) const |
| |
| template<size_t M = N> |
| std::enable_if_t< M==3, void > | ParallelForEachDataPointIndex (const std::function< void(size_t, size_t, size_t)> &func) const |
| |
| double | Sample (const Vector< double, N > &x) const override |
| | Returns the sampled value at given position x.
|
| |
| std::function< double(const Vector< double, N > &)> | Sampler () const override |
| | Returns the sampler function.
|
| |
| Vector< double, N > | Gradient (const Vector< double, N > &x) const override |
| | Returns the gradient vector at given position x.
|
| |
| double | Laplacian (const Vector< double, N > &x) const override |
| | Returns the Laplacian at given position x.
|
| |
| void | Serialize (std::vector< uint8_t > *buffer) const override |
| | Serializes the grid instance to the output buffer.
|
| |
| void | Deserialize (const std::vector< uint8_t > &buffer) override |
| | Deserializes the input buffer to the grid instance.
|
| |
| | ScalarField ()=default |
| | Default constructor.
|
| |
| | ~ScalarField () override=default |
| | Default destructor.
|
| |
| | ScalarField (const ScalarField &)=default |
| | Default copy constructor.
|
| |
| | ScalarField (ScalarField &&) noexcept=default |
| | Default move constructor.
|
| |
| ScalarField & | operator= (const ScalarField &)=default |
| | Default copy assignment operator.
|
| |
| ScalarField & | operator= (ScalarField &&) noexcept=default |
| | Default move assignment operator.
|
| |
| | Field ()=default |
| | Default constructor.
|
| |
| virtual | ~Field ()=default |
| | Default virtual destructor.
|
| |
| | Field (const Field &)=default |
| | Default copy constructor.
|
| |
| | Field (Field &&) noexcept=default |
| | Default move constructor.
|
| |
| Field & | operator= (const Field &)=default |
| | Default copy assignment operator.
|
| |
| Field & | operator= (Field &&) noexcept=default |
| | Default move assignment operator.
|
| |
| | Grid ()=default |
| | Constructs an empty grid.
|
| |
| | ~Grid () override=default |
| | Default virtual destructor.
|
| |
| | Grid (const Grid &other) |
| | Copy constructor.
|
| |
| | Grid (Grid &&other) noexcept |
| | Move constructor.
|
| |
| Grid & | operator= (const Grid &other) |
| | Copy assignment operator.
|
| |
| Grid & | operator= (Grid &&other) noexcept |
| | Move assignment operator.
|
| |
| virtual std::string | TypeName () const =0 |
| | Returns the type name of derived grid.
|
| |
| const Vector< size_t, N > & | Resolution () const |
| | Returns the grid resolution.
|
| |
| const Vector< double, N > & | Origin () const |
| | Returns the grid origin.
|
| |
| const Vector< double, N > & | GridSpacing () const |
| | Returns the grid spacing.
|
| |
| const BoundingBox< double, N > & | GetBoundingBox () const |
| | Returns the bounding box of the grid.
|
| |
| GridDataPositionFunc< N > | CellCenterPosition () const |
| | Returns the function that maps grid index to the cell-center position.
|
| |
| void | ForEachCellIndex (const std::function< void(const Vector< size_t, N > &)> &func) const |
| | Invokes the given function func for each grid cell.
|
| |
| template<size_t M = N> |
| std::enable_if_t< M==2, void > | ForEachCellIndex (const std::function< void(size_t, size_t)> &func) const |
| |
| template<size_t M = N> |
| std::enable_if_t< M==3, void > | ForEachCellIndex (const std::function< void(size_t, size_t, size_t)> &func) const |
| |
| void | ParallelForEachCellIndex (const std::function< void(const Vector< size_t, N > &)> &func) const |
| | Invokes the given function func for each grid cell in parallel.
|
| |
| template<size_t M = N> |
| std::enable_if_t< M==2, void > | ParallelForEachCellIndex (const std::function< void(size_t, size_t)> &func) const |
| |
| template<size_t M = N> |
| std::enable_if_t< M==3, void > | ParallelForEachCellIndex (const std::function< void(size_t, size_t, size_t)> &func) const |
| |
| bool | HasSameShape (const Grid &other) const |
| | Returns true if resolution, grid-spacing and origin are same.
|
| |
| | Serializable ()=default |
| | Default constructor.
|
| |
| | Serializable (const Serializable &)=default |
| | Default copy constructor.
|
| |
| | Serializable (Serializable &&) noexcept=default |
| | Default move constructor.
|
| |
| virtual | ~Serializable ()=default |
| | Default virtual destructor.
|
| |
| Serializable & | operator= (const Serializable &)=default |
| | Default copy assignment operator.
|
| |
| Serializable & | operator= (Serializable &&) noexcept=default |
| | Default move assignment operator.
|
| |
template<
size_t N>
class CubbyFlow::VertexCenteredScalarGrid< N >
N-D Vertex-centered scalar grid structure.
This class represents N-D vertex-centered scalar grid which extends ScalarGrid. As its name suggests, the class defines the data point at the grid vertices (corners). Thus, A x B x ... grid resolution will have (A+1) x (B+1) x ... data points.