47 stabilisation_(false),
48 localStabilisationCells_(),
49 stabilisationMapPtr_(nullptr)
68 stabilisation_ =
false;
69 forAll(cellCoupleds, celli)
71 if (!cellCoupleds[celli])
73 stabilisation_ =
true;
80 if (!stabilisation_)
return;
85 forAll(bFaceNbrIsCoupled, bFacei)
89 bFaceNbrIsCoupled[bFacei] = cellCoupleds[owni];
98 for (
label facei = 0; facei < mesh.
nFaces(); ++ facei)
101 const bool ownIsCoupled = cellCoupleds[owni];
106 const bool nbrIsCoupled = cellCoupleds[nbri];
108 if (ownIsCoupled != nbrIsCoupled)
110 const label celli = ownIsCoupled ? owni : nbri;
128 const bool nbrIsCoupled = bFaceNbrIsCoupled[bFacei];
130 if (!ownIsCoupled && nbrIsCoupled)
137 bFaceNbrProcCells[bFacei],
151 forAll(cellCoupleds, celli)
153 if (cellCoupleds[celli])
175 forAll(cellCoupleds, celli)
177 if (!cellCoupleds[celli] && !cellInfos[celli].
valid(
wave.data()))
180 <<
"Un-coupled cell " << celli <<
" of mesh " << mesh.
name()
182 <<
"at " << mesh.
cellCentres()[celli] <<
" was not connected "
183 <<
"to a coupled cell by the stabilisation wave. This "
184 <<
"indicates that an entire non-contiguous region of mesh "
185 <<
"lies outside of the other mesh being mapped to. This is "
192 localStabilisationCells_.resize(mesh.
nCells());
193 forAll(cellCoupleds, celli)
196 localStabilisationCells_[celli] =
206 stabilisationMapPtr_.reset
211 localStabilisationCells_,
222 typeName +
"_" + mesh.
name()
233 if (
magSqr(
c - ccs[celli]) == 0)
continue;
#define forAll(list, i)
Loop across all elements in list.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
Wave propagation of information through grid. Every iteration information goes through one layer of c...
const word & name() const
Return name.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
OFstream which keeps track of vertices.
virtual Ostream & write(const char)
Write character.
T * data()
Return a pointer to the first data element,.
static bool & parRun()
Is this a parallel run?
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Holds information regarding nearest wall point. Used in wall distance calculation.
Stabilisation data and routines for cell-to-cell interpolations.
virtual ~cellsToCellsStabilisation()
Destructor.
void update(const polyMesh &mesh, const PackedBoolList &cellCoupleds)
Compute the stabilisation addressing if necessary.
cellsToCellsStabilisation()
Construct null.
Class containing processor-to-processor mapping information.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
label toGlobal(const label i) const
From local to global.
label nTotalCells() const
Return total number of cells in decomposed mesh.
Mesh consisting of general polyhedral cells.
virtual const labelList & faceOwner() const
Return face owner.
const globalMeshData & globalData() const
Return parallel info.
virtual const labelList & faceNeighbour() const
Return face neighbour.
const vectorField & faceCentres() const
const vectorField & cellCentres() const
label nInternalFaces() const
Struct for keeping processor, element (cell, face, point) index.
label elementi
Element index.
label proci
Processor index.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool valid(const PtrList< ModelType > &l)
const dimensionedScalar c
Speed of light in a vacuum.
label wave(const fvMesh &mesh, const List< labelPair > &changedPatchAndFaces, const label nCorrections, GeometricField< scalar, PatchField, GeoMesh > &distance, TrackingData &td, GeometricField< DataType, PatchField, GeoMesh > &... data)
Wave distance (and maybe additional) data from faces. If nCorrections is.
errorManipArg< error, int > exit(error &err, const int errNo=1)
tmp< DimensionedField< scalar, GeoMesh > > stabilise(const DimensionedField< scalar, GeoMesh > &dsf, const dimensioned< scalar > &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
line< point, const point & > linePointRef
Line using referred points.
word name(const bool)
Return a word representation of a bool.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< scalar > magSqr(const dimensioned< Type > &)