# PhasicFlow: utilities/postprocessPhasicFlow/rectangleMesh.cpp Source File
PhasicFlow is an open-source parallel DEM (discrete element method) package for simulating granular flow. It is developed in C++ and can be exectued on both GPU (like CUDA) and CPU.

rectangleMesh.cpp
Go to the documentation of this file.
#include "rectangleMesh.hpp"
pFlow::rectangleMesh::rectangleMesh
(
const box& mshBox,
int32 nx,
int32 ny,
int32 nz,
repository* rep
)
:
IOobject(
objectFile
(
"rectMesh",
"",
objectFile::READ_NEVER,
objectFile::WRITE_NEVER
),
IOPattern::MasterProcessorOnly,
rep
),
meshBox_(mshBox),
numCells_(nx, ny, nz)
{
if(mshBox.minPoint()>= mshBox.maxPoint())
{
fatalErrorInFunction<<"Lower corner point of mesh "<<mshBox.minPoint()<<
" confilicts with upper corner point of mesh "<<mshBox.maxPoint()<<endl;
fatalExit;
}
numCells_ = max( numCells_ , int32x3(1) );
dx_ = (mshBox.maxPoint() - mshBox.minPoint())/
realx3(numCells_.x_, numCells_.y_, numCells_.z_);
}
pFlow::rectangleMesh::rectangleMesh(const dictionary &dict, repository* rep)
:
rectangleMesh(
box(dict),
dict.getVal<int32>("nx"),
dict.getVal<int32>("ny"),
dict.getVal<int32>("nz"),
rep
)
{
}
fatalExit
#define fatalExit
Fatal exit.
Definition: error.hpp:98
pFlow::algorithms::KOKKOS::max
INLINE_FUNCTION_H Type max(const Type *first, uint32 numElems)
Definition: kokkosAlgorithms.hpp:104
pFlow::rectangleMesh::rectangleMesh
rectangleMesh(const box &mshBox, int32 nx, int32 ny, int32 nz, repository *rep)
Definition: rectangleMesh.cpp:5
rectangleMesh.hpp
pFlow::endl
iOstream & endl(iOstream &os)
Add newline and flush stream.
Definition: iOstream.hpp:341
pFlow::box::maxPoint
const INLINE_FUNCTION_HD realx3 & maxPoint() const
Definition: box.hpp:97
pFlow::realx3
triple< real > realx3
Definition: types.hpp:43
pFlow::rectangleMesh
Definition: rectangleMesh.hpp:34
pFlow::IOobject
Definition: IOobject.hpp:35
fatalErrorInFunction
#define fatalErrorInFunction
Report a fatal error and function name and exit the application.
Definition: error.hpp:77
pFlow::int32
int int32
Definition: builtinTypes.hpp:50
pFlow::int32x3
triple< int32 > int32x3
Definition: types.hpp:38
pFlow::objectFile
Definition: objectFile.hpp:30
pFlow::box::minPoint
const INLINE_FUNCTION_HD realx3 & minPoint() const
Definition: box.hpp:91
pFlow::box
Definition: box.hpp:32
pFlow::repository
Definition: repository.hpp:34
pFlow::dictionary
Dictionary holds a set of data entries or sub-dictionaries that are enclosed in a curely braces or ar...
Definition: dictionary.hpp:67