Go to the documentation of this file.
71 extrudedPatch_(
patch.patch()),
74 extrudeMesh(regionPatches);
100 extrudedPatch_(
patch.patch()),
110 if (!dicts.set(patchi))
116 dicts[bottomPatchID] = dict_.subDict(
"bottomCoeffs");
117 dicts[sidePatchID] = dict_.subDict(
"sideCoeffs");
118 dicts[topPatchID] = dict_.subDict(
"topCoeffs");
122 dicts[patchi].readEntry(
"name",
patchNames[patchi]);
123 dicts[patchi].readEntry(
"type",
patchTypes[patchi]);
126 forAll(regionPatches, patchi)
129 patchDict.
set(
"nFaces", 0);
130 patchDict.
set(
"startFace", 0);
142 extrudeMesh(regionPatches);
150 const bool columnCells = dict_.
get<
bool>(
"columnCells");
157 nonManifoldEdge.
set(edgeI);
169 extrudedPatch_, extrudedPatch_.
points()
186 labelList localRegionPoints(localToGlobalRegion.size());
187 forAll(pointLocalRegions, facei)
189 const face&
f = extrudedPatch_.
localFaces()[facei];
190 const face& pRegions = pointLocalRegions[facei];
193 localRegionPoints[pRegions[fp]] =
f[fp];
198 pointField localRegionNormals(localToGlobalRegion.size());
202 forAll(pointLocalRegions, facei)
204 const face& pRegions = pointLocalRegions[facei];
207 label localRegionI = pRegions[fp];
208 localSum[localRegionI] +=
213 Map<point> globalSum(2*localToGlobalRegion.size());
215 forAll(localSum, localRegionI)
217 label globalRegionI = localToGlobalRegion[localRegionI];
218 globalSum.insert(globalRegionI, localSum[localRegionI]);
225 forAll(localToGlobalRegion, localRegionI)
227 label globalRegionI = localToGlobalRegion[localRegionI];
228 localRegionNormals[localRegionI] = globalSum[globalRegionI];
230 localRegionNormals /=
mag(localRegionNormals);
236 forAll(firstDisp, regionI)
243 localRegionPoints[regionI]
246 const vector&
n = localRegionNormals[regionI];
247 firstDisp[regionI] = model_()(regionPt,
n, 1) - regionPt;
252 createShellMesh extruder
308 forAll(edgePatches, edgeI)
312 if (eFaces.size() != 2 || nonManifoldEdge.test(edgeI))
314 edgePatches[edgeI].
setSize(eFaces.size(), sidePatchID);
318 polyTopoChange meshMod(regionPatches.size());
320 extruder.setRefinement
323 model_().expansionRatio(),
325 labelList(extrudedPatch_.size(), topPatchID),
326 labelList(extrudedPatch_.size(), bottomPatchID),
331 autoPtr<mapPolyMesh> map = meshMod.changeMesh
338 extruder.updateMesh(map());
static void mapCombineGather(const List< commsStruct > &comms, Container &Values, const CombineOp &cop, const int tag, const label comm)
List< label > labelList
A List of labels.
vectorField pointField
pointField is a vectorField.
label size() const noexcept
The number of elements in table.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const Field< PointType > & points() const
Return reference to global points.
const labelListList & edgeFaces() const
Return edge-face addressing.
A class for handling words, derived from Foam::string.
virtual bool write(const bool valid=true) const
Write mesh using IO settings from time.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
PrimitivePatch< face, List, const pointField & > primitiveFacePatch
Foam::primitiveFacePatch.
static constexpr const zero Zero
Global zero.
virtual const objectRegistry & thisDb() const
Return the object registry - resolve conflict polyMesh/lduMesh.
label nEdges() const
Return number of edges in patch.
const fileName & facesInstance() const
Return the current instance directory for faces.
void set(const bitSet &bitset)
Set specified bits from another bitset.
void removeFvBoundary()
Remove boundary patches. Warning: fvPatchFields hold ref to.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
entry * set(entry *entryPtr)
Assign a new entry, overwriting any existing entry.
#define forAll(list, i)
Loop across all elements in list.
wordList patchTypes(nPatches)
Field< vector > vectorField
Specialisation of Field<T> for vector.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
static autoPtr< extrudeModel > New(const dictionary &dict)
Select null constructed.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
wordList patchNames(nPatches)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
void addFvPatches(PtrList< polyPatch > &plist, const bool validBoundary=true)
Add boundary patches. Constructor helper.
static autoPtr< polyPatch > New(const word &patchType, const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm)
Return a pointer to a new patch created on freestore from.
Mesh data needed to do the Finite Volume discretisation.
Vector< scalar > vector
A scalar version of the templated Vector.
label nInternalEdges() const
Number of internal edges.
List< labelList > labelListList
A List of labelList.
static void mapCombineScatter(const List< commsStruct > &comms, Container &Values, const int tag, const label comm)
Scatter data. Reverse of combineGather.
const Field< PointType > & faceNormals() const
Return face unit normals for patch.
extrudePatchMesh(const fvMesh &, const fvPatch &, const dictionary &, const word)
Construct from mesh, patch and dictionary.
const std::string patch
OpenFOAM patch number as a std::string.
List< face > faceList
A List of faces.
static void calcPointRegions(const globalMeshData &globalData, const primitiveFacePatch &patch, const bitSet &nonManifoldEdge, const bool syncNonCollocated, faceList &pointGlobalRegions, faceList &pointLocalRegions, labelList &localToGlobalRegion)
Helper: calculate point regions. The point region is the.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const Time & time() const
Return the top-level database.
const List< Face > & localFaces() const
Return patch faces addressing into local point list.
const globalMeshData & globalData() const
Return parallel info.
vector point
Point is a vector.
const labelList & meshPoints() const
Return labelList of mesh points in patch.
void setSize(const label newSize)
Alias for resize(const label)
constant condensation/saturation model.
defineTypeNameAndDebug(combustionModel, 0)
void setInstance(const fileName &instance, const IOobject::writeOption wOpt=IOobject::AUTO_WRITE)
Set the instance for mesh files.
void clearOut()
Clear all geometry and addressing.