60int main(
int argc,
char *argv[])
64 "Refine a hex mesh by 2x2x2 cell splitting for the specified cellSet"
68 argList::addArgument(
"cellSet");
69 argList::addBoolOption
72 "Remove cells from input cellSet to keep to 2:1 ratio"
73 " (default is to extend set)"
76 argList::noFunctionObjects();
82 const word oldInstance =
mesh.pointsInstance();
85 const bool overwrite =
args.
found(
"overwrite");
89 Info<<
"Reading cells to refine from cellSet " << cellSetName
95 <<
" cells to refine from cellSet " << cellSetName <<
nl
149 <<
" cells:" <<
mesh.globalData().nTotalCells() <<
nl
150 <<
" faces:" <<
mesh.globalData().nTotalFaces() <<
nl
151 <<
" points:" <<
mesh.globalData().nTotalPoints() <<
nl
186 mesh.updateMesh(map());
192 if (map().hasMotionPoints())
194 mesh.movePoints(map().preMotionPoints());
198 <<
" to " <<
mesh.globalData().nTotalCells() <<
" cells." <<
nl <<
endl;
202 mesh.setInstance(oldInstance);
209 topoSet::removeFiles(
mesh);
210 processorMeshes::removeFiles(
mesh);
Field reading functions for post-processing utilities.
List of IOobjects with searching and retrieving facilities.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
bool found(const word &optName) const
Return true if the named option is found.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A collection of cell labels.
Refinement of (split) hexes using polyTopoChange.
void updateMesh(const mapPolyMesh &)
Force recalculation of locally stored data on topological change.
void setRefinement(const cellCuts &cuts, polyTopoChange &meshMod)
Do actual cutting with cut description. Inserts mesh changes.
Direct mesh changes based on v1.3 polyTopoChange syntax.
A class for handling words, derived from Foam::string.
wordList ReadFields(const typename GeoMesh::Mesh &mesh, const IOobjectList &objects, PtrList< GeometricField< Type, PatchField, GeoMesh > > &fields, const bool syncPar=true, const bool readOldTime=false)
Read Geometric fields of templated type.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Type gMin(const FieldField< Field, Type > &f)
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce (copy) and return value.
Type gMax(const FieldField< Field, Type > &f)
constexpr char nl
The newline '\n' character (0x0a)
Foam::argList args(argc, argv)