Go to the documentation of this file.
58 int main(
int argc,
char *argv[])
69 "restrict cells to refine based on specified cellSet name"
75 runTime.functionObjects().off();
90 <<
"Cannot find any patches in set " <<
patches <<
endl
95 label nPatchFaces = 0;
96 label nPatchEdges = 0;
117 forAll(meshPoints, pointI)
119 label meshPointI = meshPoints[pointI];
125 cutCells.insert(pCells[pCellI]);
134 Info<<
"Subsetting cells to cut based on cellSet"
145 cutCells.erase(iter.key());
147 Info<<
"Removed from cells to cut all the ones not in set "
159 forAll(meshPoints, pointI)
161 vertOnPatch[meshPoints[pointI]] =
true;
170 forAll(meshPoints, pointI)
172 label meshPointI = meshPoints[pointI];
178 const label edgeI = pEdges[pEdgeI];
181 label otherPointI =
e.otherVertex(meshPointI);
183 if (!vertOnPatch[otherPointI])
185 allCutEdges.append(edgeI);
187 if (
e.start() == meshPointI)
189 allCutEdgeWeights.append(weight);
193 allCutEdgeWeights.append(1 - weight);
200 allCutEdges.shrink();
201 allCutEdgeWeights.shrink();
204 <<
" cells:" << cutCells.size() <<
nl
205 <<
" edges:" << allCutEdges.size() <<
endl;
209 cutEdgeWeights.transfer(allCutEdgeWeights);
210 allCutEdgeWeights.clear();
229 cutter.setRefinement(cuts, meshMod);
238 if (morphMap().hasMotionPoints())
244 cutter.updateMesh(morphMap());
254 Info<<
"Writing refined mesh to time " << runTime.timeName() <<
endl;
static SLList< string > validArgs
A list of valid (mandatory) arguments.
A class for handling words, derived from string.
List< Key > toc() const
Return the table of contents.
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
#define forAll(list, i)
Loop across all elements in list.
Direct mesh changes based on v1.3 polyTopoChange syntax.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
virtual tmp< scalarField > movePoints(const pointField &)
Move points, returns volumes swept by faces in motion.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
const labelListList & pointEdges() const
wordList names() const
Return a list of patch names.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
virtual bool write() const
Write mesh using IO settings from time.
const fileName & pointsInstance() const
Return the current instance directory for points.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
A patch is a list of labels that address the faces in the global face list.
int main(int argc, char *argv[])
Input from memory buffer stream.
A collection of cell labels.
const double e
Elementary charge.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void setInstance(const fileName &)
Set the instance for mesh files.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label size() const
Return the number of elements in the PtrList.
const labelListList & pointCells() const
bool optionFound(const word &opt) const
Return true if the named option is found.
T argRead(const label index) const
Read a value from the argument at index.
void size(const label)
Override size to be inconsistent with allocated storage.
static void noParallel()
Remove the parallel options.
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool usePatchGroups=true) const
Return the set of patch IDs corresponding to the given names.
const labelList & meshPoints() const
Return labelList of mesh points in patch.
Foam::argList args(argc, argv)
bool optionReadIfPresent(const word &opt, T &) const
Read a value from the named option if present.
Description of cuts across cells.