41#ifndef topOVariablesBase_H
42#define topOVariablesBase_H
61class topOVariablesBase
130 const label nSerialPatches,
146 const scalar isoValue,
150 label& nChangedFaces,
163 const label nSerialPatches
172 topOVariablesBase(
const topOVariablesBase&) =
delete;
175 void operator=(
const topOVariablesBase&) =
delete;
235 const word& interpolationFieldName =
"beta"
245 const word& designVariablesName,
246 const word& interpolationFieldName =
"beta"
259 const scalar isoValue,
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A HashTable to objects of type <T> with a label key.
Base class for selecting the betaMax value, i.e. the value multiplying the Brinkman penalisation term...
Class for cutting a face, faceI, of an fvMesh, mesh_, at its intersection with an isosurface defined ...
Base class for cutting a face, faceI, of an fvMesh, mesh_, at its intersections.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A class for handling file names.
Mesh data needed to do the Finite Volume discretisation.
localIOdictionary(const IOobject &io, const dictionary *fallback=nullptr)
Construct given an IOobject and optional fallback dictionary content.
void writeFluidSolidInterface(const volScalarField &indicator, const scalar isoValue, labelList &changedFaces, List< wallPointData< label > > &changedFacesInfo)
Write the fluid-solid interface to files.
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,...
TypeName("topOVariablesBase")
Runtime type information.
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.
Map< label > meshFaceToChangedFace_
Map between iso-surface and mesh faces (internal and boundary).
virtual ~topOVariablesBase()=default
Destructor.
scalar getBetaMax() const
Get betaMax value.
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...
topOZones zones_
Cell zones useful for defining the constant and changing parts of the domain in topO.
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.
const topOZones & getTopOZones() const
Get topOZones.
fileName isoSurfFolder_
Folder name holding the zero level-set iso-surface.
DynamicList< label > faceFaces(const label facei) const
Construct facesFaces for a given boundary face.
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...
const pointField & surfacePoints() const
virtual const volScalarField & beta() const =0
Get field used for physical interpolations.
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.
pointField surfPoints_
Per cutting face, the changed faces owned by it.
const faceList & surfaceFaces() const
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.
faceList surfFaces_
Iso-surface faces.
bool isDuplicatePoint(const label pointID, const vector &pointi, const DynamicList< label > &cuttingFaces, const DynamicList< point > &isoSurfPts, const DynamicList< face > &isoSurfFaces, labelList &uniquePointIDs) const
Holds information (coordinate and normal) regarding nearest wall point.
A class for handling words, derived from Foam::string.
const labelIOList & zoneIDs
GeometricField< scalar, pointPatchField, pointMesh > pointScalarField
List< label > labelList
A List of labels.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
List< face > faceList
List of faces.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
vectorField pointField
pointField is a vectorField.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.