60int main(
int argc,
char *argv[])
64 "Refine a hex mesh by 2x2x2 cell splitting for the specified cellSet"
72 "Remove cells from input cellSet to keep to 2:1 ratio"
73 " (default is to extend set)"
82 const word oldInstance =
mesh.pointsInstance();
85 const bool overwrite =
args.found(
"overwrite");
87 const bool minSet =
args.found(
"minSet");
89 Info<<
"Reading cells to refine from cellSet " << cellSetName
95 <<
" cells to refine from cellSet " << cellSetName <<
nl
153 <<
" cells:" <<
mesh.globalData().nTotalCells() <<
nl
154 <<
" faces:" <<
mesh.globalData().nTotalFaces() <<
nl
155 <<
" points:" <<
mesh.globalData().nTotalPoints() <<
nl
157 <<
" min:" << cellLimits.min()
158 <<
" max:" << cellLimits.max() <<
nl
160 <<
" min:" << pointLimits.min()
161 <<
" max:" << pointLimits.max() <<
nl
191 mesh.updateMesh(map());
197 if (map().hasMotionPoints())
199 mesh.movePoints(map().preMotionPoints());
203 <<
" to " <<
mesh.globalData().nTotalCells() <<
" cells." <<
nl <<
endl;
207 mesh.setInstance(oldInstance);
Field reading functions for post-processing utilities.
List of IOobjects with searching and retrieving facilities. Implemented as a HashTable,...
static FOAM_NO_DANGLING_REFERENCE const pointMesh & New(const polyMesh &mesh, Args &&... args)
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
static void noFunctionObjects(bool addWithOption=false)
Remove '-noFunctionObjects' option and ignore any occurrences.
static void addArgument(const string &argName, const string &usage="")
Append a (mandatory) argument to validArgs.
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
static void addNote(const string ¬e)
Add extra notes for the usage information.
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.
static void removeFiles(const polyMesh &mesh)
Helper: remove all procAddressing files from mesh instance.
static void removeFiles(const polyMesh &)
Helper: remove all sets files from mesh instance.
A class for handling words, derived from Foam::string.
return returnReduce(nRefine-oldNRefine, sumOp< label >())
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.
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
MinMax< Type > gMinMax(const FieldField< Field, Type > &f)
constexpr char nl
The newline '\n' character (0x0a).
Foam::argList args(argc, argv)