30 class Volume :
public std::enable_shared_from_this<Volume> {
49 Volume(
const std::vector<std::string>& variableNames,
50 alsfvm::shared_ptr<memory::MemoryFactory> memoryFactory,
51 size_t nx,
size_t ny,
size_t nz,
58 Volume(
Volume& volume,
const std::vector<size_t>& components,
59 const std::vector<std::string>& variableNames);
85 virtual alsfvm::shared_ptr<memory::Memory<real> >&
95 virtual alsfvm::shared_ptr<const memory::Memory<real> >
105 virtual alsfvm::shared_ptr<memory::Memory<real> >&
115 virtual alsfvm::shared_ptr<const memory::Memory<real> >
125 virtual alsfvm::shared_ptr<const memory::Memory<real> >
138 virtual alsfvm::shared_ptr<memory::Memory<real> >
180 virtual std::string
getName(
size_t index)
const;
254 size_t outputSize)
const;
320 std::shared_ptr<volume::Volume>
makeInstance(
size_t nx,
size_t ny,
size_t nz,
321 const std::string& platform =
"default")
const;
328 bool hasVariable(
const std::string& variableName)
const;
331 const std::vector<std::string> variableNames;
332 alsfvm::shared_ptr<memory::MemoryFactory> memoryFactory;
333 std::vector<alsfvm::shared_ptr<memory::Memory<real> > >
340 size_t numberOfXGhostCells;
341 size_t numberOfYGhostCells;
342 size_t numberOfZGhostCells;
virtual void setVolume(const volume::Volume &other)
setVolume sets the contents of this volume to the contenst of the other volume
Definition: Volume.cpp:307
virtual size_t getIndexFromName(const std::string &name) const
getIndexFromName returns the given index from the name
Definition: Volume.cpp:151
Volume(const std::vector< std::string > &variableNames, alsfvm::shared_ptr< memory::MemoryFactory > memoryFactory, size_t nx, size_t ny, size_t nz, size_t numberOfGhostCells=0)
Volume creates a new volume object.
Definition: Volume.cpp:44
virtual void addPower(const Volume &other, real power)
Definition: Volume.cpp:378
std::shared_ptr< volume::Volume > getCopyOnCPU()
Definition: Volume.cpp:424
virtual void copyInternalCells(size_t memoryAreaIndex, real *output, size_t outputSize) const
Definition: Volume.cpp:219
virtual size_t getNumberOfYCells() const
Definition: Volume.cpp:208
virtual alsfvm::shared_ptr< memory::Memory< real > > & getScalarMemoryArea(size_t index)
getScalarMemoryArea gets the scalar memory area (real)
Definition: Volume.cpp:107
The Volume class represents a volume (a collection of cells with values for each cell (eg...
Definition: Volume.hpp:30
virtual size_t getNumberOfVariables() const
getNumberOfVariables gets the number of variables used
Definition: Volume.cpp:83
virtual ivec3 getSize() const
Returns the size in each dimension.
Definition: Volume.cpp:87
virtual size_t getTotalNumberOfYCells() const
Definition: Volume.cpp:268
virtual void copyTo(volume::Volume &other) const
Definition: Volume.cpp:292
double real
Definition: types.hpp:65
virtual ~Volume()
Definition: Volume.cpp:79
virtual size_t getTotalNumberOfZCells() const
Definition: Volume.cpp:275
virtual size_t getNumberOfZCells() const
Definition: Volume.cpp:215
Definition: Memory.hpp:28
std::shared_ptr< volume::Volume > makeInstance() const
Makes a volume with the same memory areas and the same sizes.
Definition: Volume.cpp:402
virtual size_t getNumberOfXGhostCells() const
Definition: Volume.cpp:238
alsfvm::shared_ptr< Volume > VolumePointer
Definition: Volume.hpp:345
std::string name
Definition: EquationParameterFactory.cpp:39
virtual size_t getNumberOfZGhostCells() const
Definition: Volume.cpp:254
virtual ivec3 getTotalDimensions() const
Definition: Volume.cpp:372
virtual Volume & operator*=(real scalar)
Definition: Volume.cpp:190
virtual size_t getNumberOfYGhostCells() const
Definition: Volume.cpp:246
virtual size_t getNumberOfXCells() const
Definition: Volume.cpp:201
size_t numberOfGhostCells
Definition: VolumeFactory.cpp:90
virtual size_t getDimensions() const
Gets the number of space dimensions.
Definition: Volume.cpp:279
virtual std::string getName(size_t index) const
Definition: Volume.cpp:170
virtual ivec3 getNumberOfGhostCells() const
Returns the number of ghostcells in each dimension.
Definition: Volume.cpp:96
Various utility functions to implement the tecno flux.
Definition: types.hpp:30
virtual Volume & operator+=(const Volume &other)
Definition: Volume.cpp:178
virtual ivec3 getInnerSize() const
Gets the size without ghost cells in each dimension.
Definition: Volume.cpp:92
virtual size_t getTotalNumberOfXCells() const
Definition: Volume.cpp:261
void addLinearCombination(real a1, real a2, const Volume &v2, real a3, const Volume &v3, real a4, const Volume &v4, real a5, const Volume &v5)
Definition: Volume.cpp:359
virtual alsfvm::shared_ptr< const memory::Memory< real > > operator[](size_t index) const
gets the scalar memory area (real)
Definition: Volume.cpp:335
bool hasVariable(const std::string &variableName) const
Returns true if the volume has the given variable, false otherwise.
Definition: Volume.cpp:443
virtual void makeZero()
makeZero sets every element of the volume to zero (0).
Definition: Volume.cpp:228
virtual void subtractPower(const Volume &other, real power)
Definition: Volume.cpp:394