41 setAndPointToFaceZone,
65 const dictionary&
dict
88 if (!isA<faceZoneSet>(set))
91 <<
"Operation only allowed on a faceZoneSet."
99 faceZoneSet& fzSet = refCast<faceZoneSet>(set);
102 faceSet loadedSet(mesh_, setName_);
105 DynamicList<label> newAddressing(fzSet.addressing().size());
106 DynamicList<bool> newFlipMap(fzSet.flipMap().size());
110 Info<<
" Adding all faces from faceSet " << setName_
121 allFaceData[iter.key()] = minData(-1);
126 const label celli = searchEngine.findCell(point_);
130 <<
"Point " << point_ <<
" was not found in the mesh"
135 allCellData[celli] = minData(0);
140 const label nSeedFaces = celli != -1 ? mesh_.cells()[celli].size() : 0;
145 forAll(mesh_.cells()[celli], cellFacei)
147 const label facei = mesh_.cells()[celli][cellFacei];
148 seedFaces[cellFacei] = facei;
149 seedFaceData = minData(0);
154 FaceCellWave<minData>
wave
161 mesh().globalData().nTotalCells()+1
165 newAddressing = fzSet.addressing();
166 newFlipMap = fzSet.flipMap();
173 const label facei = iter.key();
175 const label owni = mesh_.faceOwner()[facei];
176 const bool ownValid = allCellData[owni].valid(
wave.data());
178 if (mesh_.isInternalFace(facei))
180 const label nbri = mesh_.faceNeighbour()[facei];
181 const bool nbrValid = allCellData[nbri].valid(
wave.data());
183 if (ownValid && nbrValid)
186 <<
"Internal face #" << facei <<
" at "
187 << mesh_.faceCentres()[facei]
188 <<
" was visited from both sides by a wave from "
192 if (!ownValid && !nbrValid)
195 <<
"Internal face #" << facei <<
" at "
196 << mesh_.faceCentres()[facei]
197 <<
" was not visited by a wave from "
206 <<
"Boundary face #" << facei <<
" at "
207 << mesh_.faceCentres()[facei]
208 <<
" was not visited by a wave from "
213 newAddressing.append(facei);
214 newFlipMap.append(!ownValid);
219 Info<<
" Removing all faces from faceSet " << setName_
225 DynamicList<label> newAddressing(fzSet.addressing().size());
226 DynamicList<bool> newFlipMap(fzSet.flipMap().size());
227 forAll(fzSet.addressing(), i)
229 if (!loadedSet.found(fzSet.addressing()[i]))
231 newAddressing.append(fzSet.addressing()[i]);
232 newFlipMap.append(fzSet.flipMap()[i]);
238 fzSet.addressing().transfer(newAddressing);
239 fzSet.flipMap().transfer(newFlipMap);
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Macros for easy insertion into run-time selection tables.
static const meshSearch & New(const polyMesh &mesh, const pointInCellShapes=pointInCellShapes::tets)
Lookup or construct from mesh and cell decomposition option.
Motion of the mesh specified as a list of pointMeshMovers.
virtual ~setAndPointToFaceZone()
Destructor.
setAndPointToFaceZone(const polyMesh &mesh, const word &setName, const vector &normal)
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)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
label wave(const fvMesh &mesh, const List< labelPair > &changedPatchAndFaces, const label nCorrections, GeometricField< scalar, GeoMesh > &distance, TrackingData &td, GeometricField< DataType, GeoMesh > &... data)
Wave distance (and maybe additional) data from faces. If nCorrections is.
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
errorManipArg< error, int > exit(error &err, const int errNo=1)
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.
Vector< scalar > vector
A scalar version of the templated Vector.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)