edgeInterpolation.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) 2016-2017 Wikki Ltd
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 
28 #include "faMesh.H"
29 #include "areaFields.H"
30 #include "edgeFields.H"
31 #include "demandDrivenData.H"
32 #include "faPatchFields.H"
33 
34 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
35 
36 namespace Foam
37 {
38  defineTypeNameAndDebug(edgeInterpolation, 0);
39 }
40 
41 // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
42 
44 {
46  deleteDemandDrivenData(weightingFactors_);
47  deleteDemandDrivenData(differenceFactors_);
48  deleteDemandDrivenData(correctionVectors_);
49  deleteDemandDrivenData(skewCorrectionVectors_);
50 // deleteDemandDrivenData(leastSquarePvectors_);
51 // deleteDemandDrivenData(leastSquareNvectors_);
52 }
53 
54 
55 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
56 
58 :
59  faMesh_(fam),
60  lPN_(nullptr),
61  weightingFactors_(nullptr),
62  differenceFactors_(nullptr),
63  orthogonal_(false),
64  correctionVectors_(nullptr),
65  skew_(true),
66  skewCorrectionVectors_(nullptr)
67 // leastSquarePvectors_(nullptr),
68 // leastSquareNvectors_(nullptr)
69 {}
70 
71 
72 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
73 
75 {
76  clearOut();
77 }
78 
79 
80 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
81 
83 {
84  if (!lPN_)
85  {
86  makeLPN();
87  }
88 
89  return (*lPN_);
90 }
91 
92 
94 {
95  if (!weightingFactors_)
96  {
97  makeWeights();
98  }
99 
100  return (*weightingFactors_);
101 }
102 
103 
105 {
106  if (!differenceFactors_)
107  {
108  makeDeltaCoeffs();
109  }
110 
111  return (*differenceFactors_);
112 }
113 
114 
116 {
117  if (orthogonal_ == false && !correctionVectors_)
118  {
119  makeCorrectionVectors();
120  }
121 
122  return orthogonal_;
123 }
124 
125 
127 {
128  if (orthogonal())
129  {
131  << "cannot return correctionVectors; mesh is orthogonal"
132  << abort(FatalError);
133  }
134 
135  return (*correctionVectors_);
136 }
137 
138 
140 {
141  if (skew_ == true && !skewCorrectionVectors_)
142  {
143  makeSkewCorrectionVectors();
144  }
145 
146  return skew_;
147 }
148 
149 
152 {
153  if (!skew())
154  {
156  << "cannot return skewCorrectionVectors; mesh is now skewed"
157  << abort(FatalError);
158  }
159 
160  return (*skewCorrectionVectors_);
161 }
162 
163 
164 // const Foam::edgeVectorField&
165 // Foam::edgeInterpolation::leastSquarePvectors() const
166 // {
167 // if (!leastSquarePvectors_)
168 // {
169 // makeLeastSquareVectors();
170 // }
171 //
172 // return (*leastSquarePvectors_);
173 // }
174 
175 
176 // const Foam::edgeVectorField&
177 // Foam::edgeInterpolation::leastSquareNvectors() const
178 // {
179 // if (!leastSquareNvectors_)
180 // {
181 // makeLeastSquareVectors();
182 // }
183 //
184 // return (*leastSquareNvectors_);
185 // }
186 
187 
189 {
191  deleteDemandDrivenData(weightingFactors_);
192  deleteDemandDrivenData(differenceFactors_);
193 
194  orthogonal_ = false;
195  deleteDemandDrivenData(correctionVectors_);
196 
197  skew_ = true;
198  deleteDemandDrivenData(skewCorrectionVectors_);
199 
200 // deleteDemandDrivenData(leastSquarePvectors_);
201 // deleteDemandDrivenData(leastSquareNvectors_);
202 
203  return true;
204 }
205 
206 
207 void Foam::edgeInterpolation::makeLPN() const
208 {
210  << "Constructing geodesic distance between points P and N"
211  << endl;
212 
213 
214  lPN_ = new edgeScalarField
215  (
216  IOobject
217  (
218  "lPN",
219  faMesh_.time().constant(),
220  faMesh_(),
223  false
224  ),
225  mesh(),
226  dimLength
227  );
228  edgeScalarField& lPN = *lPN_;
229 
230  // Set local references to mesh data
231  const edgeVectorField& edgeCentres = mesh().edgeCentres();
232  const areaVectorField& faceCentres = mesh().areaCentres();
233  const labelUList& owner = mesh().owner();
234  const labelUList& neighbour = mesh().neighbour();
235 
236  scalarField& lPNIn = lPN.primitiveFieldRef();
237 
238  forAll(owner, edgeI)
239  {
240  vector curSkewCorrVec(Zero);
241 
242  if (skew())
243  {
244  curSkewCorrVec = skewCorrectionVectors()[edgeI];
245  }
246 
247  scalar lPE =
248  mag
249  (
250  edgeCentres[edgeI]
251  - curSkewCorrVec
252  - faceCentres[owner[edgeI]]
253  );
254 
255  scalar lEN =
256  mag
257  (
258  faceCentres[neighbour[edgeI]]
259  - edgeCentres[edgeI]
260  + curSkewCorrVec
261  );
262 
263  lPNIn[edgeI] = (lPE + lEN);
264  }
265 
266 
267  forAll(lPN.boundaryField(), patchI)
268  {
269  mesh().boundary()[patchI].makeDeltaCoeffs
270  (
271  lPN.boundaryFieldRef()[patchI]
272  );
273 
274  lPN.boundaryFieldRef()[patchI] = 1.0/lPN.boundaryField()[patchI];
275  }
276 
277 
279  << "Finished constructing geodesic distance PN"
280  << endl;
281 }
282 
283 
284 void Foam::edgeInterpolation::makeWeights() const
285 {
287  << "Constructing weighting factors for edge interpolation"
288  << endl;
289 
290 
291  weightingFactors_ = new edgeScalarField
292  (
293  IOobject
294  (
295  "weightingFactors",
296  mesh()().pointsInstance(),
297  mesh()(),
300  false
301  ),
302  mesh(),
303  dimless
304  );
305  edgeScalarField& weightingFactors = *weightingFactors_;
306 
307 
308  // Set local references to mesh data
309  const edgeVectorField& edgeCentres = mesh().edgeCentres();
310  const areaVectorField& faceCentres = mesh().areaCentres();
311  const labelUList& owner = mesh().owner();
312  const labelUList& neighbour = mesh().neighbour();
313 
314  scalarField& weightingFactorsIn = weightingFactors.primitiveFieldRef();
315 
316  forAll(owner, edgeI)
317  {
318  vector curSkewCorrVec(Zero);
319 
320  if (skew())
321  {
322  curSkewCorrVec = skewCorrectionVectors()[edgeI];
323  }
324 
325  scalar lPE =
326  mag
327  (
328  edgeCentres[edgeI]
329  - curSkewCorrVec
330  - faceCentres[owner[edgeI]]
331  );
332 
333  scalar lEN =
334  mag
335  (
336  faceCentres[neighbour[edgeI]]
337  - edgeCentres[edgeI]
338  + curSkewCorrVec
339  );
340 
341  weightingFactorsIn[edgeI] =
342  lEN
343  /(
344  lPE
345 # ifdef BAD_MESH_STABILISATION
346  + VSMALL
347 # endif
348  + lEN
349  );
350  }
351 
352  forAll(mesh().boundary(), patchI)
353  {
354  mesh().boundary()[patchI].makeWeights
355  (
356  weightingFactors.boundaryFieldRef()[patchI]
357  );
358  }
359 
361  << "Finished constructing weighting factors for face interpolation"
362  << endl;
363 }
364 
365 
366 void Foam::edgeInterpolation::makeDeltaCoeffs() const
367 {
369  << "Constructing differencing factors array for edge gradient"
370  << endl;
371 
372  // Force the construction of the weighting factors
373  // needed to make sure deltaCoeffs are calculated for parallel runs.
374  weights();
375 
376  differenceFactors_ = new edgeScalarField
377  (
378  IOobject
379  (
380  "differenceFactors_",
381  mesh()().pointsInstance(),
382  mesh()(),
385  false
386  ),
387  mesh(),
389  );
390  edgeScalarField& DeltaCoeffs = *differenceFactors_;
391  scalarField& dc = DeltaCoeffs.primitiveFieldRef();
392 
393  // Set local references to mesh data
394  const edgeVectorField& edgeCentres = mesh().edgeCentres();
395  const areaVectorField& faceCentres = mesh().areaCentres();
396  const labelUList& owner = mesh().owner();
397  const labelUList& neighbour = mesh().neighbour();
398  const edgeVectorField& lengths = mesh().Le();
399 
400  const edgeList& edges = mesh().edges();
401  const pointField& points = mesh().points();
402 
403 
404  forAll(owner, edgeI)
405  {
406  // Edge normal - area normal
407  vector edgeNormal =
408  normalised(lengths[edgeI] ^ edges[edgeI].vec(points));
409 
410  // Unit delta vector
411  vector unitDelta =
412  faceCentres[neighbour[edgeI]]
413  - faceCentres[owner[edgeI]];
414 
415  unitDelta -= edgeNormal*(edgeNormal & unitDelta);
416  unitDelta.normalise();
417 
418 
419  // Calc PN arc length
420  vector curSkewCorrVec(Zero);
421 
422  if (skew())
423  {
424  curSkewCorrVec = skewCorrectionVectors()[edgeI];
425  }
426 
427  scalar lPE =
428  mag
429  (
430  edgeCentres[edgeI]
431  - curSkewCorrVec
432  - faceCentres[owner[edgeI]]
433  );
434 
435  scalar lEN =
436  mag
437  (
438  faceCentres[neighbour[edgeI]]
439  - edgeCentres[edgeI]
440  + curSkewCorrVec
441  );
442 
443  scalar lPN = lPE + lEN;
444 
445 
446  // Edge normal - area tangent
447  edgeNormal = normalised(lengths[edgeI]);
448 
449  // Delta coefficient as per definition
450 // dc[edgeI] = 1.0/(lPN*(unitDelta & edgeNormal));
451 
452  // Stabilised form for bad meshes. HJ, 23/Jul/2009
453  dc[edgeI] = 1.0/max((lPN*(unitDelta & edgeNormal)), 0.05*lPN);
454  }
455 
456 
457  forAll(DeltaCoeffs.boundaryField(), patchI)
458  {
459  mesh().boundary()[patchI].makeDeltaCoeffs
460  (
461  DeltaCoeffs.boundaryFieldRef()[patchI]
462  );
463  }
464 }
465 
466 
467 void Foam::edgeInterpolation::makeCorrectionVectors() const
468 {
470  << "Constructing non-orthogonal correction vectors"
471  << endl;
472 
473  correctionVectors_ = new edgeVectorField
474  (
475  IOobject
476  (
477  "correctionVectors",
478  mesh()().pointsInstance(),
479  mesh()(),
482  false
483  ),
484  mesh(),
485  dimless
486  );
487  edgeVectorField& CorrVecs = *correctionVectors_;
488 
489  // Set local references to mesh data
490  const areaVectorField& faceCentres = mesh().areaCentres();
491 
492  const labelUList& owner = mesh().owner();
493  const labelUList& neighbour = mesh().neighbour();
494 
495  const edgeVectorField& lengths = mesh().Le();
496 
497  const edgeList& edges = mesh().edges();
498  const pointField& points = mesh().points();
499 
500  scalarField deltaCoeffs(owner.size());
501 
502  vectorField& CorrVecsIn = CorrVecs.primitiveFieldRef();
503 
504  forAll(owner, edgeI)
505  {
506  // Edge normal - area normal
507  vector edgeNormal =
508  normalised(lengths[edgeI] ^ edges[edgeI].vec(points));
509 
510  // Unit delta vector
511  vector unitDelta =
512  faceCentres[neighbour[edgeI]]
513  - faceCentres[owner[edgeI]];
514 
515  unitDelta -= edgeNormal*(edgeNormal & unitDelta);
516  unitDelta.normalise();
517 
518  // Edge normal - area tangent
519  edgeNormal = normalised(lengths[edgeI]);
520 
521  // Delta coeffs
522  deltaCoeffs[edgeI] = 1.0/(unitDelta & edgeNormal);
523 
524  // Edge correction vector
525  CorrVecsIn[edgeI] =
526  edgeNormal
527  - deltaCoeffs[edgeI]*unitDelta;
528  }
529 
530  edgeVectorField::Boundary& CorrVecsbf = CorrVecs.boundaryFieldRef();
531  for (faePatchVectorField& patchCorrVecs : CorrVecsbf)
532  {
533  patchCorrVecs = vector::zero;
534  }
535 
536  scalar NonOrthogCoeff = 0.0;
537 
538  if (owner.size() > 0)
539  {
540  scalarField sinAlpha(deltaCoeffs*mag(CorrVecs.internalField()));
541 
542  forAll(sinAlpha, edgeI)
543  {
544  sinAlpha[edgeI] = max(-1, min(sinAlpha[edgeI], 1));
545  }
546 
547  NonOrthogCoeff = max(Foam::asin(sinAlpha)*180.0/M_PI);
548  }
549 
550  reduce(NonOrthogCoeff, maxOp<scalar>());
551 
553  << "non-orthogonality coefficient = " << NonOrthogCoeff << " deg."
554  << endl;
555 
556  if (NonOrthogCoeff < 0.1)
557  {
558  orthogonal_ = true;
559  deleteDemandDrivenData(correctionVectors_);
560  }
561  else
562  {
563  orthogonal_ = false;
564  }
565 
567  << "Finished constructing non-orthogonal correction vectors"
568  << endl;
569 }
570 
571 
572 void Foam::edgeInterpolation::makeSkewCorrectionVectors() const
573 {
575  << "Constructing skew correction vectors"
576  << endl;
577 
578  skewCorrectionVectors_ = new edgeVectorField
579  (
580  IOobject
581  (
582  "skewCorrectionVectors",
583  mesh()().pointsInstance(),
584  mesh()(),
587  false
588  ),
589  mesh(),
590  dimless
591  );
592  edgeVectorField& SkewCorrVecs = *skewCorrectionVectors_;
593 
594  // Set local references to mesh data
595  const areaVectorField& C = mesh().areaCentres();
596  const edgeVectorField& Ce = mesh().edgeCentres();
597 
598  const labelUList& owner = mesh().owner();
599  const labelUList& neighbour = mesh().neighbour();
600 
601  const pointField& points = mesh().points();
602  const edgeList& edges = mesh().edges();
603 
604 
605  forAll(neighbour, edgeI)
606  {
607  const vector& P = C[owner[edgeI]];
608  const vector& N = C[neighbour[edgeI]];
609  const vector& S = points[edges[edgeI].start()];
610  vector e = edges[edgeI].vec(points);
611 
612  scalar alpha =
613  -(((N - P)^(S - P))&((N - P)^e ))/(((N - P)^e)&((N - P)^e));
614 
615  vector E(S + alpha*e);
616 
617  SkewCorrVecs[edgeI] = Ce[edgeI] - E;
618  }
619 
620 
621  edgeVectorField::Boundary& bSkewCorrVecs =
622  SkewCorrVecs.boundaryFieldRef();
623 
624  forAll(SkewCorrVecs.boundaryField(), patchI)
625  {
626  faePatchVectorField& patchSkewCorrVecs = bSkewCorrVecs[patchI];
627 
628  if (patchSkewCorrVecs.coupled())
629  {
630  const labelUList& edgeFaces =
631  mesh().boundary()[patchI].edgeFaces();
632 
633  const edgeList::subList patchEdges =
634  mesh().boundary()[patchI].patchSlice(edges);
635 
636  vectorField ngbC(C.boundaryField()[patchI].patchNeighbourField());
637 
638  forAll(patchSkewCorrVecs, edgeI)
639  {
640  const vector& P = C[edgeFaces[edgeI]];
641  const vector& N = ngbC[edgeI];
642  const vector& S = points[patchEdges[edgeI].start()];
643  vector e = patchEdges[edgeI].vec(points);
644 
645  scalar alpha =
646  - (((N - P)^(S - P))&((N - P)^e))
647  /(((N - P)^e)&((N - P)^e));
648 
649  vector E(S + alpha*e);
650 
651  patchSkewCorrVecs[edgeI] =
652  Ce.boundaryField()[patchI][edgeI] - E;
653  }
654  }
655  else
656  {
657  patchSkewCorrVecs = vector::zero;
658  }
659  }
660 
661 
662  scalar skewCoeff = 0.0;
663 
664  // Calculating PN arc length
665  scalarField lPN(owner.size());
666 
667  forAll(owner, edgeI)
668  {
669  lPN[edgeI] =
670  mag
671  (
672  Ce[edgeI]
673  - SkewCorrVecs[edgeI]
674  - C[owner[edgeI]]
675  )
676  + mag
677  (
678  C[neighbour[edgeI]]
679  - Ce[edgeI]
680  + SkewCorrVecs[edgeI]
681  );
682  }
683 
684  if (lPN.size() > 0)
685  {
686  skewCoeff = max(mag(SkewCorrVecs.internalField())/mag(lPN));
687  }
688 
690  << "skew coefficient = " << skewCoeff << endl;
691 
692  if (skewCoeff < 0.1)
693  {
694  skew_ = false;
695  deleteDemandDrivenData(skewCorrectionVectors_);
696  }
697  else
698  {
699  skew_ = true;
700  }
701 
703  << "Finished constructing skew correction vectors"
704  << endl;
705 }
706 
707 
708 // ************************************************************************* //
Foam::IOobject::NO_WRITE
Definition: IOobject.H:130
Foam::pointField
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:44
Foam::polyMesh::points
virtual const pointField & points() const
Return raw points.
Definition: polyMesh.C:1038
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition: primitiveFieldsFwd.H:52
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
Foam::dimless
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
Definition: dimensionSets.H:50
Foam::edgeList
List< edge > edgeList
A List of edges.
Definition: edgeList.H:63
Foam::skew
dimensionedTensor skew(const dimensionedTensor &dt)
Definition: dimensionedTensor.C:137
Foam::dimLength
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:53
Foam::edgeVectorField
GeometricField< vector, faePatchField, edgeMesh > edgeVectorField
Definition: edgeFieldsFwd.H:55
Foam::Zero
static constexpr const zero Zero
Global zero.
Definition: zero.H:128
demandDrivenData.H
Template functions to aid in the implementation of demand driven data.
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
Foam::edgeInterpolation::skew
bool skew() const
Return whether mesh is skew or not.
Definition: edgeInterpolation.C:139
Foam::edgeInterpolation::skewCorrectionVectors
const edgeVectorField & skewCorrectionVectors() const
Return reference to skew vectors array.
Definition: edgeInterpolation.C:151
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:337
faMesh.H
Foam::primitiveMesh::edges
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
Definition: primitiveMeshEdges.C:505
Foam::faePatchVectorField
faePatchField< vector > faePatchVectorField
Definition: faePatchFieldsFwd.H:47
Foam::Vector::normalise
Vector< Cmpt > & normalise()
Normalise the vector by its magnitude.
Definition: VectorI.H:128
Foam::min
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:33
C
volScalarField & C
Definition: readThermalProperties.H:102
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:290
Foam::vectorField
Field< vector > vectorField
Specialisation of Field<T> for vector.
Definition: primitiveFieldsFwd.H:54
Foam::areaVectorField
GeometricField< vector, faPatchField, areaMesh > areaVectorField
Definition: areaFieldsFwd.H:56
Foam::deleteDemandDrivenData
void deleteDemandDrivenData(DataPtr &dataPtr)
Definition: demandDrivenData.H:42
Foam::reduce
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
Definition: PstreamReduceOps.H:51
Foam::Field< scalar >
Foam::edgeInterpolation::deltaCoeffs
const edgeScalarField & deltaCoeffs() const
Return reference to difference factors array.
Definition: edgeInterpolation.C:104
Foam::edgeInterpolation::~edgeInterpolation
~edgeInterpolation()
Destructor.
Definition: edgeInterpolation.C:74
Foam::edgeInterpolation::clearOut
void clearOut()
Clear all geometry and addressing.
Definition: edgeInterpolation.C:43
DebugInFunction
#define DebugInFunction
Report an information message using Foam::Info.
Definition: messageStream.H:356
edgeFields.H
Foam::edgeInterpolation::lPN
const edgeScalarField & lPN() const
Return reference to PN geodesic distance.
Definition: edgeInterpolation.C:82
Foam::edgeScalarField
GeometricField< scalar, faePatchField, edgeMesh > edgeScalarField
Definition: edgeFieldsFwd.H:52
Foam::edgeInterpolation::orthogonal
bool orthogonal() const
Return whether mesh is orthogonal or not.
Definition: edgeInterpolation.C:115
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
areaFields.H
Foam::List::subList
SubList< T > subList
Declare type of subList.
Definition: List.H:117
Foam::FatalError
error FatalError
Foam::fvMesh::neighbour
const labelUList & neighbour() const
Internal face neighbour.
Definition: fvMesh.H:382
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::abort
errorManip< error > abort(error &err)
Definition: errorManip.H:137
Foam::skewCorrectionVectors
Skew-correction vectors for the skewness-corrected interpolation scheme.
Definition: skewCorrectionVectors.H:54
Foam::vector
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:51
Foam::edgeInterpolation::movePoints
bool movePoints() const
Do what is necessary if the mesh has moved.
Definition: edgeInterpolation.C:188
Foam::edgeInterpolation::weights
const edgeScalarField & weights() const
Return reference to weighting factors array.
Definition: edgeInterpolation.C:93
Foam::fvMesh::owner
const labelUList & owner() const
Internal face owner. Note bypassing virtual mechanism so.
Definition: fvMesh.H:376
Foam::edgeInterpolation::correctionVectors
const edgeVectorField & correctionVectors() const
Return reference to non-orthogonality correction vectors array.
Definition: edgeInterpolation.C:126
Foam::normalised
VectorSpace< Form, Cmpt, Ncmpts > normalised(const VectorSpace< Form, Cmpt, Ncmpts > &vs)
Definition: VectorSpaceI.H:496
Foam::fvMesh::boundary
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
Definition: fvMesh.C:589
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:355
Foam::Vector< scalar >
Foam::mag
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Foam::UList< label >
points
const pointField & points
Definition: gmvOutputHeader.H:1
Foam::constant::electromagnetic::e
const dimensionedScalar e
Elementary charge.
Definition: createFields.H:11
faPatchFields.H
Foam::faMesh
Finite area mesh. Used for 2-D non-Euclidian finite area method.
Definition: faMesh.H:77
Foam::VectorSpace< Vector< scalar >, scalar, 3 >::zero
static const Vector< scalar > zero
Definition: VectorSpace.H:115
N
const Vector< label > N(dict.get< Vector< label >>("N"))
fam
Calculate the matrix for the second temporal derivative.
Foam::edgeInterpolation::edgeInterpolation
edgeInterpolation(const faMesh &)
Construct given an faMesh.
Definition: edgeInterpolation.C:57
Foam::labelUList
UList< label > labelUList
A UList of labels.
Definition: UList.H:79
Foam::GeometricField
Generic GeometricField class.
Definition: areaFieldsFwd.H:53
Foam::IOobject::NO_READ
Definition: IOobject.H:123
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
boundary
faceListList boundary
Definition: createBlockMesh.H:4
Foam::asin
dimensionedScalar asin(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:267
Foam::GeometricField::boundaryField
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Definition: GeometricFieldI.H:62