Skip to content
Snippets Groups Projects

Merge changes from develop into open source

1 file
+ 42
42
Compare changes
  • Side-by-side
  • Inline
@@ -44,55 +44,55 @@ class GridBuilder;
//! \class GridGenerator derived class of GridProvider
//! \brief mapping the grid of grid generator to data structure for simulation
class GridGenerator
: public GridProvider
: public GridProvider
{
private:
//! \brief string vector with channel direction
std::vector<std::string> channelDirections;
//! \brief string vector with channel direction
std::vector<std::string> channelBoundaryConditions;
//! \brief string vector with channel direction
std::vector<std::string> channelDirections;
//! \brief string vector with channel direction
std::vector<std::string> channelBoundaryConditions;
//! \brief shared pointer to GridBuilder object
//! \property builder is a shared pointer to an object of GridBuilder
SPtr<GridBuilder> builder;
//! \brief shared pointer to GridBuilder object
//! \property builder is a shared pointer to an object of GridBuilder
SPtr<GridBuilder> builder;
public:
//! Class constructor
//! \param builder shared pointer to instance of GridBuilder
//! \param para shared pointer to instance of classParameter
//! \param cudaManager shared pointer to instance of class CudaMemoryManager
VIRTUALFLUIDS_GPU_EXPORT GridGenerator(SPtr<GridBuilder> builder, SPtr<Parameter> para, SPtr<CudaMemoryManager> cudaMemoryManager);
//! Class default destructor
VIRTUALFLUIDS_GPU_EXPORT virtual ~GridGenerator();
//! Class constructor
//! \param builder shared pointer to instance of GridBuilder
//! \param para shared pointer to instance of classParameter
//! \param cudaManager shared pointer to instance of class CudaMemoryManager
VIRTUALFLUIDS_GPU_EXPORT GridGenerator(SPtr<GridBuilder> builder, SPtr<Parameter> para, SPtr<CudaMemoryManager> cudaMemoryManager);
//! Class default destructor
VIRTUALFLUIDS_GPU_EXPORT virtual ~GridGenerator();
//! \brief allocates and initialized the data structures for Coordinates and node types
void allocArrays_CoordNeighborGeo() override;
//! \brief allocates and initialized the values at the boundary conditions
void allocArrays_BoundaryValues() override;
//! \brief allocates and initialized the sub-grid distances at the boundary conditions
void allocArrays_BoundaryQs() override;
//! \brief allocates and initialized the data structures for Coordinates and node types
void allocArrays_CoordNeighborGeo() override;
//! \brief allocates and initialized the values at the boundary conditions
void allocArrays_BoundaryValues() override;
//! \brief allocates and initialized the sub-grid distances at the boundary conditions
void allocArrays_BoundaryQs() override;
private:
//! \brief verifies if there are invalid nodes, stopper nodes or wrong neighbors
std::string verifyNeighborIndices() const;
//! \brief verifies single neighbor index
//! \param index type integer
//! \param invalidNodes reference to invalid nodes
//! \param stopperNodes reference to stopper nodes
//! \param wrongNeighbors reference to wrong neighbors
std::string verifyNeighborIndex(int index, int &invalidNodes, int &stopperNodes, int &wrongNeighbors) const;
//! \brief check the neighbors
//! \param x,y,z lattice node position
//! \param numberOfWrongNeighbors reference to the number of wrong neighbors
//! \param neighborIndex index of neighbor node
//! \param neighborX,neighborY,neighborZ neighbor lattice node position
//! \param direction type string
std::string checkNeighbor(real x, real y, real z, int index, int& numberOfWrongNeihgbors, int neighborIndex, real neighborX, real neighborY, real neighborZ, std::string direction) const;
//! \brief create the pointers in the struct for the BoundaryConditions from the boundary condition array
//! \param boundaryConditionStruct is a struct containing information about the boundary condition
//! \param subgridDistances is a pointer to an array containing the subgrid distances
//! \param numberOfBCnodes is the number of lattice nodes in the boundary condition
static void getPointersToBoundaryConditions(QforBoundaryConditions& boundaryConditionStruct, real* subgridDistances, const unsigned int numberOfBCnodes);
//! \brief verifies if there are invalid nodes, stopper nodes or wrong neighbors
std::string verifyNeighborIndices() const;
//! \brief verifies single neighbor index
//! \param index type integer
//! \param invalidNodes reference to invalid nodes
//! \param stopperNodes reference to stopper nodes
//! \param wrongNeighbors reference to wrong neighbors
std::string verifyNeighborIndex(int index, int &invalidNodes, int &stopperNodes, int &wrongNeighbors) const;
//! \brief check the neighbors
//! \param x,y,z lattice node position
//! \param numberOfWrongNeighbors reference to the number of wrong neighbors
//! \param neighborIndex index of neighbor node
//! \param neighborX,neighborY,neighborZ neighbor lattice node position
//! \param direction type string
std::string checkNeighbor(real x, real y, real z, int index, int& numberOfWrongNeihgbors, int neighborIndex, real neighborX, real neighborY, real neighborZ, std::string direction) const;
//! \brief create the pointers in the struct for the BoundaryConditions from the boundary condition array
//! \param boundaryConditionStruct is a struct containing information about the boundary condition
//! \param subgridDistances is a pointer to an array containing the subgrid distances
//! \param numberOfBCnodes is the number of lattice nodes in the boundary condition
static void getPointersToBoundaryConditions(QforBoundaryConditions& boundaryConditionStruct, real* subgridDistances, const unsigned int numberOfBCnodes);
};
#endif
Loading