Loading...
Searching...
No Matches
VectorGrid.hpp
Go to the documentation of this file.
virtual void SetData(const ConstArrayView1< double > &data)=0
Sets the data from a continuous linear array.
void SetSizeParameters(const Vector< size_t, N > &resolution, const Vector< double, N > &gridSpacing, const Vector< double, N > &origin)
const Vector< size_t, N > & Resolution() const
Returns the grid resolution.
const Vector< double, N > & GridSpacing() const
Returns the grid spacing.
virtual void GetData(Array1< double > &data) const =0
Fetches the data into a continuous linear array.
Definition Matrix.hpp:30
Abstract base class for N-D vector grid builder.
Definition VectorGrid.hpp:118
virtual std::shared_ptr< VectorGrid< N > > Build(const Vector< size_t, N > &resolution, const Vector< double, N > &gridSpacing, const Vector< double, N > &gridOrigin, const Vector< double, N > &initialVal) const =0
Returns N-D vector grid with given parameters.
VectorGridBuilder & operator=(VectorGridBuilder &&other) noexcept=delete
Deleted move assignment operator.
virtual ~VectorGridBuilder()=default
Default virtual destructor.
VectorGridBuilder(const VectorGridBuilder &other)=delete
Deleted copy constructor.
VectorGridBuilder & operator=(const VectorGridBuilder &other)=delete
Deleted copy assignment operator.
VectorGridBuilder(VectorGridBuilder &&other) noexcept=delete
Deleted move constructor.
VectorGrid & operator=(const VectorGrid &other)
Copy assignment operator.
virtual std::shared_ptr< VectorGrid< N > > Clone() const =0
Returns the copy of the grid instance.
virtual void OnResize(const Vector< size_t, N > &resolution, const Vector< double, N > &gridSpacing, const Vector< double, N > &origin, const Vector< double, N > &initialValue)=0
Invoked when the resizing happens.
void Resize(const Vector< double, N > &gridSpacing, const Vector< double, N > &origin)
Resizes the grid using given parameters.
void Resize(const Vector< size_t, N > &resolution, const Vector< double, N > &gridSpacing=Vector< double, N >::MakeConstant(1.0), const Vector< double, N > &origin=Vector< double, N >{}, const Vector< double, N > &initialValue=Vector< double, N >{})
Resizes the grid using given parameters.
virtual void Fill(const Vector< double, N > &value, ExecutionPolicy policy=ExecutionPolicy::Parallel)=0
Fills the grid with given value.
virtual void Fill(const std::function< Vector< double, N >(const Vector< double, N > &)> &func, ExecutionPolicy policy=ExecutionPolicy::Parallel)=0
Fills the grid with given position-to-value mapping function.
void Deserialize(const std::vector< uint8_t > &buffer) override
Deserializes the input buffer to the grid instance.
VectorGrid & operator=(VectorGrid &&other) noexcept
Move assignment operator.
void Serialize(std::vector< uint8_t > *buffer) const override
Serializes the grid instance to the output buffer.
Definition pybind11Utils.hpp:21
std::shared_ptr< VectorGrid3 > VectorGrid3Ptr
Shared pointer for the VectorGrid3 type.
Definition VectorGrid.hpp:113
std::shared_ptr< VectorGridBuilder2 > VectorGridBuilder2Ptr
Shared pointer for the VectorGridBuilder2 type.
Definition VectorGrid.hpp:153
std::shared_ptr< VectorGridBuilder3 > VectorGridBuilder3Ptr
Shared pointer for the VectorGridBuilder3 type.
Definition VectorGrid.hpp:156
std::shared_ptr< VectorGrid2 > VectorGrid2Ptr
Shared pointer for the VectorGrid2 type.
Definition VectorGrid.hpp:110
@ Parallel
1.9.8