Go to the documentation of this file.
35 namespace regionModels
89 Pout<<
"singleLayerRegion::initialise()" <<
endl;
92 label nBoundaryFaces = 0;
96 forAll(intCoupledPatchIDs_, i)
98 const label patchI = intCoupledPatchIDs_[i];
102 nBoundaryFaces += fCells.
size();
110 if (nBoundaryFaces != regionMesh().nCells())
113 <<
"Number of primary region coupled boundary faces not equal to "
114 <<
"the number of cells in the local region" <<
nl <<
nl
115 <<
"Number of cells = " << regionMesh().nCells() <<
nl
116 <<
"Boundary faces = " << nBoundaryFaces <<
nl
121 passivePatchIDs_.setSize(intCoupledPatchIDs_.size(), -1);
122 forAll(intCoupledPatchIDs_, i)
124 const label patchI = intCoupledPatchIDs_[i];
125 const polyPatch& ppIntCoupled = rbm[patchI];
126 if (ppIntCoupled.size() > 0)
129 const cell& cFaces = regionMesh().cells()[
cellId];
135 passivePatchIDs_[i] = passivePatchI;
136 const polyPatch& ppPassive = rbm[passivePatchI];
145 magSf.field() = 0.5*(magSf + passiveMagSf);
163 const word& regionType
176 const word& regionType,
177 const word& modelName,
188 constructMeshObjects();
209 if (!nHatPtr_.valid())
212 <<
"Region patch normal vectors not available"
222 if (!magSfPtr_.valid())
225 <<
"Region patch areas not available"
236 return passivePatchIDs_;
virtual const labelList & passivePatchIDs() const
Return the list of patch IDs opposite to internally.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
A class for handling words, derived from string.
#define forAll(list, i)
Loop across all elements in list.
Base class for single layer region models.
virtual ~singleLayerRegion()
Destructor.
bool read(const char *, int32_t &)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
This function object reads fields from the time directories and adds them to the mesh database for fu...
This boundary condition applies a zero-gradient condition from the patch internal field onto the patc...
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
const dimensionSet dimArea(sqr(dimLength))
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
A patch is a list of labels that address the faces in the global face list.
autoPtr< volScalarField > magSfPtr_
Face area magnitudes / [m2].
singleLayerRegion(const singleLayerRegion &)
Disallow default bitwise copy construct.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
virtual bool read()
Read control parameters from dictionary.
void initialise()
Initialise the region.
defineTypeNameAndDebug(regionModel, 0)
Mesh data needed to do the Finite Volume discretisation.
errorManip< error > abort(error &err)
const labelUList & faceCells() const
Return face-cell addressing.
label start() const
Return start label of this patch in the polyMesh face list.
void correctBoundaryConditions()
Correct boundary field.
static void listCombineGather(const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const Time & time_
Reference to the time database.
prefixOSstream Pout(cout, "Pout")
const Field< PointType > & faceNormals() const
Return face normals for patch.
label opposingFaceLabel(const label masterFaceLabel, const faceUList &meshFaces) const
Return index of opposite face.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const vectorField::subField faceAreas() const
Return face normals.
autoPtr< volVectorField > nHatPtr_
Patch normal vectors.
virtual const volVectorField & nHat() const
Return the patch normal vectors.
A List with indirect addressing.
void constructMeshObjects()
Construct region mesh and fields.
void size(const label)
Override size to be inconsistent with allocated storage.
static void listCombineScatter(const List< commsStruct > &comms, List< T > &Value, const int tag, const label comm)
Scatter data. Reverse of combineGather.
Generic GeometricField class.
A cell is defined as a list of faces with extra functionality.
virtual bool read()
Read control parameters from dictionary.
const fvMesh & regionMesh() const
Return the region mesh database.