47 void Foam::regionToFace::markZone
57 List<patchEdgeFaceRegion> allEdgeInfo(patch.nEdges());
58 List<patchEdgeFaceRegion> allFaceInfo(patch.size());
60 DynamicList<label> changedEdges;
61 DynamicList<patchEdgeFaceRegion> changedInfo;
65 const labelList& fEdges = patch.faceEdges()[facei];
68 changedEdges.append(fEdges[i]);
69 changedInfo.append(zoneI);
91 if (allFaceInfo[facei].region() == zoneI)
93 faceZone[facei] = zoneI;
99 void Foam::regionToFace::combine(topoSet& set,
const bool add)
const
101 Info<<
" Loading subset " << setName_ <<
" to delimit search region."
103 faceSet subSet(mesh_, setName_);
107 IndirectList<face>(mesh_.faces(), subSet.toc()),
111 RemoteData<scalar> ni;
115 const point& fc = patch.faceCentres()[i];
117 const scalar dSqr =
magSqr(fc - nearPoint_);
119 if (ni.proci == -1 || dSqr < ni.data)
130 Info<<
" Found nearest face on processor " << ni.proci
131 <<
" face " << ni.elementi
146 if (faceRegion[facei] == 0)
148 addOrDelete(set, patch.addressing()[facei],
add);
160 const point& nearPoint
165 nearPoint_(nearPoint)
176 setName_(
dict.lookup(
"set")),
197 Info<<
" Adding all faces of connected region of set "
199 <<
" starting from point "
200 << nearPoint_ <<
" ..." <<
endl;
206 Info<<
" Removing all cells of connected region of set "
208 <<
" starting from point "
209 << nearPoint_ <<
" ..." <<
endl;
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
A list of keyword definitions, which are a keyword followed by any number of values (e....
Mesh consisting of general polyhedral cells.
A topoSetSource to select faces belonging to topological connected region (that contains given point)
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
regionToFace(const polyMesh &mesh, const word &setName, const point &nearPoint)
Construct from components.
virtual ~regionToFace()
Destructor.
Base class of a source for a topoSet.
setAction
Enumeration defining the valid actions.
General set of labels of mesh quantity (points, cells, faces).
A class for handling words, derived from string.
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimLength
vector point
Point is a vector.
dimensionedScalar sqrt(const dimensionedScalar &ds)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
defineTypeNameAndDebug(combustionModel, 0)
treeBoundBox combine(const treeBoundBox &a, const treeBoundBox &b)
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
Foam::indirectPrimitivePatch.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
void combineReduce(const List< UPstream::commsStruct > &comms, T &Value, const CombineOp &cop, const int tag, const label comm)