54 Foam::label Foam::cyclicPolyPatch::findMaxArea
61 scalar maxAreaSqr = -GREAT;
65 scalar areaSqr =
magSqr(faces[facei].areaNormal(
points));
67 if (maxAreaSqr < areaSqr)
82 const cyclicPolyPatch& half0 = *
this;
86 half0Areas[facei] = half0[facei].areaNormal(half0.points());
90 const cyclicPolyPatch& half1 = neighbPatch();
94 half1Areas[facei] = half1[facei].areaNormal(half1.points());
118 if (
debug && owner())
120 fileName casePath(boundaryMesh().
mesh().time().
path());
122 fileName nm0(casePath/
name()+
"_faces.obj");
123 Pout<<
"cyclicPolyPatch::calcTransforms : Writing " <<
name()
124 <<
" faces to OBJ file " << nm0 <<
endl;
125 writeOBJ(nm0, half0, half0.points());
127 const cyclicPolyPatch& half1 = neighbPatch();
129 fileName nm1(casePath/half1.name()+
"_faces.obj");
130 Pout<<
"cyclicPolyPatch::calcTransforms : Writing " << half1.
name()
131 <<
" faces to OBJ file " << nm1 <<
endl;
132 writeOBJ(nm1, half1, half1.points());
135 OFstream str(casePath/
name()+
"_to_" + half1.name() +
".obj");
137 Pout<<
"cyclicPolyPatch::calcTransforms :" 138 <<
" Writing coupled face centres as lines to " << str.
name()
142 const point&
p0 = half0Ctrs[i];
143 str <<
"v " <<
p0.x() <<
' ' <<
p0.y() <<
' ' <<
p0.z() <<
nl;
145 const point& p1 = half1Ctrs[i];
146 str <<
"v " << p1.x() <<
' ' << p1.y() <<
' ' << p1.z() <<
nl;
148 str <<
"l " << vertI-1 <<
' ' << vertI <<
nl;
156 if (half0Ctrs.size() != half1Ctrs.size())
159 <<
"For patch " <<
name()
160 <<
" there are " << half0Ctrs.size()
161 <<
" face centres, for the neighbour patch " << neighbPatch().name()
162 <<
" there are " << half1Ctrs.size()
169 <<
"Patch " <<
name()
170 <<
" has transform type " << transformTypeNames[
transform()]
171 <<
", neighbour patch " << neighbPatchName()
172 <<
" has transform type " 173 << neighbPatch().transformTypeNames[neighbPatch().transform()]
180 if (half0Ctrs.size() > 0)
185 scalar maxAreaDiff = -GREAT;
186 label maxAreaFacei = -1;
190 scalar magSf =
mag(half0Areas[facei]);
191 scalar nbrMagSf =
mag(half1Areas[facei]);
192 scalar avSf = (magSf + nbrMagSf)/2.0;
194 if (magSf < ROOTVSMALL && nbrMagSf < ROOTVSMALL)
199 half0Normals[facei] =
point(1, 0, 0);
200 half1Normals[facei] = half0Normals[facei];
204 scalar areaDiff =
mag(magSf - nbrMagSf)/avSf;
206 if (areaDiff > maxAreaDiff)
208 maxAreaDiff = areaDiff;
209 maxAreaFacei = facei;
212 if (areaDiff > matchTolerance())
216 <<
" area does not match neighbour by " 218 <<
"% -- possible face ordering problem." <<
endl 219 <<
"patch:" <<
name()
220 <<
" my area:" << magSf
221 <<
" neighbour area:" << nbrMagSf
222 <<
" matching tolerance:" << matchTolerance()
224 <<
"Mesh face:" << start()+facei
225 <<
" fc:" << half0Ctrs[facei]
227 <<
"Neighbour fc:" << half1Ctrs[facei]
229 <<
"If you are certain your matching is correct" 230 <<
" you can increase the 'matchTolerance' setting" 231 <<
" in the patch dictionary in the boundary file." 233 <<
"Rerun with cyclic debug flag set" 238 half0Normals[facei] = half0Areas[facei] / magSf;
239 half1Normals[facei] = half1Areas[facei] / nbrMagSf;
248 Pout<<
"cyclicPolyPatch::calcTransforms :" 249 <<
" patch:" <<
name()
250 <<
" Max area error:" << 100*maxAreaDiff <<
"% at face:" 251 << maxAreaFacei <<
" at:" << half0Ctrs[maxAreaFacei]
252 <<
" coupled face at:" << half1Ctrs[maxAreaFacei]
263 vector n0 = findFaceMaxRadius(half0Ctrs);
264 vector n1 = -findFaceMaxRadius(half1Ctrs);
270 Pout<<
"cyclicPolyPatch::calcTransforms :" 271 <<
" patch:" <<
name()
272 <<
" Specified rotation :" 273 <<
" n0:" << n0 <<
" n1:" << n1
283 (n0 ^ rotationAxis_),
289 (-n1 ^ rotationAxis_),
292 const tensor revT(E1.T() & E0);
314 static_cast<const pointField&>(half0Ctrs),
315 static_cast<const pointField&>(half1Ctrs),
328 Pout<<
"cyclicPolyPatch::calcTransforms :" 329 <<
" patch:" <<
name()
330 <<
" Specified separation vector : " 331 << separationVector_ <<
endl;
335 const scalar avgTol =
average(half0Tols);
338 mag(separationVector_ + neighbPatch().separationVector_)
343 <<
"Specified separation vector " << separationVector_
344 <<
" differs by that of neighbouring patch " 345 << neighbPatch().separationVector_
346 <<
" by more than tolerance " << avgTol <<
endl 347 <<
"patch:" <<
name()
348 <<
" neighbour:" << neighbPatchName()
356 separation().size() != 1
357 ||
mag(separation()[0] - separationVector_) > avgTol
361 <<
"Specified separationVector " << separationVector_
362 <<
" differs from computed separation vector " 363 << separation() <<
endl 364 <<
"This probably means your geometry is not consistent" 365 <<
" with the specified separation and might lead" 366 <<
" to problems." <<
endl 367 <<
"Continuing with specified separation vector " 368 << separationVector_ <<
endl 369 <<
"patch:" <<
name()
370 <<
" neighbour:" << neighbPatchName()
389 void Foam::cyclicPolyPatch::getCentresAndAnchors
401 half0Ctrs = pp0.faceCentres();
402 anchors0 = getAnchorPoints(pp0, pp0.points(),
transform());
403 half1Ctrs = pp1.faceCentres();
407 Pout<<
"cyclicPolyPatch::getCentresAndAnchors :" 408 <<
" patch:" <<
name() <<
nl 409 <<
"half0 untransformed faceCentres (avg) : " 411 <<
"half1 untransformed faceCentres (avg) : " 415 if (half0Ctrs.size())
421 vector n0 = findFaceMaxRadius(half0Ctrs);
422 vector n1 = -findFaceMaxRadius(half1Ctrs);
428 Pout<<
"cyclicPolyPatch::getCentresAndAnchors :" 429 <<
" patch:" <<
name()
430 <<
" Specified rotation :" 431 <<
" n0:" << n0 <<
" n1:" << n1
442 (n0 ^ rotationAxis_),
448 (-n1 ^ rotationAxis_),
451 const tensor revT(E1.T() & E0);
460 half0Ctrs[facei] - rotationCentre_
467 anchors0[facei] - rotationCentre_
480 Pout<<
"cyclicPolyPatch::getCentresAndAnchors :" 481 <<
" patch:" <<
name()
482 <<
"Specified translation : " << separationVector_
489 half0Ctrs -= separationVector_;
490 anchors0 -= separationVector_;
500 label max0I = findMaxArea(pp0.points(), pp0);
501 const vector n0 = pp0[max0I].unitNormal(pp0.points());
503 label max1I = findMaxArea(pp1.points(), pp1);
504 const vector n1 = pp1[max1I].unitNormal(pp1.points());
506 if (
mag(n0 & n1) < 1-matchTolerance())
510 Pout<<
"cyclicPolyPatch::getCentresAndAnchors :" 511 <<
" patch:" <<
name()
512 <<
" Detected rotation :" 513 <<
" n0:" << n0 <<
" n1:" << n1 <<
endl;
538 const point ctr0(
sum(pp0.localPoints())/pp0.nPoints());
539 const point ctr1(
sum(pp1.localPoints())/pp1.nPoints());
543 Pout<<
"cyclicPolyPatch::getCentresAndAnchors :" 544 <<
" patch:" <<
name()
545 <<
" Detected translation :" 546 <<
" n0:" << n0 <<
" n1:" << n1
547 <<
" ctr0:" << ctr0 <<
" ctr1:" << ctr1 <<
endl;
550 half0Ctrs += ctr1 - ctr0;
551 anchors0 += ctr1 - ctr0;
559 tols = matchTolerance()*calcFaceTol(pp1, pp1.points(), half1Ctrs);
570 const vectorField n((faceCentres - rotationCentre_) ^ rotationAxis_);
574 label facei =
findMax(magRadSqr);
578 Info<<
"findFaceMaxRadius(const pointField&) : patch: " <<
name() <<
nl 579 <<
" rotFace = " << facei <<
nl 580 <<
" point = " << faceCentres[facei] <<
nl 581 <<
" distance = " <<
Foam::sqrt(magRadSqr[facei])
598 const word& patchType,
606 rotationCentre_(
Zero),
607 separationVector_(
Zero),
608 coupledPointsPtr_(nullptr),
609 coupledEdgesPtr_(nullptr)
623 const word& neighbPatchName,
625 const vector& rotationAxis,
626 const point& rotationCentre,
627 const vector& separationVector
631 neighbPatchName_(neighbPatchName),
633 rotationAxis_(rotationAxis),
634 rotationCentre_(rotationCentre),
635 separationVector_(separationVector),
636 coupledPointsPtr_(nullptr),
637 coupledEdgesPtr_(nullptr)
650 const word& patchType
654 neighbPatchName_(
dict.getOrDefault(
"neighbourPatch",
word::null)),
658 rotationCentre_(
Zero),
659 separationVector_(
Zero),
660 coupledPointsPtr_(nullptr),
661 coupledEdgesPtr_(nullptr)
663 if (neighbPatchName_.empty() && !coupleGroup_.
good())
666 <<
"No \"neighbourPatch\" provided." <<
endl 667 <<
"Is your mesh uptodate with split cyclics?" <<
endl 668 <<
"Run foamUpgradeCyclics to convert mesh and fields" 672 if (neighbPatchName_ ==
name)
675 <<
"Neighbour patch name " << neighbPatchName_
676 <<
" cannot be the same as this patch " <<
name 684 dict.readEntry(
"rotationAxis", rotationAxis_);
685 dict.readEntry(
"rotationCentre", rotationCentre_);
687 scalar magRot =
mag(rotationAxis_);
691 <<
"Illegal rotationAxis " << rotationAxis_ <<
endl 692 <<
"Please supply a non-zero vector." 695 rotationAxis_ /= magRot;
701 dict.readEntry(
"separationVector", separationVector_);
722 neighbPatchName_(
pp.neighbPatchName_),
723 coupleGroup_(
pp.coupleGroup_),
725 rotationAxis_(
pp.rotationAxis_),
726 rotationCentre_(
pp.rotationCentre_),
727 separationVector_(
pp.separationVector_),
728 coupledPointsPtr_(nullptr),
729 coupledEdgesPtr_(nullptr)
739 const label nrbPatchID,
744 neighbPatchName_(
pp.neighbPatchName_),
745 coupleGroup_(
pp.coupleGroup_),
746 neighbPatchID_(nrbPatchID),
747 rotationAxis_(
pp.rotationAxis_),
748 rotationCentre_(
pp.rotationCentre_),
749 separationVector_(
pp.separationVector_),
750 coupledPointsPtr_(nullptr),
751 coupledEdgesPtr_(nullptr)
764 const label newStart,
765 const word& neighbName
769 neighbPatchName_(neighbName),
770 coupleGroup_(
pp.coupleGroup_),
772 rotationAxis_(
pp.rotationAxis_),
773 rotationCentre_(
pp.rotationCentre_),
774 separationVector_(
pp.separationVector_),
775 coupledPointsPtr_(nullptr),
776 coupledEdgesPtr_(nullptr)
778 if (neighbName ==
name())
781 <<
"Neighbour patch name " << neighbName
782 <<
" cannot be the same as this patch " <<
name()
801 neighbPatchName_(
pp.neighbPatchName_),
802 coupleGroup_(
pp.coupleGroup_),
804 rotationAxis_(
pp.rotationAxis_),
805 rotationCentre_(
pp.rotationCentre_),
806 separationVector_(
pp.separationVector_),
807 coupledPointsPtr_(nullptr),
808 coupledEdgesPtr_(nullptr)
822 if (neighbPatchName_.empty())
825 label
patchID = coupleGroup_.findOtherPatchID(*
this);
829 return neighbPatchName_;
835 if (neighbPatchID_ == -1)
837 neighbPatchID_ = this->boundaryMesh().findPatchID(neighbPatchName());
839 if (neighbPatchID_ == -1)
842 <<
"Illegal neighbourPatch name " << neighbPatchName()
843 <<
endl <<
"Valid patch names are " 844 << this->boundaryMesh().names()
849 const cyclicPolyPatch& nbrPatch = refCast<const cyclicPolyPatch>
851 this->boundaryMesh()[neighbPatchID_]
854 if (nbrPatch.neighbPatchName() !=
name())
857 <<
"Patch " <<
name()
858 <<
" specifies neighbour patch " << neighbPatchName()
859 <<
endl <<
" but that in return specifies " 860 << nbrPatch.neighbPatchName()
864 return neighbPatchID_;
883 else if (separated())
910 forwardT().size() == 1
924 else if (separated())
928 separation().size() == 1
930 : separation()[facei]
984 neighbPatch().faceCentres(),
985 neighbPatch().faceAreas(),
986 neighbPatch().faceCellCentres()
1021 coupledPointsPtr_.reset(
nullptr);
1022 coupledEdgesPtr_.reset(
nullptr);
1028 if (!coupledPointsPtr_)
1030 const faceList& nbrLocalFaces = neighbPatch().localFaces();
1031 const labelList& nbrMeshPoints = neighbPatch().meshPoints();
1040 forAll(*
this, patchFacei)
1042 const face& fA = localFaces()[patchFacei];
1043 const face& fB = nbrLocalFaces[patchFacei];
1047 label patchPointA = fA[indexA];
1049 if (coupledPoint[patchPointA] == -1)
1051 label indexB = (fB.
size() - indexA) % fB.
size();
1054 if (meshPoints()[patchPointA] != nbrMeshPoints[fB[indexB]])
1056 coupledPoint[patchPointA] = fB[indexB];
1063 auto& connected = *coupledPointsPtr_;
1066 label connectedI = 0;
1070 if (coupledPoint[i] != -1)
1072 connected[connectedI++] = edge(i, coupledPoint[i]);
1076 connected.setSize(connectedI);
1082 boundaryMesh().
mesh().time().
path()
1083 /
name() +
"_coupledPoints.obj" 1087 Pout<<
"Writing file " << str.
name() <<
" with coordinates of " 1088 <<
"coupled points" <<
endl;
1092 const point& a =
points()[meshPoints()[connected[i][0]]];
1093 const point&
b =
points()[nbrMeshPoints[connected[i][1]]];
1095 str<<
"v " << a.x() <<
' ' << a.y() <<
' ' << a.z() <<
nl;
1096 str<<
"v " <<
b.x() <<
' ' <<
b.y() <<
' ' <<
b.z() <<
nl;
1099 str<<
"l " << vertI-1 <<
' ' << vertI <<
nl;
1103 return *coupledPointsPtr_;
1109 if (!coupledEdgesPtr_)
1111 const edgeList& pointCouples = coupledPoints();
1114 Map<label> aToB(2*pointCouples.size());
1116 for (
const edge&
e : pointCouples)
1118 aToB.insert(
e[0],
e[1]);
1122 EdgeMap<label> edgeMap(nEdges());
1124 forAll(*
this, patchFacei)
1126 const labelList& fEdges = faceEdges()[patchFacei];
1128 for (
const label edgeI : fEdges)
1130 const edge&
e = edges()[edgeI];
1133 const auto fnd0 = aToB.cfind(
e[0]);
1136 const auto fnd1 = aToB.cfind(
e[1]);
1139 edgeMap.insert(edge(fnd0(), fnd1()), edgeI);
1147 const cyclicPolyPatch& neighbPatch = this->neighbPatch();
1148 const labelList& nbrMp = neighbPatch.meshPoints();
1152 coupledEdgesPtr_.reset(
new edgeList(edgeMap.size()));
1153 auto& coupledEdges = *coupledEdgesPtr_;
1156 forAll(neighbPatch, patchFacei)
1158 const labelList& fEdges = neighbPatch.faceEdges()[patchFacei];
1160 for (
const label edgeI : fEdges)
1162 const edge&
e = neighbPatch.edges()[edgeI];
1165 auto iter = edgeMap.find(
e);
1169 const label edgeA = iter.val();
1170 const edge& eA = edges()[edgeA];
1175 edge(
mp[eA[0]],
mp[eA[1]])
1176 != edge(nbrMp[
e[0]], nbrMp[
e[1]])
1179 coupledEdges[coupleI++] = edge(edgeA, edgeI);
1183 edgeMap.erase(iter);
1187 coupledEdges.setSize(coupleI);
1194 const edge&
e = coupledEdges[i];
1196 if (
e[0] < 0 ||
e[1] < 0)
1199 <<
"Problem : at position " << i
1200 <<
" illegal couple:" <<
e 1209 boundaryMesh().
mesh().time().
path()
1210 /
name() +
"_coupledEdges.obj" 1214 Pout<<
"Writing file " << str.
name() <<
" with centres of " 1215 <<
"coupled edges" <<
endl;
1217 for (
const edge&
e : coupledEdges)
1219 const point& a = edges()[
e[0]].centre(localPoints());
1220 const point&
b = neighbPatch.edges()[
e[1]].centre
1222 neighbPatch.localPoints()
1225 str<<
"v " << a.x() <<
' ' << a.y() <<
' ' << a.z() <<
nl;
1226 str<<
"v " <<
b.x() <<
' ' <<
b.y() <<
' ' <<
b.z() <<
nl;
1229 str<<
"l " << vertI-1 <<
' ' << vertI <<
nl;
1233 return *coupledEdgesPtr_;
1247 ownerPatchPtr_.reset
1261 PstreamBuffers& pBufs,
1269 Pout<<
"order : of " <<
pp.size()
1270 <<
" faces of patch:" <<
name()
1271 <<
" neighbour:" << neighbPatchName()
1277 rotation.resize_nocopy(
pp.size());
1292 faceMap[patchFacei] = patchFacei;
1305 getCentresAndAnchors
1318 Pout<<
"half0 transformed faceCentres (avg) : " 1320 <<
"half1 untransformed faceCentres (avg) : " 1334 if (!matchedAll ||
debug)
1339 boundaryMesh().
mesh().time().
path()
1340 /neighbPatch().
name()+
"_faces.obj" 1342 Pout<<
"cyclicPolyPatch::order : Writing neighbour" 1343 <<
" faces to OBJ file " << nm0 <<
endl;
1348 boundaryMesh().
mesh().time().
path()
1349 /
name()+
"_faces.obj" 1351 Pout<<
"cyclicPolyPatch::order : Writing my" 1352 <<
" faces to OBJ file " << nm1 <<
endl;
1357 boundaryMesh().
mesh().time().
path()
1358 /
name() +
"_faceCentres.obj" 1360 Pout<<
"cyclicPolyPatch::order : " 1361 <<
"Dumping currently found cyclic match as lines between" 1362 <<
" corresponding face centres to file " << ccStr.
name()
1376 const point&
c1 = half1Ctrs[i];
1385 <<
"Patch:" <<
name() <<
" : " 1386 <<
"Cannot match vectors to faces on both sides of patch" 1388 <<
" Perhaps your faces do not match?" 1389 <<
" The obj files written contain the current match." <<
endl 1390 <<
" Continuing with incorrect face ordering from now on!" 1404 label newFacei =
faceMap[oldFacei];
1406 const point& wantedAnchor = anchors0[newFacei];
1408 rotation[newFacei] = getRotation
1416 if (rotation[newFacei] == -1)
1419 <<
"in patch " <<
name()
1421 <<
"Cannot find point on face " <<
pp[oldFacei]
1422 <<
" with vertices " 1423 << UIndirectList<point>(
pp.
points(),
pp[oldFacei])
1424 <<
" that matches point " << wantedAnchor
1425 <<
" when matching the halves of processor patch " <<
name()
1426 <<
"Continuing with incorrect face ordering from now on!" 1433 ownerPatchPtr_.reset(
nullptr);
1439 if (
faceMap[facei] != facei || rotation[facei] != 0)
1453 if (!neighbPatchName_.empty())
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
label findMax(const ListType &input, label start=0)
Linear search for the index of the max element, similar to std::max_element but for lists and returns...
void size(const label n)
Older name for setAddressableSize.
dimensionedScalar acos(const dimensionedScalar &ds)
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &f1)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1)
virtual void write(Ostream &os) const
Write the polyPatch data as a dictionary.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const edgeList & coupledPoints() const
Return connected points (from patch local to neighbour patch local)
A face is a list of labels corresponding to mesh vertices.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
List< edge > edgeList
List of edge.
Unit conversion functions.
constexpr char nl
The newline '\n' character (0x0a)
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface...
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
cyclicPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType, const transformType transform=UNKNOWN)
Construct from components.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
Smooth ATC in cells next to a set of patches supplied by type.
tensor rotationTensor(const vector &n1, const vector &n2)
Rotational transformation tensor from vector n1 to n2.
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
const edgeList & coupledEdges() const
Return connected edges (from patch local to neighbour patch local).
virtual const fileName & name() const override
Get the name of the output serial stream. (eg, the name of the Fstream file name) ...
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
Determine correspondence between points. See below.
Macros for easy insertion into run-time selection tables.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
virtual void movePoints(PstreamBuffers &, const pointField &p)
Correct patches after moving points.
#define SeriousErrorInFunction
Report an error message using Foam::SeriousError.
#define forAll(list, i)
Loop across all elements in list.
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
List< face > faceList
List of faces.
A list of faces which address into the list of points.
bool matchPoints(const UList< point > &pts0, const UList< point > &pts1, const UList< scalar > &matchDistance, const bool verbose, labelList &from0To1, const point &origin=point::zero)
Determine correspondence between pointFields. Gets passed.
vectorField pointField
pointField is a vectorField.
const dimensionedScalar e
Elementary charge.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
bool good() const noexcept
The patchGroup has a non-empty name.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
const Field< point_type > & points() const noexcept
Return reference to global points.
errorManip< error > abort(error &err)
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO...
const word & name() const noexcept
The patch name.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
int debug
Static debugging option.
OBJstream os(runTime.globalPath()/outputName)
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
defineTypeNameAndDebug(combustionModel, 0)
Buffers for inter-processor communications streams (UOPstream, UIPstream).
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
PrimitivePatch< SubList< face >, const pointField & > primitivePatch
A PrimitivePatch with a SubList addressing for the faces, const reference for the point field...
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
virtual void transformPosition(pointField &l) const
Transform a patch-based position from other side to this side.
virtual ~cyclicPolyPatch()
Destructor.
vector point
Point is a vector.
#define WarningInFunction
Report a warning using Foam::Warning.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Type gAverage(const FieldField< Field, Type > &f)
constexpr scalar radToDeg(const scalar rad) noexcept
Conversion from radians to degrees.
virtual label neighbPatchID() const
Neighbour patchID.
const word & neighbPatchName() const
Neighbour patch name.
const dimensionedScalar c1
First radiation constant: default SI units: [W/m2].
messageStream Info
Information stream (stdout output on master, null elsewhere)
virtual transformType transform() const
Type of transform.
Field< vector > vectorField
Specialisation of Field<T> for vector.
virtual void initOrder(PstreamBuffers &, const primitivePatch &) const
Initialize ordering for primitivePatch. Does not.
List< label > labelList
A List of labels.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
List< bool > boolList
A List of bools.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
const volScalarField & p0
const dimensionedScalar mp
Proton mass.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
virtual void calcTransforms()
Recalculate the transformation tensors.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
static constexpr const zero Zero
Global zero (0)