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;
147 lookupObject<surfaceScalarField>(
"phi")
157 if (topoChangeMap().hasMotionPoints())
159 pointField newPoints = topoChangeMap().preMotionPoints();
162 Info<<
"rawTopoChangerFvMesh :" 163 <<
" calling modifyMotionPoints." <<
endl;
167 Info<<
"rawTopoChangerFvMesh :" 168 <<
" calling movePoints." <<
endl;
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const surfaceVectorField & Sf() const
Return cell face area vectors.
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 neccessary 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.
bool moving() const
Is mesh moving.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
Abstract base class for a topology changing fvMesh.
void modifyMotionPoints(pointField &) const
Modify point motion.
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set).
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...
label nInternalFaces() const