58 int main(
int argc,
char *argv[])
70 "restrict cells to refine based on specified cellSet name" 93 <<
"Cannot find any patches in set " <<
patches << endl
98 label nPatchFaces = 0;
99 label nPatchEdges = 0;
120 forAll(meshPoints, pointi)
122 label meshPointi = meshPoints[pointi];
128 cutCells.insert(pCells[pCelli]);
137 Info<<
"Subsetting cells to cut based on cellSet" 148 cutCells.erase(iter.key());
150 Info<<
"Removed from cells to cut all the ones not in set " 162 forAll(meshPoints, pointi)
164 vertOnPatch[meshPoints[pointi]] =
true;
173 forAll(meshPoints, pointi)
175 label meshPointi = meshPoints[pointi];
181 const label edgeI = pEdges[pEdgeI];
186 if (!vertOnPatch[otherPointi])
188 allCutEdges.append(edgeI);
190 if (e.
start() == meshPointi)
192 allCutEdgeWeights.append(weight);
196 allCutEdgeWeights.append(1 - weight);
203 allCutEdges.shrink();
204 allCutEdgeWeights.shrink();
207 <<
" cells:" << cutCells.size() <<
nl 208 <<
" edges:" << allCutEdges.size() <<
endl;
212 cutEdgeWeights.
transfer(allCutEdgeWeights);
213 allCutEdgeWeights.clear();
232 cutter.setRefinement(cuts, meshMod);
241 if (morphMap().hasMotionPoints())
247 cutter.updateMesh(morphMap());
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void off()
Switch the function objects off.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const labelListList & pointEdges() const
void size(const label)
Override size to be inconsistent with allocated storage.
static word defaultRegion
Return the default region name.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool optionFound(const word &opt) const
Return true if the named option is found.
static void noParallel()
Remove the parallel options.
static SLList< string > validArgs
A list of valid (mandatory) arguments.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
label otherVertex(const label a) const
Given one vertex, return the other.
virtual bool write(const bool write=true) const
Write mesh using IO settings from time.
Description of cuts across cells.
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.
bool optionReadIfPresent(const word &opt, T &) const
Read a value from the named option if present.
const labelList & meshPoints() const
Return labelList of mesh points in patch. They are constructed.
const fileName & pointsInstance() const
Return the current instance directory for points.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
A class for handling words, derived from string.
wordList names() const
Return a list of patch names.
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
List< label > labelList
A List of labels.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
const labelListList & pointCells() const
void setInstance(const fileName &)
Set the instance for mesh files.
virtual tmp< scalarField > movePoints(const pointField &)
Move points, returns volumes swept by faces in motion.
label size() const
Return the number of elements in the UPtrList.
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
const functionObjectList & functionObjects() const
Return the list of function objects.
Input from memory buffer stream.
A collection of cell labels.
T argRead(const label index) const
Read a value from the argument at index.
Direct mesh changes based on v1.3 polyTopoChange syntax.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
List< Key > toc() const
Return the table of contents.
A patch is a list of labels that address the faces in the global face list.
Foam::argList args(argc, argv)
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
label start() const
Return start vertex label.