freeSurfacePointDisplacement.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2019 Zeljko Tukovic, FSB Zagreb.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
30 #include "emptyFaPatch.H"
31 #include "wedgeFaPatch.H"
32 #include "wallFvPatch.H"
34 #include "coordinateSystem.H"
35 #include "unitConversion.H"
36 #include "scalarMatrices.H"
37 #include "tensor2D.H"
38 
39 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
40 
42 Foam::interfaceTrackingFvMesh::pointDisplacement()
43 {
44  const pointField& points = aMesh().patch().localPoints();
46 
47  auto tdisplacement = tmp<vectorField>::New(points.size(), Zero);
48  auto& displacement = tdisplacement.ref();
49 
50  // Calculate displacement of internal points
51  const vectorField& pointNormals = aMesh().pointAreaNormals();
52  const edgeList& edges = aMesh().patch().edges();
53  labelList internalPoints = aMesh().internalPoints();
54 
55  for (const label curPoint : internalPoints)
56  {
57  const labelList& curPointFaces = pointFaces[curPoint];
58 
59  vectorField lsPoints(curPointFaces.size(), Zero);
60 
61  for (label i=0; i<curPointFaces.size(); i++)
62  {
63  label curFace = curPointFaces[i];
64 
65  lsPoints[i] = controlPoints()[curFace];
66  }
67 
68  vectorField pointAndNormal
69  (
70  lsPlanePointAndNormal
71  (
72  lsPoints,
73  points[curPoint],
74  pointNormals[curPoint]
75  )
76  );
77 
78  vector& P = pointAndNormal[0];
79  vector& N = pointAndNormal[1];
80 
81  displacement[curPoint] =
82  pointsDisplacementDir()[curPoint]
83  *((P - points[curPoint])&N)
84  /(pointsDisplacementDir()[curPoint]&N);
85  }
86 
87  // Mirror control points
88  FieldField<Field, vector> patchMirrorPoints(aMesh().boundary().size());
89 
90  // Old faMesh points
92  const labelList& meshPoints = aMesh().patch().meshPoints();
93  forAll(oldPoints, pI)
94  {
95  oldPoints[pI] =
96  mesh().oldPoints()[meshPoints[pI]];
97  }
98 
99  forAll(patchMirrorPoints, patchI)
100  {
101  patchMirrorPoints.set
102  (
103  patchI,
104  new vectorField
105  (
106  aMesh().boundary()[patchI].faPatch::size(),
107  Zero
108  )
109  );
110 
111  vectorField N
112  (
113  aMesh().boundary()[patchI].ngbPolyPatchFaceNormals()
114  );
115 
116  const labelList& eFaces =
117  aMesh().boundary()[patchI].edgeFaces();
118 
119  // Correct N according to specified contact angle
120  if (contactAnglePtr_)
121  {
122  label ngbPolyPatchID =
123  aMesh().boundary()[patchI].ngbPolyPatchIndex();
124 
125  if (ngbPolyPatchID != -1)
126  {
127  if
128  (
129  mesh().boundary()[ngbPolyPatchID].type()
130  == wallFvPatch::typeName
131  )
132  {
133  // Info<< aMesh().boundary()[patchI].name() << endl;
134 
135  scalar rotAngle = degToRad
136  (
137  gAverage
138  (
139  90
140  - contactAnglePtr_->boundaryField()[patchI]
141  )
142  );
143 
144  const vectorField& pEdgN =
145  aMesh().edgeAreaNormals().boundaryField()[patchI];
146 
147  vectorField rotationAxis( N^pEdgN );
148 
149  const edgeList::subList patchEdges =
150  aMesh().boundary()[patchI].patchSlice(aMesh().edges());
151 
152  forAll(rotationAxis, edgeI)
153  {
154  vector e = patchEdges[edgeI].vec(oldPoints);
155  // vector e = patchEdges[edgeI].vec(aMesh().points());
156 
157  // Adjust direction
158  rotationAxis[edgeI] =
159  e*(e&rotationAxis[edgeI])
160  /mag((e&rotationAxis[edgeI]));
161  }
162  rotationAxis /= mag(rotationAxis) + SMALL;
163 
164  vectorField rotationAxis2 = rotationAxis;
165  forAll(rotationAxis2, edgeI)
166  {
167  rotationAxis2[edgeI] =
168  (N[edgeI]^facesDisplacementDir()[eFaces[edgeI]]);
169 
170  // Adjust direction
171  rotationAxis2[edgeI] =
172  rotationAxis2[edgeI]
173  *(rotationAxis2[edgeI]&rotationAxis[edgeI])
174  /(
175  mag((rotationAxis2[edgeI]&rotationAxis[edgeI]))
176  + SMALL
177  );
178  }
179  rotationAxis2 /= mag(rotationAxis2) + SMALL;
180 
181  // Rodrigues' rotation formula
182  N = N*cos(rotAngle)
183  + rotationAxis*(rotationAxis & N)*(1 - cos(rotAngle))
184  + (rotationAxis^N)*sin(rotAngle);
185 
186  N /= mag(N) + SMALL;
187 
188  N = (rotationAxis^N);
189 
190  N = (N^rotationAxis2);
191 
192  N /= mag(N) + SMALL;
193 
194  // Info<< N << endl;
195  }
196  }
197  }
198 
199  const labelList peFaces =
201  (
202  aMesh().edgeOwner(),
203  aMesh().boundary()[patchI].faPatch::size(),
204  aMesh().boundary()[patchI].start()
205  );
206 
207  const labelList& pEdges = aMesh().boundary()[patchI];
208 
209  vectorField peCentres(pEdges.size(), Zero);
210  forAll(peCentres, edgeI)
211  {
212  peCentres[edgeI] =
213  edges[pEdges[edgeI]].centre(points);
214  }
215 
217  (
218  vectorField(controlPoints(), peFaces)
219  - peCentres
220  );
221 
222  // Info<< aMesh().boundary()[patchI].name() << endl;
223  // Info<< vectorField(controlPoints(), peFaces) << endl;
224 
225  patchMirrorPoints[patchI] =
226  peCentres + ((I - 2*N*N)&delta);
227 
228  // Info<< patchMirrorPoints[patchI] << endl;
229  }
230 
231  // Calculate displacement of boundary points
232  labelList boundaryPoints = aMesh().boundaryPoints();
233 
236 
237  for (const label curPoint : boundaryPoints)
238  {
239  if (motionPointsMask()[curPoint] == 1)
240  {
241  // Calculating mirror points
242  const labelList& curPointEdges = pointEdges[curPoint];
243 
244  vectorField mirrorPoints(2, Zero);
245 
246  label counter = -1;
247 
248  forAll(curPointEdges, edgeI)
249  {
250  label curEdge = curPointEdges[edgeI];
251 
252  if(edgeFaces[curEdge].size() == 1)
253  {
254  label patchID = -1;
255  label edgeID = -1;
256  forAll(aMesh().boundary(), patchI)
257  {
258  const labelList& pEdges =
259  aMesh().boundary()[patchI];
260  label index = pEdges.find(curEdge);
261  if (index != -1)
262  {
263  patchID = patchI;
264  edgeID = index;
265  break;
266  }
267  }
268 
269  mirrorPoints[++counter] =
270  patchMirrorPoints[patchID][edgeID];
271  }
272  }
273 
274  // Calculating LS plane fit
275  const labelList& curPointFaces = pointFaces[curPoint];
276 
277  vectorField lsPoints
278  (
279  curPointFaces.size() + mirrorPoints.size(),
280  Zero
281  );
282 
283  counter = -1;
284 
285  for (label i=0; i<curPointFaces.size(); i++)
286  {
287  label curFace = curPointFaces[i];
288 
289  lsPoints[++counter] = controlPoints()[curFace];
290  }
291 
292  for (label i=0; i<mirrorPoints.size(); i++)
293  {
294  lsPoints[++counter] = mirrorPoints[i];
295  }
296 
297  vectorField pointAndNormal
298  (
299  lsPlanePointAndNormal
300  (
301  lsPoints,
302  points[curPoint],
303  pointNormals[curPoint]
304  )
305  );
306 
307  vector& P = pointAndNormal[0];
308  vector& N = pointAndNormal[1];
309 
310  displacement[curPoint] =
311  pointsDisplacementDir()[curPoint]
312  *((P - points[curPoint])&N)
313  /(pointsDisplacementDir()[curPoint]&N);
314  }
315  }
316 
317  // Calculate displacement of processor patch points
318  forAll(aMesh().boundary(), patchI)
319  {
320  if
321  (
322  aMesh().boundary()[patchI].type()
323  == processorFaPatch::typeName
324  )
325  {
326  const processorFaPatch& procPatch =
327  refCast<const processorFaPatch>(aMesh().boundary()[patchI]);
328 
329  const labelList& patchPointLabels =
330  procPatch.pointLabels();
331 
332  FieldField<Field, vector> lsPoints(patchPointLabels.size());
333  forAll(lsPoints, pointI)
334  {
335  lsPoints.set(pointI, new vectorField(0, Zero));
336  }
337 
338  const labelList& nonGlobalPatchPoints =
339  procPatch.nonGlobalPatchPoints();
340 
341  forAll(nonGlobalPatchPoints, pointI)
342  {
343  label curPatchPoint =
344  nonGlobalPatchPoints[pointI];
345 
346  label curPoint =
347  patchPointLabels[curPatchPoint];
348 
349  const labelList& curPointFaces = pointFaces[curPoint];
350 
351  lsPoints[curPatchPoint].setSize(curPointFaces.size());
352 
353  forAll(curPointFaces, faceI)
354  {
355  label curFace = curPointFaces[faceI];
356 
357  lsPoints[curPatchPoint][faceI] = controlPoints()[curFace];
358  }
359 
361  }
362 
363  // Parallel data exchange
364  {
365  OPstream toNeighbProc
366  (
368  procPatch.neighbProcNo()
369  );
370 
371  toNeighbProc << lsPoints;
372  }
373 
374  FieldField<Field, vector> ngbLsPoints(patchPointLabels.size());
375  {
376  IPstream fromNeighbProc
377  (
379  procPatch.neighbProcNo()
380  );
381 
382  fromNeighbProc >> ngbLsPoints;
383  }
384 
385  forAll(nonGlobalPatchPoints, pointI)
386  {
387  label curPatchPoint =
388  nonGlobalPatchPoints[pointI];
389 
390  label curPoint =
391  patchPointLabels[curPatchPoint];
392 
393  label curNgbPoint = procPatch.neighbPoints()[curPatchPoint];
394 
395  vectorField allLsPoints
396  (
397  lsPoints[curPatchPoint].size()
398  + ngbLsPoints[curNgbPoint].size(),
399  Zero
400  );
401 
402  label counter = -1;
403  forAll(lsPoints[curPatchPoint], pointI)
404  {
405  allLsPoints[++counter] = lsPoints[curPatchPoint][pointI];
406  }
407  forAll(ngbLsPoints[curNgbPoint], pointI)
408  {
409  allLsPoints[++counter] = ngbLsPoints[curNgbPoint][pointI];
410  }
411 
412  vectorField pointAndNormal
413  (
414  lsPlanePointAndNormal
415  (
416  allLsPoints,
417  points[curPoint],
418  pointNormals[curPoint]
419  )
420  );
421 
422  vector& P = pointAndNormal[0];
423  vector& N = pointAndNormal[1];
424 
425  if (motionPointsMask()[curPoint] != 0)
426  {
427  displacement[curPoint] =
428  pointsDisplacementDir()[curPoint]
429  *((P - points[curPoint])&N)
430  /(pointsDisplacementDir()[curPoint]&N);
431  }
432  }
433  }
434  }
435 
436 
437  // Calculate displacement of global processor patch points
438  if (aMesh().globalData().nGlobalPoints() > 0)
439  {
440  const labelList& spLabels =
442 
443  const labelList& addr = aMesh().globalData().sharedPointAddr();
444 
445  for (label k=0; k<aMesh().globalData().nGlobalPoints(); k++)
446  {
447  List<List<vector>> procLsPoints(Pstream::nProcs());
448 
449  label curSharedPointIndex = addr.find(k);
450 
451  if (curSharedPointIndex != -1)
452  {
453  label curPoint = spLabels[curSharedPointIndex];
454 
455  const labelList& curPointFaces = pointFaces[curPoint];
456 
457  procLsPoints[Pstream::myProcNo()] =
458  List<vector>(curPointFaces.size());
459 
460  forAll(curPointFaces, faceI)
461  {
462  label curFace = curPointFaces[faceI];
463 
464  procLsPoints[Pstream::myProcNo()][faceI] =
465  controlPoints()[curFace];
466  }
467  }
468 
469  Pstream::gatherList(procLsPoints);
470  Pstream::scatterList(procLsPoints);
471 
472  if (curSharedPointIndex != -1)
473  {
474  label curPoint = spLabels[curSharedPointIndex];
475 
476  label nAllPoints = 0;
477  forAll(procLsPoints, procI)
478  {
479  nAllPoints += procLsPoints[procI].size();
480  }
481 
482  vectorField allPoints(nAllPoints, Zero);
483 
484  label counter = 0;
485  forAll(procLsPoints, procI)
486  {
487  forAll(procLsPoints[procI], pointI)
488  {
489  allPoints[counter++] =
490  procLsPoints[procI][pointI];
491  }
492  }
493 
494  vectorField pointAndNormal
495  (
496  lsPlanePointAndNormal
497  (
498  allPoints,
499  points[curPoint],
500  pointNormals[curPoint]
501  )
502  );
503 
504  const vector& P = pointAndNormal[0];
505  const vector& N = pointAndNormal[1];
506 
507  displacement[curPoint] =
508  pointsDisplacementDir()[curPoint]
509  *((P - points[curPoint])&N)
510  /(pointsDisplacementDir()[curPoint]&N);
511  }
512  }
513  }
514 
515  return tdisplacement;
516 }
517 
518 
520 Foam::interfaceTrackingFvMesh::lsPlanePointAndNormal
521 (
522  const vectorField& points,
523  const vector& origin,
524  const vector& axis
525 ) const
526 {
527  // LS in local CS
528  vector dir = (points[0] - origin);
529  dir -= axis*(axis&dir);
530  dir /= mag(dir);
531  coordinateSystem cs("cs", origin, axis, dir);
532 
533  vectorField localPoints(cs.localPosition(points));
534  vector avgLocalPoint = average(localPoints);
535 
536  // scalarField W = 1.0/(mag(points - origin) + SMALL);
537  scalarField W(points.size(), scalar(1));
538 
539  const label nCoeffs = 2;
540  scalarRectangularMatrix M(points.size(), nCoeffs, Zero);
541 
542  scalar L = 2*max(mag(localPoints-avgLocalPoint));
543  for (label i=0; i<localPoints.size(); i++)
544  {
545  M[i][0] = (localPoints[i].x() - avgLocalPoint.x())/L;
546  M[i][1] = (localPoints[i].y() - avgLocalPoint.y())/L;
547  }
548 
549  // Applying weights
550  for (label i=0; i<M.n(); i++)
551  {
552  for (label j=0; j<M.m(); j++)
553  {
554  M[i][j] *= W[i];
555  }
556  }
557 
558  tensor2D lsM(Zero);
559  // scalarSquareMatrix lsM(nCoeffs, Zero);
560 
561  for (label i=0; i<nCoeffs; i++)
562  {
563  for (label j=0; j<nCoeffs; j++)
564  {
565  for (label k=0; k<M.n(); k++)
566  {
567  lsM[i*nCoeffs+j] += M[k][i]*M[k][j];
568  // lsM(i,j) += M[k][i]*M[k][j];
569  }
570  }
571  }
572 
573  // Calculate inverse
574  tensor2D invLsM = inv(lsM);
575 
576  scalarRectangularMatrix curInvMatrix(nCoeffs, points.size(), Zero);
577 
578  for (label i=0; i<nCoeffs; i++)
579  {
580  for (label j=0; j<M.n(); j++)
581  {
582  for (label k=0; k<nCoeffs; k++)
583  {
584  curInvMatrix[i][j] += invLsM[i*nCoeffs+k]*M[j][k]*W[j];
585  // curInvMatrix[i][j] += invLsM[i][k]*M[j][k]*W[j];
586  }
587  }
588  }
589 
590  scalarField coeffs(nCoeffs, Zero);
591  scalarField source(points.size(), Zero);
592 
593  for (label i=0; i<points.size(); i++)
594  {
595  source[i] = (localPoints[i].z() - avgLocalPoint.z())/L;
596  }
597 
598  for (label i=0; i<nCoeffs; i++)
599  {
600  for (label j=0; j<source.size(); j++)
601  {
602  coeffs[i] += curInvMatrix[i][j]*source[j];
603  }
604  }
605 
606  vector n0(-coeffs[0], -coeffs[1], 1.0);
607  n0 = cs.globalVector(n0);
608  n0 /= mag(n0);
609 
610  vector p0 = avgLocalPoint;
611  p0 = cs.globalPosition(p0);
612 
613  auto tpointAndNormal = tmp<vectorField>::New(2);
614  auto& pointAndNormal = tpointAndNormal.ref();
615 
616  pointAndNormal[0] = p0;
617  pointAndNormal[1] = n0;
618 
619  return tpointAndNormal;
620 }
621 
622 
623 // ************************************************************************* //
Foam::HashTable< regIOobject * >::size
label size() const noexcept
The number of elements in table.
Definition: HashTableI.H:52
Foam::polyMesh::points
virtual const pointField & points() const
Return raw points.
Definition: polyMesh.C:1069
L
const vector L(dict.get< vector >("L"))
Foam::interfaceTrackingFvMesh::aMesh
faMesh & aMesh()
Return reference to finite area mesh.
Definition: interfaceTrackingFvMesh.H:288
Foam::PrimitivePatch::pointFaces
const labelListList & pointFaces() const
Return point-face addressing.
Definition: PrimitivePatch.C:301
Foam::faGlobalMeshData::sharedPointLabels
const labelList & sharedPointLabels() const
Return indices of local points that are globally shared.
Definition: faGlobalMeshData.H:112
Foam::PrimitivePatch::edgeFaces
const labelListList & edgeFaces() const
Return edge-face addressing.
Definition: PrimitivePatch.C:262
Foam::FieldField
A field of fields is a PtrList of fields with reference counting.
Definition: FieldField.H:53
Foam::PrimitivePatch::edges
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
Definition: PrimitivePatch.C:183
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::gAverage
Type gAverage(const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:604
Foam::OPstream
Output inter-processor communications stream.
Definition: OPstream.H:53
Foam::Pstream::scatterList
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
Definition: gatherScatterList.C:215
Foam::sin
dimensionedScalar sin(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:264
Foam::primitiveMesh::edgeFaces
const labelListList & edgeFaces() const
Definition: primitiveMeshEdgeFaces.C:34
Foam::SubList
A List obtained as a section of another List.
Definition: SubList.H:54
Foam::primitiveMesh::pointFaces
const labelListList & pointFaces() const
Definition: primitiveMeshPointFaces.C:34
Foam::faMesh::internalPoints
labelList internalPoints() const
Return internal point labels.
Definition: faMeshDemandDrivenData.C:857
wallFvPatch.H
Foam::processorFaPatch::neighbProcNo
int neighbProcNo() const noexcept
Return neighbour processor number.
Definition: processorFaPatch.H:191
tensor2D.H
unitConversion.H
Unit conversion functions.
Foam::faBoundaryMesh::edgeFaces
UPtrList< const labelUList > edgeFaces() const
Return a list of edgeFaces for each patch.
Definition: faBoundaryMesh.C:153
primitivePatchInterpolation.H
Foam::faMesh::pointAreaNormals
const vectorField & pointAreaNormals() const
Return point area normals.
Definition: faMesh.C:704
Foam::primitiveMesh::edges
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
Definition: primitiveMeshEdges.C:505
Foam::primitiveMesh::pointEdges
const labelListList & pointEdges() const
Definition: primitiveMeshEdges.C:516
coordinateSystem.H
Foam::primitiveMesh::nPoints
label nPoints() const noexcept
Number of mesh points.
Definition: primitiveMeshI.H:37
edgeID
label edgeID
Definition: boundaryProcessorFaPatchPoints.H:6
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:296
Foam::vectorField
Field< vector > vectorField
Specialisation of Field<T> for vector.
Definition: primitiveFieldsFwd.H:54
Foam::faMesh::globalData
const faGlobalMeshData & globalData() const
Return parallel info.
Definition: faMesh.C:752
Foam::Tensor2D
A templated (2 x 2) tensor of objects of <T> derived from VectorSpace.
Definition: Tensor2D.H:59
PstreamCombineReduceOps.H
Combination-Reduction operation for a parallel run. The information from all nodes is collected on th...
Foam::processorFaPatch
Processor patch.
Definition: processorFaPatch.H:56
Foam::tmp::ref
T & ref() const
Definition: tmpI.H:227
Foam::interfaceTrackingFvMesh::mesh
fvMesh & mesh()
Definition: interfaceTrackingFvMesh.H:277
Foam::faGlobalMeshData::sharedPointAddr
const labelList & sharedPointAddr() const
Return addressing into the complete globally shared points.
Definition: faGlobalMeshData.H:119
Foam::Field< vector >
boundaryProcessorFaPatchPoints.H
Foam::processorFaPatch::neighbPoints
const labelList & neighbPoints() const
Return neighbour point labels. This is for my local point the.
Definition: processorFaPatch.C:341
Foam::inv
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
Definition: dimensionedSphericalTensor.C:73
Foam::List::setSize
void setSize(const label n)
Alias for resize()
Definition: List.H:222
Foam::interfaceTrackingFvMesh::pointsDisplacementDir
vectorField & pointsDisplacementDir()
Return reference to point displacement direction field.
Definition: interfaceTrackingFvMesh.C:1929
Foam::PrimitivePatch::pointEdges
const labelListList & pointEdges() const
Return point-edge addressing.
Definition: PrimitivePatch.C:288
patchID
label patchID
Definition: boundaryProcessorFaPatchPoints.H:5
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
Foam::RectangularMatrix< scalar >
Foam::polyMesh::oldPoints
virtual const pointField & oldPoints() const
Return old points (mesh motion)
Definition: polyMesh.C:1119
Foam::List::subList
SubList< T > subList
Declare type of subList.
Definition: List.H:112
interfaceTrackingFvMesh.H
Foam::faMesh::boundary
const faBoundaryMesh & boundary() const noexcept
Return constant reference to boundary mesh.
Definition: faMeshI.H:38
Foam::degToRad
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
Definition: unitConversion.H:48
Foam::faMesh::edgeAreaNormals
const edgeVectorField & edgeAreaNormals() const
Return edge area normals.
Definition: faMesh.C:693
Foam::faMesh::boundaryPoints
labelList boundaryPoints() const
Return boundary point labels.
Definition: faMeshDemandDrivenData.C:869
Foam::PrimitivePatch::localPoints
const Field< point_type > & localPoints() const
Return pointField of points in patch.
Definition: PrimitivePatch.C:359
Foam::fvMesh::boundary
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
Definition: fvMesh.C:685
Foam::faPatch::pointLabels
const labelList & pointLabels() const
Return patch point labels.
Definition: faPatch.C:202
Foam::interfaceTrackingFvMesh::motionPointsMask
labelList & motionPointsMask()
Return reference to motion points mask field.
Definition: interfaceTrackingFvMesh.C:1918
Foam::processorFaPatch::nonGlobalPatchPoints
const labelList & nonGlobalPatchPoints() const
Return the set of labels of the processor patch points which are.
Definition: processorFaPatch.C:442
Foam::Pstream::gatherList
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
Definition: gatherScatterList.C:52
Foam::UPstream::myProcNo
static int myProcNo(const label communicator=worldComm)
Number of this process (starting from masterNo() = 0)
Definition: UPstream.H:463
Foam::Vector< scalar >
Foam::List< labelList >
Foam::mag
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
M
#define M(I)
points
const pointField & points
Definition: gmvOutputHeader.H:1
k
label k
Boltzmann constant.
Definition: LISASMDCalcMethod2.H:41
Foam::constant::electromagnetic::e
const dimensionedScalar e
Elementary charge.
Definition: createFields.H:11
Foam::interfaceTrackingFvMesh::facesDisplacementDir
vectorField & facesDisplacementDir()
Return reference to control points displacement direction field.
Definition: interfaceTrackingFvMesh.C:1940
Foam::tmp::New
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
scalarMatrices.H
Foam::IPstream
Input inter-processor communications stream.
Definition: IPstream.H:53
Foam::DelaunayMeshTools::allPoints
tmp< pointField > allPoints(const Triangulation &t)
Extract all points in vertex-index order.
Foam::interfaceTrackingFvMesh::controlPoints
vectorField & controlPoints()
Return control points.
Definition: interfaceTrackingFvMesh.C:1907
N
const Vector< label > N(dict.get< Vector< label >>("N"))
p0
const volScalarField & p0
Definition: EEqn.H:36
Foam::PrimitivePatch::meshPoints
const labelList & meshPoints() const
Return labelList of mesh points in patch.
Definition: PrimitivePatch.C:330
Foam::faGlobalMeshData::nGlobalPoints
label nGlobalPoints() const
Return number of globally shared points.
Definition: faGlobalMeshData.H:106
emptyFaPatch.H
wedgeFaPatch.H
Foam::faMesh::patch
const uindirectPrimitivePatch & patch() const
Return constant reference to primitive patch.
Definition: faMeshI.H:122
Foam::fvMesh::delta
tmp< surfaceVectorField > delta() const
Return face deltas as surfaceVectorField.
Definition: fvMeshGeometry.C:363
Foam::UPstream::nProcs
static label nProcs(const label communicator=worldComm)
Number of processes in parallel run, and 1 for serial run.
Definition: UPstream.H:445
Foam::GeometricField::boundaryField
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Definition: GeometricFieldI.H:62
Foam::I
static const Identity< scalar > I
Definition: Identity.H:95
Foam::average
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
Definition: DimensionedFieldFunctions.C:328
Foam::coordinateSystem
Base class for coordinate system specification, the default coordinate system type is cartesian .
Definition: coordinateSystem.H:132
Foam::UPstream::commsTypes::blocking
Foam::cos
dimensionedScalar cos(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:265
Foam::faPatch::size
virtual label size() const
Patch size is the number of edge labels.
Definition: faPatch.H:264