47 void Foam::regionToFace::markZone
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);
158 const polyMesh&
mesh,
160 const point& nearPoint
165 nearPoint_(nearPoint)
171 const polyMesh&
mesh,
172 const dictionary&
dict
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)
Motion of the mesh specified as a list of pointMeshMovers.
virtual ~regionToFace()
Destructor.
regionToFace(const polyMesh &mesh, const word &setName, const point &nearPoint)
Construct from components.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
setAction
Enumeration defining the valid actions.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
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)
void add(GeometricField< typename typeOfSum< Type1, Type2 >::type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type1, GeoMesh, PrimitiveField2 > &gf1, const GeometricField< Type2, GeoMesh, PrimitiveField3 > &gf2)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet & dimLength
const fvMesh & region(const dictionary &dict)
Cast the give dictionary to the corresponding region fvMesh.
vector point
Point is a vector.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
treeBoundBox combine(const treeBoundBox &a, const treeBoundBox &b)
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
tmp< DimensionedField< scalar, GeoMesh, Field > > magSqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
Foam::indirectPrimitivePatch.
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)
void combineReduce(const List< UPstream::commsStruct > &comms, T &Value, const CombineOp &cop, const int tag, const label comm)