Go to the documentation of this file.
34 InfoIn(
"void immersedBoundaryFvPatch::makeTriAddressing() const")
35 <<
"creating tri addressing for immersed boundary " <<
name()
43 FatalErrorIn(
"immersedBoundaryFvPatch::makeTriAddressing() const")
44 <<
"tri addressing already exist"
45 <<
"for immersed boundary" <<
name()
62 hitTris[hf[hfI]] = hfI;
89 if (hitTris[triI] > -1)
95 addr[triI] = hitTris[triI];
119 if (visited[curTri])
continue;
123 const triFace& curTriPoints = triPatch[curTri];
126 forAll (curTriPoints, tpI)
128 const labelList curNbrs = pf[curTriPoints[tpI]];
132 if (!visited.
found(curNbrs[nbrI]))
136 nextToVisit.
append(curNbrs[nbrI]);
138 if (hitTris[curNbrs[nbrI]] > -1)
142 ibPointsToUse.
insert(hitTris[curNbrs[nbrI]]);
149 ibPointsToUse.
size() < 3
150 && !nextToVisit.empty()
154 addr[triI] = ibPointsToUse.
toc();
155 w[triI].setSize(addr[triI].
size());
167 if (addr[triI].
size() == 0)
176 vector curTriCentre = triCentres[triI];
182 curW[ibI] = 1/
mag(curTriCentre - ibp[curAddr[ibI]]);
200 "immersedBoundaryFvPatch::makeTriAddressing() const"
201 ) <<
"Not all triangular faces have neighbours with ibPoints" <<
nl
202 <<
"Number of faces:" << counter <<
nl
203 <<
"This might cause false force calculation," <<
nl
204 <<
"consider coarsening the triangular mesh"
213 if (!cellsToTriAddrPtr_)
218 return *cellsToTriAddrPtr_;
225 if (!cellsToTriWeightsPtr_)
230 return *cellsToTriWeightsPtr_;
const labelListList & pointFaces() const
Return point-face addressing.
#define InfoIn(functionName)
Report a information message using Foam::Info.
volScalarField w(IOobject("w", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE), mesh, dimensionedScalar("w", dimensionSet(0, 0, 0, 0, 0, 0, 0), 0.0))
void append(const T &a)
Add at tail of list.
List< Key > toc() const
Return the table of contents.
#define forAll(list, i)
Loop across all elements in list.
const labelList & hitFaces() const
Return list of triangles in IB mesh nearest.
void insert(const T &a)
Add at head of list.
const scalarListList & cellsToTriWeights() const
Interpolation weights from IB points to tri faces.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
const dynamicLabelList & triFacesInMesh() const
Return labels of triangular faces which are inside the mesh.
const word & name() const
Return name.
virtual label size() const
Return size.
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.
Triangulated surface description with patch information.
label size() const
Return number of elements in table.
bool found(const Key &) const
Return true if hashedEntry is found in table.
errorManip< error > abort(error &err)
void setSize(const label)
Reset size of List.
List< labelList > labelListList
A List of labelList.
labelListList * cellsToTriAddrPtr_
Interpolation addressing from IB points to tri faces.
const triSurfaceMesh & ibMesh() const
Return immersed boundary surface mesh.
const immersedBoundaryPolyPatch & ibPolyPatch_
Reference to processor patch.
A triangular face using a FixedList of labels corresponding to mesh vertices.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const Field< PointType > & faceCentres() const
Return face centres for patch.
bool insert(const Key &key)
Insert a new entry.
const vectorField & ibPoints() const
Return IB points.
const labelListList & cellsToTriAddr() const
Interpolation addressing from IB points to tri faces.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
#define WarningIn(functionName)
Report a warning using Foam::Warning.
void size(const label)
Override size to be inconsistent with allocated storage.
List< scalarList > scalarListList
void makeTriAddressing() const
Make tri addressing.
scalarListList * cellsToTriWeightsPtr_
Interpolation weights from IB points to tri faces.
T removeHead()
Remove and return head.