49 Foam::rawTopoChangerFvMesh::rawTopoChangerFvMesh(
const IOobject& io)
66 Info<<
"rawTopoChangerFvMesh : Checking for topology changes..." 76 bool hasChanged = topoChangeMap.
valid();
80 Info<<
"rawTopoChangerFvMesh : Done topology changes..." 93 const label nOldInternal = topoChangeMap().oldPatchStarts()[0];
98 if (faceMap[facei] >= 0)
100 mappedFace[facei] = 1;
105 if (faceMap[facei] >= 0 && faceMap[facei] >= nOldInternal)
107 mappedFace[facei] = 1;
111 const List<objectMap>& fromFaces = topoChangeMap().facesFromFacesMap();
115 mappedFace[fromFaces[i].index()] = 1;
118 const List<objectMap>& fromEdges = topoChangeMap().facesFromEdgesMap();
122 mappedFace[fromEdges[i].index()] = 1;
129 mappedFace[fromPts[i].index()] = 1;
133 Info<<
"rawTopoChangerFvMesh : zeroing unmapped boundary values." 135 zeroUnmappedValues<scalar, fvPatchField, volMesh>(mappedFace);
136 zeroUnmappedValues<vector, fvPatchField, volMesh>(mappedFace);
137 zeroUnmappedValues<sphericalTensor, fvPatchField, volMesh>(mappedFace);
138 zeroUnmappedValues<symmTensor, fvPatchField, volMesh>(mappedFace);
139 zeroUnmappedValues<tensor, fvPatchField, volMesh>(mappedFace);
142 Info<<
"rawTopoChangerFvMesh :" 143 <<
" recreating phi for unmapped boundary values." <<
endl;
154 if (topoChangeMap().hasMotionPoints())
156 pointField newPoints = topoChangeMap().preMotionPoints();
159 Info<<
"rawTopoChangerFvMesh :" 160 <<
" calling modifyMotionPoints." <<
endl;
164 Info<<
"rawTopoChangerFvMesh :" 165 <<
" calling movePoints." <<
endl;
#define forAll(list, i)
Loop across all elements in list.
const surfaceVectorField & Sf() const
Return cell face area vectors.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool moving() const
Is mesh moving.
label nInternalFaces() const
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > linearInterpolate(const GeometricField< Type, fvPatchField, volMesh > &vf)
const surfaceScalarField & phi() const
Return cell face motion fluxes.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool movePoints()
Do what is necessary if the mesh has moved.
virtual ~rawTopoChangerFvMesh()
Destructor.
autoPtr< mapPolyMesh > changeMesh(const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
Macros for easy insertion into run-time selection tables.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
Abstract base class for a topology changing fvMesh.
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set)
void modifyMotionPoints(pointField &) const
Modify point motion.
virtual bool update()
Update the mesh for both mesh motion and topology change.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
bool topoChanging() const
Is mesh topology changing.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
polyTopoChanger topoChanger_
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...