36 namespace regionModels
48 const word& regionType,
49 const word& modelName,
91 label nBoundaryFaces = 0;
93 forAll(intCoupledPatchIDs_, i)
99 nBoundaryFaces += fCells.
size();
104 nHat_.correctBoundaryConditions();
106 if (nBoundaryFaces != regionMesh().nCells())
109 <<
"Number of primary region coupled boundary faces not equal to " 110 <<
"the number of cells in the local region" <<
nl <<
nl 111 <<
"Number of cells = " << regionMesh().nCells() <<
nl 112 <<
"Boundary faces = " << nBoundaryFaces <<
nl 116 passivePatchIDs_.setSize(intCoupledPatchIDs_.size(), -1);
117 forAll(intCoupledPatchIDs_, i)
121 if (ppIntCoupled.size() > 0)
124 const cell& cFaces = regionMesh().cells()[
cellId];
129 ppIntCoupled.
start(), regionMesh().faces()
139 VbyA_.primitiveFieldRef() = regionMesh().V()/magSf_;
140 VbyA_.correctBoundaryConditions();
174 return passivePatchIDs_;
static void listCombineScatter(const List< commsStruct > &comms, List< T > &Value, const int tag, const label comm)
Scatter data. Reverse of combineGather.
#define forAll(list, i)
Loop across all elements in list.
const volScalarField & VbyA() const
Return the cell layer volume/area [m].
const dimensionSet dimArea
virtual ~singleLayerRegion()
Destructor.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const labelList & passivePatchIDs() const
Return the list of patch IDs opposite to internally.
void size(const label)
Override size to be inconsistent with allocated storage.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
const dimensionSet dimless
static void listCombineGather(const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm)
const dimensionSet dimLength
defineTypeNameAndDebug(regionModel, 0)
label opposingFaceLabel(const label masterFaceLabel, const faceUList &meshFaces) const
Return index of opposite face.
const labelUList & faceCells() const
Return face-cell addressing.
A class for handling words, derived from string.
const volVectorField & nHat() const
Return the patch normal vectors.
const Field< PointType > & faceNormals() const
Return face normals for patch.
errorManip< error > abort(error &err)
This boundary condition applies a zero-gradient condition from the patch internal field onto the patc...
const scalarField::subField magFaceAreas() const
Return face area magnitudes.
const volScalarField::Internal & magSf() const
Return the face area magnitudes [m^2].
singleLayerRegion(const fvMesh &mesh, const word ®ionType, const word &modelName, bool readFields=true)
Construct from mesh, region type and name.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A cell is defined as a list of faces with extra functionality.
Mesh data needed to do the Finite Volume discretisation.
A List with indirect addressing.
label start() const
Return start label of this patch in the polyMesh face list.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Base class for region models.
A patch is a list of labels that address the faces in the global face list.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
label whichPatch(const label faceIndex) const
Return patch index for a given face label.