41 #ifndef topOVariablesBase_H 42 #define topOVariablesBase_H 130 const label nSerialPatches,
146 const scalar isoValue,
150 label& nChangedFaces,
163 const label nSerialPatches
232 DimensionedField<scalar, volMesh>&
field,
235 const word& interpolationFieldName =
"beta" 245 const word& designVariablesName,
246 const word& interpolationFieldName =
"beta" 259 const scalar isoValue,
virtual ~topOVariablesBase()=default
Destructor.
bool addCuttingFaceToIsoline(const DynamicList< point > &facePoints, const label nSerialPatches, const DynamicList< label > &cellCutFaces, const List< DynamicList< label >> &cuttingFacesPerMeshFace, DynamicList< vector > &isoSurfPts, DynamicList< face > &isoSurfFaces, DynamicList< label > &zoneIDs) const
Add the cutting face to the zero level-set iso-surface.
TypeName("topOVariablesBase")
Runtime type information.
const labelIOList & zoneIDs
A class for handling file names.
scalar getBetaMax() const
Get betaMax value.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const topOZones & getTopOZones() const
Get topOZones.
topOZones zones_
Cell zones useful for defining the constant and changing parts of the domain in topO.
Class for cutting a face, faceI, of an fvMesh, mesh_, at its intersection with an isosurface defined ...
bool isDuplicatePoint(const label pointID, const vector &pointi, const DynamicList< label > &cuttingFaces, const DynamicList< point > &isoSurfPts, const DynamicList< face > &isoSurfFaces, labelList &uniquePointIDs) const
DynamicList< label > faceFaces(const label facei) const
Construct facesFaces for a given boundary face.
localIOdictionary is derived from IOdictionary but excludes parallel master reading.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
List< face > faceList
List of faces.
Base class for cutting a face, faceI, of an fvMesh, mesh_, at its intersections.
vectorField pointField
pointField is a vectorField.
virtual void sourceTerm(DimensionedField< scalar, volMesh > &field, const topOInterpolationFunction &interpolationFunc, const scalar betaMax, const word &interpolationFieldName="beta") const
Populate source terms for the flow equations.
A class for handling words, derived from Foam::string.
fileName isoSurfFolder_
Folder name holding the zero level-set iso-surface.
virtual void sourceTermSensitivities(scalarField &sens, const topOInterpolationFunction &interpolationFunc, const scalar betaMax, const word &designVariablesName, const word &interpolationFieldName="beta") const
Post-processing sensitivities due to interpolations based on the indicator fields.
faceList surfFaces_
Iso-surface faces.
virtual const volScalarField & beta() const =0
Get field used for physical interpolations.
pointField surfPoints_
Per cutting face, the changed faces owned by it.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
Base class for selecting the betaMax value, i.e. the value multiplying the Brinkman penalisation term...
scalar getBetaMax() const
Get betaMax.
void writeFluidSolidInterface(const volScalarField &indicator, const scalar isoValue, labelList &changedFaces, List< wallPointData< label >> &changedFacesInfo)
Write the fluid-solid interface to files.
const pointField & surfacePoints() const
Holds information (coordinate and normal) regarding nearest wall point.
const faceList & surfaceFaces() const
void addBoundaryFacesToIsoline(const pointScalarField &pointY, const Map< label > &addedFaces, const scalar isoValue, DynamicList< vector > &isoSurfPts, DynamicList< face > &isoSurfFaces, DynamicList< label > &zoneIDs, label &nChangedFaces, labelList &changedFaces, List< wallPointData< label >> &changedFacesInfo, labelList &changedFaceToCutFace, List< DynamicList< label >> &cuttingFacesPerMeshFace)
Check whether the boundary faces of the initial domain belong to the fluid part and add them to the s...
Mesh data needed to do the Finite Volume discretisation.
Map< label > meshFaceToChangedFace_
Map between iso-surface and mesh faces (internal and boundary)
bool addCutBoundaryFaceToIsoline(const label facei, const cutFaceIso &cutFace, DynamicList< vector > &isoSurfPts, DynamicList< face > &isoSurfFaces, DynamicList< label > &zoneIDs, List< DynamicList< label >> &cuttingFacesPerMeshFace) const
Check whether the cutFace intersects the boundary of the initial domain and add fluid part of the int...
void writeSurfaceFiles(const pointField &pts, const faceList &faces, const labelList &zoneIds, const label nSerialPatches) const
Write the surface describing the fluid domain to stl and vtp files.
Base class for all design variables related to topology optimisation (topO). Provides the lookup func...
void setCutInterfaceFaces(const volScalarField &y, labelList &changedFaces, List< wallPointData< label >> &changedFacesInfo) const
Based on the current pseudo-distance field y, identity the zero level-set iso-surface, write it to files for post-processing and set the seeds for the distance calculation from this iso-surface.