fvMeshStitcherTemplates.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Description
25  Perform mapping of finite volume fields required by stitching.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "volFields.H"
30 #include "surfaceFields.H"
31 #include "fvPatchFieldMapper.H"
32 #include "fvMeshStitcher.H"
34 #include "nonConformalBoundary.H"
38 #include "processorFvPatch.H"
39 #include "surfaceToVolVelocity.H"
40 
41 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
42 
43 template<class Type, template<class> class GeoField>
44 void Foam::fvMeshStitcher::resizePatchFields()
45 {
46  UPtrList<GeoField<Type>> fields(mesh_.fields<GeoField<Type>>());
47  forAll(fields, i)
48  {
49  forAll(mesh_.boundary(), patchi)
50  {
51  typename GeoField<Type>::Patch& pf =
52  fields[i].boundaryFieldRef()[patchi];
53 
54  if (isA<nonConformalFvPatch>(pf.patch()))
55  {
56  pf.map(pf, setSizeFvPatchFieldMapper(pf.patch().size()));
57  }
58  }
59  }
60 }
61 
62 
63 template<template<class> class GeoField>
64 void Foam::fvMeshStitcher::resizePatchFields()
65 {
66  #define ResizePatchFields(Type, nullArg) \
67  resizePatchFields<Type, GeoField>();
69  #undef ResizePatchFields
70 }
71 
72 
73 template<class Type>
74 void Foam::fvMeshStitcher::preConformSurfaceFields()
75 {
76  UPtrList<SurfaceField<Type>> fields(mesh_.curFields<SurfaceField<Type>>());
77 
78  forAll(fields, i)
79  {
80  SurfaceField<Type>& field = fields[i];
81 
82  autoPtr<SurfaceField<Type>> nccFieldPtr
83  (
84  new SurfaceField<Type>
85  (
86  IOobject
87  (
88  nccFieldPrefix_ + field.name(),
89  mesh_.time().name(),
90  mesh_
91  ),
92  field
93  )
94  );
95 
96  for (label ti=0; ti<=field.nOldTimes(); ti++)
97  {
98  SurfaceField<Type>& field0 = field.oldTime(ti);
99 
100  nccFieldPtr->oldTime(ti).boundaryFieldRef() =
101  conformalNccBoundaryField<Type>(field0.boundaryField());
102 
103  field0.boundaryFieldRef() =
104  conformalOrigBoundaryField<Type>(field0.boundaryField());
105  }
106 
107  nccFieldPtr.ptr()->store();
108  }
109 }
110 
111 
112 inline void Foam::fvMeshStitcher::preConformSurfaceFields()
113 {
114  #define PreConformSurfaceFields(Type, nullArg) \
115  preConformSurfaceFields<Type>();
117  #undef PreConformSurfaceFields
118 }
119 
120 
121 template<class Type>
122 void Foam::fvMeshStitcher::postNonConformSurfaceFields()
123 {
124  UPtrList<SurfaceField<Type>> fields(mesh_.curFields<SurfaceField<Type>>());
125 
126  if (!mesh_.topoChanged())
127  {
128  forAll(fields, i)
129  {
130  if (fields[i].name()(nccFieldPrefix_.size()) == nccFieldPrefix_)
131  continue;
132 
133  SurfaceField<Type>& field = fields[i];
134 
135  const word nccFieldName = nccFieldPrefix_ + field.name();
136 
137  const SurfaceField<Type>& nccField =
138  mesh_.lookupObject<SurfaceField<Type>>(nccFieldName);
139 
140  for (label ti=0; ti<=field.nOldTimes(); ti++)
141  {
142  SurfaceField<Type>& field0 = field.oldTime(ti);
143 
144  field0.boundaryFieldRef() =
145  nonConformalBoundaryField<Type>
146  (
147  nccField.oldTime(ti).boundaryField(),
148  field0.boundaryField()
149  );
150 
151  field0.boundaryFieldRef() =
152  synchronisedBoundaryField<Type>(field0.boundaryField());
153  }
154  }
155  }
156 
157  // Remove NCC fields after all fields have been mapped. This is so that
158  // old-time fields aren't removed by current-time fields in advance of the
159  // old-time field being mapped.
160 
161  // Cache the nccField pointers
162  DynamicList<SurfaceField<Type>*> nccFields;
163  forAll(fields, i)
164  {
165  if (fields[i].name()(nccFieldPrefix_.size()) == nccFieldPrefix_)
166  continue;
167 
168  SurfaceField<Type>& field = fields[i];
169 
170  const word nccFieldName = nccFieldPrefix_ + field.name();
171 
172  SurfaceField<Type>& nccField =
173  mesh_.lookupObjectRef<SurfaceField<Type>>(nccFieldName);
174 
175  nccFields.append(&nccField);
176  }
177 
178  // Checkout the nccFields after the loop over fields
179  // to avoid deleting a subsequent field in the list
180  forAll(nccFields, i)
181  {
182  nccFields[i]->checkOut();
183  }
184 
185  // Check there are no NCC fields left over
186  fields = mesh_.curFields<SurfaceField<Type>>();
187  forAll(fields, i)
188  {
189  if (fields[i].name()(nccFieldPrefix_.size()) != nccFieldPrefix_)
190  continue;
191 
193  << "Stitching mapping field \"" << fields[i].name()
194  << "\" found, but the field it corresponds to no longer exists"
195  << exit(FatalError);
196  }
197 }
198 
199 
200 inline void Foam::fvMeshStitcher::postNonConformSurfaceFields()
201 {
202  #define PostNonConformSurfaceFields(Type, nullArg) \
203  postNonConformSurfaceFields<Type>();
205  #undef PostNonConformSurfaceFields
206 }
207 
208 
209 template<class Type>
210 void Foam::fvMeshStitcher::evaluateVolFields()
211 {
212  UPtrList<VolField<Type>> fields(mesh_.fields<VolField<Type>>());
213  forAll(fields, i)
214  {
215  const label nReq = Pstream::nRequests();
216 
217  forAll(mesh_.boundary(), patchi)
218  {
219  typename VolField<Type>::Patch& pf =
220  fields[i].boundaryFieldRef()[patchi];
221 
222  if (isA<nonConformalFvPatch>(pf.patch()))
223  {
224  pf.initEvaluate(Pstream::defaultCommsType);
225  }
226  }
227 
228  if
229  (
232  )
233  {
234  Pstream::waitRequests(nReq);
235  }
236 
237  forAll(mesh_.boundary(), patchi)
238  {
239  typename VolField<Type>::Patch& pf =
240  fields[i].boundaryFieldRef()[patchi];
241 
242  if (isA<nonConformalFvPatch>(pf.patch()))
243  {
244  pf.evaluate(Pstream::defaultCommsType);
245  }
246  }
247  }
248 }
249 
250 
251 inline void Foam::fvMeshStitcher::evaluateVolFields()
252 {
253  #define EvaluateVolFields(Type, nullArg) \
254  evaluateVolFields<Type>();
256  #undef EvaluateVolFields
257 }
258 
259 
260 inline void Foam::fvMeshStitcher::postNonConformSurfaceVelocities()
261 {
262  if (mesh_.topoChanged())
263  {
264  UPtrList<surfaceVectorField> Ufs(mesh_.fields<surfaceVectorField>());
265 
266  forAll(Ufs, i)
267  {
268  surfaceVectorField& Uf = Ufs[i];
269 
271 
272  if (!isNull(U))
273  {
274  forAll(Uf.boundaryField(), patchi)
275  {
276  if (isA<nonConformalFvPatch>(mesh_.boundary()[patchi]))
277  {
278  Uf.boundaryFieldRef()[patchi] ==
279  U.boundaryField()[patchi];
280  }
281  }
282  }
283  }
284  }
285 }
286 
287 
288 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
289 
290 template<class GeoBoundaryField>
292 (
293  const SurfaceFieldBoundary<label>& polyFacesBf,
294  GeoBoundaryField& fieldBf
295 )
296 {
297  forAll(polyFacesBf, nccPatchi)
298  {
299  if (isA<nonConformalFvPatch>(polyFacesBf[nccPatchi].patch()))
300  {
301  fieldBf[nccPatchi].map
302  (
303  fieldBf[nccPatchi],
304  setSizeFvPatchFieldMapper(polyFacesBf[nccPatchi].size())
305  );
306  }
307  }
308 }
309 
310 
311 template<class GeoField>
313 (
314  const SurfaceFieldBoundary<label>& polyFacesBf,
315  GeoField& field
316 )
317 {
318  for (label ti=0; ti<=field.nOldTimes(); ti++)
319  {
320  resizeBoundaryFieldPatchFields
321  (
322  polyFacesBf,
323  field.oldTime(ti).boundaryFieldRef()
324  );
325  }
326 }
327 
328 
329 template<class Type>
331 (
332  const Field<Type>& f,
333  const label size,
334  const labelUList& addr
335 )
336 {
337  tmp<Field<Type>> tresult(new Field<Type>(size, Zero));
338  forAll(addr, i)
339  {
340  tresult.ref()[addr[i]] += f[i];
341  }
342  return tresult;
343 }
344 
345 
346 template<class Type>
348 (
349  const tmp<Field<Type>>& f,
350  const label size,
351  const labelUList& addr
352 )
353 {
354  tmp<Field<Type>> tresult = fieldRMapSum(f(), size, addr);
355  f.clear();
356  return tresult;
357 }
358 
359 
362 {
363  const fvBoundaryMesh& fvbm = mesh_.boundary();
364 
365  const surfaceScalarField::Boundary& magSfb =
366  fvbm.mesh().magSf().boundaryField();
367 
368  tmp<surfaceScalarField::Boundary> tOrigNccMagSfb
369  (
371  (
372  fvbm,
375  )
376  );
377 
378  surfaceScalarField::Boundary& origNccMagSfb = tOrigNccMagSfb.ref();
379 
380  origNccMagSfb == 0;
381 
382  forAll(fvbm, nccPatchi)
383  {
384  const fvPatch& fvp = fvbm[nccPatchi];
385 
386  if (isA<nonConformalCoupledFvPatch>(fvp))
387  {
388  const nonConformalCoupledFvPatch& nccFvp =
389  refCast<const nonConformalCoupledFvPatch>(fvp);
390 
391  const label origPatchi = nccFvp.origPatchID();
392  const fvPatch& origFvp = nccFvp.origPatch();
393 
394  const labelList nccOrigPatchFace =
395  nccFvp.polyFaces() - origFvp.start();
396 
397  origNccMagSfb[origPatchi] +=
398  fieldRMapSum
399  (
400  magSfb[nccPatchi],
401  origFvp.size(),
402  nccOrigPatchFace
403  );
404  }
405  }
406 
407  return tOrigNccMagSfb;
408 }
409 
410 
411 template<class Type>
414 (
415  const SurfaceFieldBoundary<Type>& fieldb
416 ) const
417 {
418  const bool isFluxField = isFlux(fieldb[0].internalField());
419 
420  const fvBoundaryMesh& fvbm = fieldb[0].patch().boundaryMesh();
421 
422  const surfaceScalarField::Boundary& magSfb =
423  fvbm.mesh().magSf().boundaryField();
424 
426  (
428  (
430  fieldb
431  )
432  );
433 
434  SurfaceFieldBoundary<Type>& nccFieldb = tnccFieldb.ref();
435 
436  nccFieldb == pTraits<Type>::zero;
437 
438  const surfaceScalarField::Boundary origNccMagSfb
439  (
441  getOrigNccMagSfb()
442  );
443 
444  // Accumulate the non-conformal parts of the field into the original faces
445  forAll(fvbm, nccPatchi)
446  {
447  const fvPatch& fvp = fvbm[nccPatchi];
448 
449  if (isA<nonConformalCoupledFvPatch>(fvp))
450  {
451  const nonConformalCoupledFvPatch& nccFvp =
452  refCast<const nonConformalCoupledFvPatch>(fvbm[nccPatchi]);
453 
454  const label origPatchi = nccFvp.origPatchID();
455  const fvPatch& origFvp = nccFvp.origPatch();
456 
457  const labelList nccOrigPatchFace =
458  nccFvp.polyFaces() - origFvp.start();
459 
460  // If this is a flux then sum
461  if (isFluxField)
462  {
463  nccFieldb[origPatchi] +=
464  fieldRMapSum
465  (
466  fieldb[nccPatchi],
467  origFvp.size(),
468  nccOrigPatchFace
469  );
470  }
471 
472  // If not a flux then do an area-weighted sum
473  else
474  {
475  nccFieldb[origPatchi] +=
476  fieldRMapSum
477  (
478  fieldb[nccPatchi]*magSfb[nccPatchi],
479  origFvp.size(),
480  nccOrigPatchFace
481  );
482  }
483  }
484  }
485 
486  const labelList origPatchIDs =
488 
489  // Scale or average as appropriate
490  forAll(origPatchIDs, i)
491  {
492  const label origPatchi = origPatchIDs[i];
493 
494  // If this is a flux then scale to the total size of the face
495  if (isFluxField)
496  {
497  const scalarField origSumMagSf
498  (
499  magSfb[origPatchi] + origNccMagSfb[origPatchi]
500  );
501 
502  nccFieldb[origPatchi] *=
503  origSumMagSf
504  /max(origNccMagSfb[origPatchi], small*origSumMagSf);
505  }
506 
507  // If this is not a flux then convert to an area-weighted average
508  else
509  {
510  nccFieldb[origPatchi] /=
511  max(origNccMagSfb[origPatchi], vSmall);
512  }
513  }
514 
515  return tnccFieldb;
516 }
517 
518 
519 template<class Type>
522 (
523  const SurfaceFieldBoundary<Type>& fieldb
524 ) const
525 {
526  const bool isFluxField = isFlux(fieldb[0].internalField());
527 
528  const fvBoundaryMesh& fvbm = fieldb[0].patch().boundaryMesh();
529 
530  const surfaceScalarField::Boundary& magSfb =
531  fvbm.mesh().magSf().boundaryField();
532 
533  tmp<SurfaceFieldBoundary<Type>> torigFieldb
534  (
536  (
538  fieldb
539  )
540  );
541 
542  // If this is a flux then scale up to the total face areas
543  if (isFluxField)
544  {
545  const surfaceScalarField::Boundary origNccMagSfb
546  (
548  getOrigNccMagSfb()
549  );
550 
551  SurfaceFieldBoundary<Type>& origFieldb = torigFieldb.ref();
552 
553  const labelList origPatchIDs =
555 
556  forAll(origPatchIDs, i)
557  {
558  const label origPatchi = origPatchIDs[i];
559 
560  const scalarField origSumMagSf
561  (
562  magSfb[origPatchi] + origNccMagSfb[origPatchi]
563  );
564 
565  origFieldb[origPatchi] *=
566  origSumMagSf
567  /max(magSfb[origPatchi], small*origSumMagSf);
568  }
569  }
570 
571  return torigFieldb;
572 }
573 
574 
575 template<class Type>
578 (
579  const SurfaceFieldBoundary<Type>& nccFieldb,
580  const SurfaceFieldBoundary<Type>& origFieldb
581 ) const
582 {
583  const bool isFluxField = isFlux(origFieldb[0].internalField());
584 
585  const fvBoundaryMesh& fvbm = origFieldb[0].patch().boundaryMesh();
586 
587  const surfaceScalarField::Boundary& magSfb =
588  fvbm.mesh().magSf().boundaryField();
589 
591  (
593  (
595  origFieldb
596  )
597  );
598 
599  SurfaceFieldBoundary<Type>& fieldb = tfieldb.ref();
600 
601  // Set the coupled values
602  forAll(fvbm, nccPatchi)
603  {
604  const fvPatch& fvp = fvbm[nccPatchi];
605 
606  if (isA<nonConformalCoupledFvPatch>(fvp))
607  {
608  const nonConformalCoupledFvPatch& nccFvp =
609  refCast<const nonConformalCoupledFvPatch>(fvp);
610 
611  const label origPatchi = nccFvp.origPatchID();
612  const fvPatch& origFvp = nccFvp.origPatch();
613 
614  const labelList nccOrigPatchFace =
615  nccFvp.polyFaces() - origFvp.start();
616 
617  // Set the cyclic values
618  fieldb[nccPatchi] =
619  Field<Type>(nccFieldb[origPatchi], nccOrigPatchFace);
620  }
621  }
622 
623  // If a flux then scale down to the part face area
624  if (isFluxField)
625  {
626  const surfaceScalarField::Boundary origNccMagSfb
627  (
629  getOrigNccMagSfb()
630  );
631 
632  forAll(fvbm, nccPatchi)
633  {
634  const fvPatch& fvp = fvbm[nccPatchi];
635 
636  if (isA<nonConformalCoupledFvPatch>(fvp))
637  {
638  const nonConformalCoupledFvPatch& nccFvp =
639  refCast<const nonConformalCoupledFvPatch>(fvp);
640 
641  const label origPatchi = nccFvp.origPatchID();
642  const fvPatch& origFvp = nccFvp.origPatch();
643 
644  const labelList nccOrigPatchFace =
645  nccFvp.polyFaces() - origFvp.start();
646 
647  const scalarField origSumMagSf
648  (
649  magSfb[origPatchi] + origNccMagSfb[origPatchi]
650  );
651  const scalarField nccSumMagSf(origSumMagSf, nccOrigPatchFace);
652 
653  fieldb[nccPatchi] *= magSfb[nccPatchi]/nccSumMagSf;
654 
655  if (!isA<processorFvPatch>(fvp))
656  {
657  fieldb[origPatchi] *= magSfb[origPatchi]/origSumMagSf;
658  }
659  }
660  }
661  }
662 
663  // Set error values
664  forAll(fvbm, patchi)
665  {
666  const fvPatch& fvp = fvbm[patchi];
667 
668  if (isA<nonConformalErrorFvPatch>(fvp))
669  {
670  const label errorPatchi = patchi;
671 
672  const nonConformalErrorFvPatch& errorFvp =
673  refCast<const nonConformalErrorFvPatch>(fvp);
674 
675  const label origPatchi = errorFvp.origPatchID();
676  const fvPatch& origFvp = errorFvp.origPatch();
677 
678  const labelList errorOrigPatchFace =
679  errorFvp.polyFaces() - origFvp.start();
680 
681  if (isFluxField)
682  {
683  fieldb[errorPatchi] = Zero;
684  }
685  else
686  {
687  fieldb[errorPatchi] =
688  Field<Type>(origFieldb[origPatchi], errorOrigPatchFace);
689  }
690  }
691  }
692 
693  return tfieldb;
694 }
695 
696 
697 template<class Type>
700 (
701  const SurfaceFieldBoundary<Type>& fieldb,
702  const bool flip,
703  const scalar ownerWeight,
704  const scalar neighbourWeight
705 ) const
706 {
707  const fvBoundaryMesh& fvbm = fieldb[0].patch().boundaryMesh();
708 
709  tmp<SurfaceFieldBoundary<Type>> tsyncFieldb
710  (
712  (
714  fieldb
715  )
716  );
717 
718  SurfaceFieldBoundary<Type>& syncFieldb = tsyncFieldb.ref();
719 
721  (
723  fieldb.boundaryNeighbourField()
724  );
725 
726  forAll(fvbm, patchi)
727  {
728  const fvPatch& fvp = fvbm[patchi];
729 
730  if (fvp.coupled())
731  {
732  const coupledFvPatch& cfvp = refCast<const coupledFvPatch>(fvp);
733 
734  const scalar w = cfvp.owner() ? ownerWeight : neighbourWeight;
735  const scalar v = cfvp.owner() ? neighbourWeight : ownerWeight;
736 
737  syncFieldb[patchi] =
738  w*syncFieldb[patchi] + (flip ? -v : +v)*fieldbNbr[patchi];
739  }
740  }
741 
742  return tsyncFieldb;
743 }
744 
745 
746 template<class Type>
749 (
750  const SurfaceFieldBoundary<Type>& fieldb
751 ) const
752 {
753  const bool isFluxField = isFlux(fieldb[0].internalField());
754 
755  return synchronisedBoundaryField<Type>
756  (
757  fieldb,
758  isFluxField,
759  0.5,
760  0.5
761  );
762 }
763 
764 
765 // ************************************************************************* //
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
static const DimensionedField< Type, GeoMesh > & null()
Return a null DimensionedField.
Pre-declare SubField and related Field type.
Definition: Field.H:82
Generic GeometricBoundaryField class.
tmp< GeometricBoundaryField > boundaryNeighbourField() const
Return BoundaryField of the values on the other side of couples.
Generic GeometricField class.
PatchField< Type > Patch
Type of the patch field of which the Boundary is composed.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
void clear()
Clear the list, i.e. set size to zero.
Definition: ListI.H:125
static label nRequests()
Get number of outstanding requests.
Definition: UPstream.C:137
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
Definition: UPstream.C:147
static bool & parRun()
Is this a parallel run?
Definition: UPstream.H:399
static commsTypes defaultCommsType
Default commsType.
Definition: UPstream.H:272
This boundary condition is not designed to be evaluated; it is assumed that the value is assigned via...
An abstract base class for patches that couple regions of the computational domain e....
virtual bool owner() const
Does this side own the patch ?
Foam::fvBoundaryMesh.
const fvMesh & mesh() const
Return the mesh reference.
tmp< SurfaceFieldBoundary< Type > > conformalNccBoundaryField(const SurfaceFieldBoundary< Type > &fieldb) const
Extract the non-conformal-coupled parts of the boundary field.
tmp< SurfaceFieldBoundary< Type > > nonConformalBoundaryField(const SurfaceFieldBoundary< Type > &nccFieldb, const SurfaceFieldBoundary< Type > &origFieldb) const
Combine non-conformal-coupled and original parts of the.
static tmp< Field< Type > > fieldRMapSum(const Field< Type > &f, const label size, const labelUList &addr)
Reverse-map sum the values of a field.
tmp< SurfaceFieldBoundary< Type > > conformalOrigBoundaryField(const SurfaceFieldBoundary< Type > &fieldb) const
Extract the original parts of the boundary field and store it.
void resizeBoundaryFieldPatchFields(const SurfaceFieldBoundary< label > &polyFacesBf, GeoBoundaryField &fieldBf)
Resize the patch field of a given field to match the mesh.
tmp< SurfaceFieldBoundary< Type > > synchronisedBoundaryField(const SurfaceFieldBoundary< Type > &fieldb, const bool flip, const scalar ownerWeight, const scalar neighbourWeight) const
Synchronise the boundary field by combining corresponding.
tmp< SurfaceFieldBoundary< scalar > > getOrigNccMagSfb() const
Return the total non-conformal area associated with each.
void resizeFieldPatchFields(const SurfaceFieldBoundary< label > &polyFacesBf, GeoField &field)
Resize the patch field of a given field to match the mesh.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
Definition: fvMesh.C:895
UPtrList< GeoField > fields(const bool strict=false) const
Return the list of fields of type GeoField.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:64
virtual label size() const
Return size.
Definition: fvPatch.H:158
virtual bool coupled() const
Return true if this patch is coupled.
Definition: fvPatch.H:164
virtual label start() const
Return start label of this patch in the polyMesh face list.
Definition: fvPatch.H:152
labelList allOrigPatchIDs() const
Return a list of the orig patch indices.
Non-conformal coupled FV patch. As nonConformalFvPatch, but is also coupled to another non-conformal ...
Non-conformal error FV patch. As nonConformalFvPatch. This patch is a non-coupled non-conformal patch...
const labelList & polyFaces() const
Return face face-poly-faces.
const labelList & polyFaces() const
Return face face-poly-faces.
const fvPatch & origPatch() const
Original patch.
label origPatchID() const
Original patch ID.
Traits class for primitives.
Definition: pTraits.H:53
A class for managing temporary objects.
Definition: tmp.H:55
T & ref() const
Return non-const reference or generate a fatal error.
Definition: tmpI.H:181
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:306
#define PostNonConformSurfaceFields(Type, nullArg)
#define PreConformSurfaceFields(Type, nullArg)
#define ResizePatchFields(Type, nullArg)
#define EvaluateVolFields(Type, nullArg)
label patchi
Info<< "Calculating turbulent flame speed field St\n"<< endl;volScalarField St(IOobject("St", runTime.name(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), flameWrinkling->Xi() *Su);multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:230
U
Definition: pEqn.H:72
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
static const zero Zero
Definition: zero.H:97
VolField< vector > volVectorField
Definition: volFieldsFwd.H:62
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
word name(const bool)
Return a word representation of a bool.
Definition: boolIO.C:39
bool isFlux(const DimensionedField< Type, surfaceMesh > &df)
Check if surfaceField is a flux.
Definition: surfaceFields.H:55
FOR_ALL_FIELD_TYPES(DefineContiguousFvWallLocationDataType)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
bool isNull(const T &t)
Return true if t is a reference to the nullObject of type T.
Definition: nullObjectI.H:52
error FatalError
SurfaceField< vector > surfaceVectorField
const volVectorField & surfaceToVolVelocity(const surfaceVectorField &Uf)
Get the cell velocity field corresponding to a given face velocity, or a.
labelList f(nPoints)
Foam::surfaceFields.
Return the vol-field velocity corresponding to a given surface-field velocity.