38 template<
class FaceList,
class Po
intField>
64 const Foam::word Foam::fvMeshStitcher::nccFieldPrefix_ =
65 fvMeshStitcher::typeName +
":";
70 void Foam::fvMeshStitcher::intersectNonConformalCyclic
93 forAll(mesh_.boundary(), patchj)
95 const fvPatch& fvp = mesh_.boundary()[patchj];
97 if (isA<nonConformalProcessorCyclicFvPatch>(fvp))
100 refCast<const nonConformalProcessorCyclicFvPatch>(fvp);
121 auto procFacesToIndices = []
129 forAll(faceOtherProcFaces, facei)
131 forAll(faceOtherProcFaces[facei], i)
134 faceOtherProcFaces[facei][i];
136 is[otherProcFacei.
proci] ++;
144 indices[proci].
resize(is[proci]);
149 forAll(faceOtherProcFaces, facei)
151 forAll(faceOtherProcFaces[facei], i)
154 faceOtherProcFaces[facei][i];
157 indices[otherProcFacei.
proci][is[otherProcFacei.
proci] ++];
159 index = {facei, otherProcFacei.
facei, i};
161 if (!owner)
Swap(index[0], index[1]);
168 sort(indices[proci]);
184 auto matchIndices = [&polyFacesBf, &tOrigFacesNbrBf]
203 indicesRef[proci].resize(polyFacesBf[patchi].size());
205 forAll(polyFacesBf[patchi], patchFacei)
208 indicesRef[proci][patchFacei];
212 polyFacesBf[
patchi][patchFacei] - origPp.start(),
213 origFacesNbrBf[
patchi][patchFacei],
217 if (!owner)
Swap(indexRef[0], indexRef[1]);
223 label nCouplesRemoved = 0, nCouplesAdded = 0;
230 label patchFacei = 0, i = 0;
234 patchFacei < polyFacesBf[patchi].size()
235 && i < indices[proci].size()
240 indices[proci][i][0],
241 indices[proci][i][1],
246 indicesRef[proci][patchFacei];
248 if (index < indexRef)
253 else if (index == indexRef)
255 indexRef[2] = indices[proci][i][2];
267 min(indices[proci].size() - i, 0);
269 min(polyFacesBf[patchi].size() - patchFacei, 0);
276 if ((nCouplesRemoved || nCouplesAdded) && nccFvp.owner())
278 Info<<
indent << nCouplesRemoved <<
'/' << nCouplesAdded
279 <<
" small couplings removed/added to " << nccFvp.name()
284 Swap(indices, indicesRef);
287 if (tOrigFacesNbrBf.
valid())
289 matchIndices(indices, nccFvp, origPp, patchis,
true);
290 matchIndices(nbrIndices, nbrNccFvp, nbrOrigPp, nbrPatchis,
false);
295 auto createCouplings =
315 const label patchSize = indices[proci].size();
317 if (patchi == -1 && patchSize)
320 <<
"Intersection generated coupling through " 321 << nccFvp.name() <<
" between processes " 323 <<
" but a corresponding processor interface was not found" 330 SfBf[
patchi].resize(patchSize);
333 forAll(indices[proci], patchFacei)
335 const label origFacei = indices[proci][patchFacei][!owner];
336 const label i = indices[proci][patchFacei][2];
338 polyFacesBf[
patchi][patchFacei] =
339 origFacei + origPp.start();
344 c = couples[origFacei][i];
353 small*origPp.faceAreas()[origFacei],
354 origPp.faceCentres()[origFacei]
358 small*tOrigSfNbrBf()[
patchi][patchFacei],
359 tOrigCfNbrBf()[
patchi][patchFacei]
368 SfBf[
patchi][patchFacei] = c.nbr.area;
369 CfBf[
patchi][patchFacei] = c.nbr.centre;
373 SfBf[origPp.index()][origFacei],
374 CfBf[origPp.index()][origFacei]
378 SfBf[origPp.index()][origFacei] = origP.area;
379 CfBf[origPp.index()][origFacei] = origP.centre;
410 SfBf[origPp.index()][origFacei],
411 CfBf[origPp.index()][origFacei]
415 SfBf[origPp.index()][origFacei] = origP.area;
416 CfBf[origPp.index()][origFacei] = origP.centre;
422 origEdgeParts[origEdgei] += intersection.
srcEdgeParts()[origEdgei];
428 Foam::fvMeshStitcher::calculateOwnerOrigBoundaryEdgeParts
436 const labelList& ownerOrigBoundaryPointMeshPoint =
438 const labelList& ownerOrigBoundaryEdgeMeshEdge =
441 const edgeList& ownerOrigBoundaryMeshEdges =
445 labelList ownerOrigBoundaryEdgeNParts(ownerOrigBoundaryEdges.
size(), 0);
446 List<part> ownerOrigBoundaryEdgeParts(ownerOrigBoundaryEdges.
size());
449 if (patchEdgeParts[
patchi].empty())
continue;
453 const labelList& patchEdgeOwnerOrigBoundaryEdges =
458 const label ownerOrigBoundaryEdgei =
459 patchEdgeOwnerOrigBoundaryEdges[patchEdgei];
465 ownerOrigBoundaryMeshEdges[ownerOrigBoundaryEdgei]
468 const part& pU = patchEdgeParts[
patchi][patchEdgei];
469 const part
p = sign > 0 ? pU : -pU;
471 ownerOrigBoundaryEdgeNParts[ownerOrigBoundaryEdgei] ++;
472 ownerOrigBoundaryEdgeParts[ownerOrigBoundaryEdgei] +=
p;
479 ownerOrigBoundaryPointMeshPoint.
size()
483 ownerOrigBoundaryPointMeshPoint.
size()
485 forAll(ownerOrigBoundaryPointIndices, ownerOrigBoundaryPointi)
487 ownerOrigBoundaryPointIndices[ownerOrigBoundaryPointi] =
488 globalOwnerOrigBoundaryPoints.toGlobal(ownerOrigBoundaryPointi);
493 ownerOrigBoundaryPointMeshPoint,
494 ownerOrigBoundaryPointIndices,
502 forAll(ownerOrigBoundaryEdgeParts, ownerOrigBoundaryEdgei)
504 const edge&
e = ownerOrigBoundaryEdges[ownerOrigBoundaryEdgei];
508 ownerOrigBoundaryPointIndices[e.
start()]
509 > ownerOrigBoundaryPointIndices[e.
end()])
511 ownerOrigBoundaryEdgeParts[ownerOrigBoundaryEdgei] =
512 - ownerOrigBoundaryEdgeParts[ownerOrigBoundaryEdgei];
520 ownerOrigBoundaryEdgeMeshEdge,
521 ownerOrigBoundaryEdgeNParts,
528 ownerOrigBoundaryEdgeMeshEdge,
529 ownerOrigBoundaryEdgeParts,
543 if (
magSqr(fld[i].area) != 0)
554 if (
magSqr(fld[i].area) != 0)
563 forAll(ownerOrigBoundaryEdgeParts, ownerOrigBoundaryEdgei)
565 if (ownerOrigBoundaryEdgeNParts[ownerOrigBoundaryEdgei] != 0)
567 ownerOrigBoundaryEdgeParts[ownerOrigBoundaryEdgei].area /=
568 ownerOrigBoundaryEdgeNParts[ownerOrigBoundaryEdgei];
573 forAll(ownerOrigBoundaryEdgeParts, ownerOrigBoundaryEdgei)
575 const edge&
e = ownerOrigBoundaryEdges[ownerOrigBoundaryEdgei];
579 ownerOrigBoundaryPointIndices[e.
start()]
580 > ownerOrigBoundaryPointIndices[e.
end()]
583 ownerOrigBoundaryEdgeParts[ownerOrigBoundaryEdgei] =
584 - ownerOrigBoundaryEdgeParts[ownerOrigBoundaryEdgei];
588 return ownerOrigBoundaryEdgeParts;
593 void Foam::fvMeshStitcher::applyOwnerOrigBoundaryEdgeParts
604 const labelList& ownerOrigBoundaryEdgeMeshEdge =
606 const edgeList& ownerOrigBoundaryMeshEdges =
613 labelList ownerOrigBoundaryEdgeNOrigFaces
615 ownerOrigBoundaryEdgeMeshEdge.
size(),
618 forAll(ownerOrigBoundaryEdgeMeshEdge, ownerOrigBoundaryEdgei)
620 const label meshEdgei =
621 ownerOrigBoundaryEdgeMeshEdge[ownerOrigBoundaryEdgei];
623 forAll(mesh_.edgeFaces()[meshEdgei], edgeFacei)
625 const label facei = mesh_.edgeFaces()[meshEdgei][edgeFacei];
628 mesh_.isInternalFace(facei)
629 ? -1 : pbMesh.
patchID()[facei - mesh_.nInternalFaces()];
631 if (patchi != -1 && patchIsOwnerOrig[patchi])
633 ownerOrigBoundaryEdgeNOrigFaces[ownerOrigBoundaryEdgei] ++;
642 ownerOrigBoundaryEdgeMeshEdge,
643 ownerOrigBoundaryEdgeNOrigFaces,
655 forAll(ownerOrigBoundaryEdgeMeshEdge, ownerOrigBoundaryEdgei)
657 const label meshEdgei =
658 ownerOrigBoundaryEdgeMeshEdge[ownerOrigBoundaryEdgei];
660 const part& ownerOrigBoundaryEdgeP =
661 ownerOrigBoundaryEdgeParts[ownerOrigBoundaryEdgei];
663 switch (ownerOrigBoundaryEdgeNOrigFaces[ownerOrigBoundaryEdgei])
674 label origFacei = -1, origPatchi = -1, origPatchFacei = -1;
675 forAll(mesh_.edgeFaces()[meshEdgei], edgeFacei)
677 const label facei = mesh_.edgeFaces()[meshEdgei][edgeFacei];
680 mesh_.isInternalFace(facei)
681 ? -1 : pbMesh.
patchID()[facei - mesh_.nInternalFaces()];
683 if (patchi != -1 && patchIsOwnerOrig[patchi])
687 origPatchFacei = facei - pbMesh[
patchi].start();
700 mesh_.faces()[origFacei].edgeDirection
702 ownerOrigBoundaryMeshEdges[ownerOrigBoundaryEdgei]
705 part
p(area, centre);
708 ? ownerOrigBoundaryEdgeP
709 : -ownerOrigBoundaryEdgeP;
717 [origPatchi][origPatchFacei] =
label(1);
728 forAll(mesh_.edgeFaces()[meshEdgei], edgeFacei)
730 const label facei = mesh_.edgeFaces()[meshEdgei][edgeFacei];
733 mesh_.isInternalFace(facei)
734 ? -1 : pbMesh.
patchID()[facei - mesh_.nInternalFaces()];
736 if (patchi != -1 && patchIsOwnerOrig[patchi])
741 const label patchFacei =
742 patchi == -1 ? -1 : facei - pbMesh[
patchi].start();
754 mesh_.faces()[facei].edgeDirection
756 ownerOrigBoundaryMeshEdges[ownerOrigBoundaryEdgei]
759 part
p(area, centre);
762 ? ownerOrigBoundaryEdgeP
763 : -ownerOrigBoundaryEdgeP;
768 if (debug && patchi != -1)
781 <<
"Boundary is not manifold" 799 bool synchronised =
true;
806 if (!isA<processorFvPatch>(changedPf.
patch()))
continue;
808 forAll(changedPf, patchFacei)
810 if (changedPf[patchFacei] != changedNbrPf[patchFacei])
816 <<
"Face not synchronised with centre at " 817 << mesh_.faceCentres()[facei] <<
endl;
819 synchronised =
false;
833 void Foam::fvMeshStitcher::stabiliseOrigPatchFaces
842 forAll(allOrigPatchIDs, i)
844 const label origPatchi = allOrigPatchIDs[i];
847 forAll(origPp, origPatchFacei)
851 SfBf[origPatchi][origPatchFacei],
852 CfBf[origPatchi][origPatchFacei]
857 small*origPp.
faceAreas()[origPatchFacei],
863 SfBf[origPatchi][origPatchFacei] = p.area;
864 CfBf[origPatchi][origPatchFacei] = p.centre;
870 void Foam::fvMeshStitcher::intersectNonConformalCyclics
875 const bool haveTopology
889 forAll(ownerOrigPatchIDs, i)
891 const label origPatchi = ownerOrigPatchIDs[i];
893 patchEdgeParts[origPatchi].
resize 895 mesh_.boundaryMesh()[origPatchi].nEdges(),
924 if (!isA<nonConformalFvPatch>(fvp))
continue;
927 refCast<const nonConformalFvPatch>(fvp);
931 origSf.boundaryFieldRef()[
patchi] =
933 origCf.boundaryFieldRef()[
patchi] =
964 refCast<const coupledFvPatch>(Cfp.
patch())
977 if (!isA<nonConformalCyclicFvPatch>(fvp))
continue;
980 refCast<const nonConformalCyclicFvPatch>(fvp);
982 if (!nccFvp.
owner())
continue;
984 intersectNonConformalCyclic
999 calculateOwnerOrigBoundaryEdgeParts(patchEdgeParts);
1003 forAll(ownerOrigPatchIDs, i)
1005 const label origPatchi = ownerOrigPatchIDs[i];
1006 const polyPatch& origPatch = pbMesh[origPatchi];
1008 const labelList& origPatchEdgeOwnerOrigBoundaryEdges =
1011 forAll(patchEdgeParts[origPatchi], origPatchEdgei)
1013 const label ownerOrigBoundaryEdgei =
1014 origPatchEdgeOwnerOrigBoundaryEdges[origPatchEdgei];
1017 patchEdgeParts[origPatchi][origPatchEdgei];
1018 errorP -= ownerOrigBoundaryEdgeParts[ownerOrigBoundaryEdgei];
1022 const label patchFacei =
1023 origPatch.
edgeFaces()[origPatchEdgei][patchEdgeFacei];
1027 SfBf[origPatchi][patchFacei],
1028 CfBf[origPatchi][patchFacei]
1032 SfBf[origPatchi][patchFacei] = p.area;
1033 CfBf[origPatchi][patchFacei] = p.centre;
1039 applyOwnerOrigBoundaryEdgeParts(SfSf, CfSf, ownerOrigBoundaryEdgeParts);
1042 stabiliseOrigPatchFaces(SfBf, CfBf);
1046 template<
class NonConformalFvPatch>
1047 inline void Foam::fvMeshStitcher::createNonConformalStabilisationGeometry
1063 if (!isA<NonConformalFvPatch>(fvp))
continue;
1066 refCast<const nonConformalFvPatch>(fvp).origPatch().patch();
1088 bool result =
false;
1094 if (!isA<nonConformalFvPatch>(fvp))
continue;
1097 mesh_.magSf().boundaryField()[
patchi];
1100 refCast<const nonConformalFvPatch>(fvp).origPatch().patch();
1108 if (
max(magSfp/origMagSfp) > rootSmall)
1128 (small*
sqr(
cbrt(mesh_.V())))()
1139 <<
"Can only compute volume conservation error for this time, or " 1146 n == 0 ? mesh_.time().deltaT() : mesh_.time().deltaT0();
1195 const bool changing,
1196 const bool geometric
1207 if (coupled && geometric)
1219 preConformSurfaceFields();
1226 conformCorrectMeshPhi(
phi);
1235 resizePatchFields<VolField>();
1236 resizePatchFields<SurfaceField>();
1241 if (coupled && geometric)
1244 Info<<
indent <<
"Cell min/avg/max openness = " 1251 for (
label j = 0; j < i; ++ j)
Info<<
"old-";
1252 Info<< (i ?
"time " :
"") <<
"volume conservation error = " 1259 if (coupled && geometric)
1264 meshObject::movePoints<fvMesh>(mesh_);
1265 meshObject::movePoints<lduMesh>(mesh_);
1267 const_cast<Time&
>(mesh_.
time()).functionObjects().movePoints(mesh_);
1275 const bool changing,
1276 const bool geometric,
1296 bool haveTopology =
false;
1303 haveTopology =
true;
1324 if (coupled && (geometric || !haveTopology))
1330 if (!isA<nonConformalCyclicFvPatch>(fvp))
continue;
1333 refCast<const nonConformalCyclicFvPatch>(fvp);
1335 if (!nccFvp.
owner())
continue;
1341 if (coupled && (geometric || !haveTopology))
1351 if (coupled && (geometric || !haveTopology))
1354 intersectNonConformalCyclics(polyFacesBf, Sf, Cf, haveTopology);
1358 createNonConformalStabilisationGeometry<nonConformalErrorFvPatch>
1369 createNonConformalStabilisationGeometry<nonConformalFvPatch>
1381 createNonConformalCorrectMeshPhiGeometry(polyFacesBf, Sf, Cf);
1388 unconformCorrectMeshPhi(polyFacesBf, Sf, Cf,
phi);
1399 storeOldTimeFields<VolField>();
1400 storeOldTimeFields<SurfaceField>();
1403 resizePatchFields<VolField>();
1404 resizePatchFields<SurfaceField>();
1412 postNonConformSurfaceFields();
1418 evaluateVolFields();
1421 postNonConformSurfaceVelocities();
1427 if (coupled && geometric)
1430 Info<<
indent <<
"Cell min/avg/max openness = " 1437 for (
label j = 0; j < i; ++ j)
Info<<
"old-";
1438 Info<< (i ?
"time " :
"") <<
"volume conservation error = " 1455 label nNonProcPatches = 0;
1460 if (!isA<processorFvPatch>(fvp))
1462 if (nNonProcPatches !=
patchi)
1465 <<
"Processor patches do not follow non-processor " 1476 scalarField sumMfe(nNonProcPatches, 0), nSumMfe(nNonProcPatches, 0);
1482 const label nccPatchi =
1483 isA<nonConformalCyclicFvPatch>(fvp)
1484 ? refCast<const nonConformalCyclicFvPatch>(fvp)
1486 : isA<nonConformalProcessorCyclicFvPatch>(fvp)
1487 ? refCast<const nonConformalProcessorCyclicFvPatch>(fvp)
1491 if (nccPatchi != -1)
1495 sumMfe[nccPatchi] +=
sum(mfe[patchi]);
1498 max(maxMfe[nccPatchi],
max(mfe[patchi]));
1513 isA<nonConformalCyclicFvPatch>(fvp)
1514 && refCast<const nonConformalCyclicFvPatch>(fvp).owner()
1519 <<
" min/avg/max mesh flux error = " << minMfe[
patchi]
1521 <<
'/' << maxMfe[
patchi] << endl;
1527 if (coupled && (geometric || !haveTopology))
1532 meshObject::movePoints<fvMesh>(mesh_);
1533 meshObject::movePoints<lduMesh>(mesh_);
1535 const_cast<Time&
>(mesh_.
time()).functionObjects().movePoints(mesh_);
1566 intersectNonConformalCyclics(polyFacesBf, Sf, Cf,
true);
1570 createNonConformalStabilisationGeometry<nonConformalErrorFvPatch>
1581 createNonConformalStabilisationGeometry<nonConformalFvPatch>
1595 meshObject::movePoints<fvMesh>(mesh_);
1596 meshObject::movePoints<lduMesh>(mesh_);
virtual bool disconnect(const bool changing, const bool geometric)
Disconnect the mesh by removing faces from the nonConformalCyclics.
dimensionedScalar sign(const dimensionedScalar &ds)
Surface integrate surfaceField creating a volField. Surface sum a surfaceField creating a volField...
List< List< procFace > > srcTgtProcFaces() const
For each source face, the coupled target procs and faces.
Return the vol-field velocity corresponding to a given surface-field velocity.
const List< DynamicList< couple > > & srcCouples() const
For each source face, the source and target areas for each.
#define forAll(list, i)
Loop across all elements in list.
const surfaceVectorField & Sf() const
Return cell face area vectors.
bool processorCase() const
Return true if this is a processor case.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & indent(Ostream &os)
Indent stream.
const List< part > & srcErrorParts() const
For each source face, the area associated with mismatch.
void surfaceIntegrate(Field< Type > &ivf, const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
bool moving() const
Is mesh moving.
errorManipArg< error, int > exit(error &err, const int errNo=1)
label index() const
Return the index of this patch in the fvBoundaryMesh.
List< List< procFace > > tgtSrcProcFaces() const
For each target face, the coupled source procs and faces.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual label start() const
Return start label of this patch in the polyMesh face list.
Structure to conveniently store processor and face indices.
const surfaceVectorField & Cf() const
Return face centres.
Type gMin(const FieldField< Field, Type > &f)
label facei
The face index.
const List< DynamicList< couple > > & tgtCouples() const
For each target face, the target and source areas for each.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
bool geometric() const
Is the connection "geometric", or has the topology just been.
void size(const label)
Override size to be inconsistent with allocated storage.
static int compare(const edge &, const edge &)
Compare edges.
void unconform(const GeometricBoundaryField< label, fvsPatchField, surfaceMesh > &polyFacesBf, const surfaceVectorField &Sf, const surfaceVectorField &Cf, const surfaceScalarField &phi=NullObjectRef< surfaceScalarField >(), const bool sync=true)
Unconform the fvMesh from the polyMesh.
Mesh manipulator that uses the intersection provided by the cyclic non-conformal poly patches to crea...
label proci
The processor index.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Internal &, const PtrList< PatchField< Type >> &)
Return a temporary field constructed from name,.
const surfaceScalarField & phi() const
Return cell face motion fluxes.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const labelList & patchID() const
Per boundary face label the patch index.
Holds information (coordinate and normal) regarding nearest wall point.
tmp< DimensionedField< scalar, volMesh > > volumeConservationError(const label n) const
Return the non-dimensional old-time volume conservation error.
GeometricBoundaryField< Type, PatchField, GeoMesh > Boundary
Type of the boundary field.
const dimensionSet dimless
Generic dimensioned Type class.
label nOldTimes() const
Return the number of old time fields stored.
const Time & time() const
Return the top-level database.
void resize(const label)
Alias for setSize(const label)
Class to generate patchToPatch coupling geometry. A full geometric intersection is done between a fac...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
const dimensionedScalar c
Speed of light in a vacuum.
const labelList & meshPoints() const
Return labelList of mesh points in patch. They are constructed.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
virtual int neighbProcNo() const
Return neighbour processor number.
const Vector< Cmpt > & centre(const Foam::List< Vector< Cmpt >> &) const
Return *this (used for point which is a typedef to Vector<scalar>.
A list of faces which address into the list of points.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
fvMeshStitcher(fvMesh &)
Construct from fvMesh.
vectorField pointField
pointField is a vectorField.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
virtual void movePoints()
Update local data for mesh motion.
static const DimensionedField< Type, GeoMesh > & null()
Return a null DimensionedField.
bool conformal() const
Return whether the fvMesh is conformal with the polyMesh.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
bool valid() const
Is this temporary object valid,.
A class for handling words, derived from string.
const GeometricBoundaryField< label, fvsPatchField, surfaceMesh > & polyFacesBf() const
Return face-poly-face addressing.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const polyPatch & patch() const
Return the polyPatch.
virtual void updateMesh(const polyTopoChangeMap &)
Update local data for topology changes.
dimensionedScalar cbrt(const dimensionedScalar &ds)
dimensionSet cmptMag(const dimensionSet &)
virtual bool connect(const bool changing, const bool geometric, const bool load)
Connect the mesh by adding faces into the nonConformalCyclics.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
const labelListList & edgeFaces() const
Return edge-face addressing.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
static const label labelMax
const fileOperation & fileHandler()
Get current file handler.
tmp< GeometricBoundaryField > boundaryNeighbourField() const
Return BoundaryField of the values on the other side of couples.
void conform(const surfaceScalarField &phi=NullObjectRef< surfaceScalarField >())
Conform the fvMesh to the polyMesh.
bool stitches() const
Does this stitcher do anything?
dimensioned< scalar > magSqr(const dimensioned< Type > &)
const vectorField::subField faceAreas() const
Return face areas.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
Type gMax(const FieldField< Field, Type > &f)
defineTypeNameAndDebug(combustionModel, 0)
virtual ~fvMeshStitcher()
Destructor.
static nonConformalBoundary & New(polyMesh &mesh)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
Generic GeometricBoundaryField class.
static const GeometricField< Type, PatchField, GeoMesh > & null()
Return a null geometric field.
label size() const
Return the number of elements in the UPtrList.
const fvPatch & patch() const
Return patch.
edge meshEdge(const PrimitivePatch< FaceList, PointField > &p, const label edgei)
static bool & parRun()
Is this a parallel run?
static label nProcs(const label communicator=0)
Number of processes in parallel run.
const scalarField::subField magFaceAreas() const
Return face area magnitudes.
const List< part > & srcEdgeParts() const
For each source edge, the non-coupled geometry associated.
virtual bool owner() const
Does this side own the patch ?
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
tmp< GeometricField< Type, PatchField, GeoMesh > > cloneUnSliced() const
Clone un-sliced.
Type gAverage(const FieldField< Field, Type > &f)
label end() const
Return end vertex label.
Mesh data needed to do the Finite Volume discretisation.
A List with indirect addressing.
label start() const
Return start label of this patch in the polyMesh face list.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Operator to apply a binary operation to a pair of lists.
bool dynamic() const
Is this mesh dynamic?
void resize(const label)
Alias for setSize(const label)
dimensioned< scalar > mag(const dimensioned< Type > &)
GeometricField< label, fvsPatchField, surfaceMesh > surfaceLabelField
Field< vector > vectorField
Specialisation of Field<T> for vector.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
tmp< GeometricField< Type, fvPatchField, volMesh > > surfaceSum(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
const doubleScalar e
Elementary charge.
virtual const word & name() const
Return name.
tmp< DimensionedField< scalar, volMesh > > openness() const
Return the non-dimensional cell openness for debugging/checking.
IOobject polyFacesBfIO(IOobject::readOption r) const
Get the poly faces IO object.
A class for managing temporary objects.
void reconnect(const bool geometric) const
Re-compute the connection. Topology is preserved. Permits a change.
A patch is a list of labels that address the faces in the global face list.
virtual bool isFile(const fileName &, const bool checkVariants=true, const bool followLink=true) const =0
Does the name exist as a file in the file system?
Ostream & incrIndent(Ostream &os)
Increment the indent level.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
virtual bool coupled() const
Return true if this patch is coupled.
label referPatchID() const
Return the referring patch ID.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
const surfaceScalarField & deltaCoeffs() const
Return reference to cell-centre difference coefficients.
label start() const
Return start vertex label.
dimensionSet transform(const dimensionSet &)
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const vectorField::subField faceCentres() const
Return face centres.