61#ifndef levelSetDesignVariables_H
62#define levelSetDesignVariables_H
80class levelSetDesignVariables
82 public topOVariablesBase,
83 public designVariables
147 levelSetDesignVariables(
const levelSetDesignVariables&) =
delete;
150 void operator=(
const levelSetDesignVariables&) =
delete;
162 levelSetDesignVariables
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Abstract base class for adjoint-based sensitivities.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Volume discretisation.
void applyFixedPorosityValues()
Apply fixed values in certain zones.
autoPtr< regularisationRadius > radius_
The regularisation radius.
virtual bool writeData(Ostream &) const
The writeData function required by the regIOobject write operation.
void updateBeta()
Update the beta field.
virtual tmp< scalarField > assembleSensitivities(adjointSensitivity &adjointSens)
Add contributions from the adjoint to the regularization PDE, the derivative of the interpolation fun...
List< wallPointData< label > > changedFacesInfo_
Seed distances to MeshWave and cell distances.
TypeName("levelSet")
Runtime type information.
bool fixATildaValues_
Fix aTilda values in fixed{Zero}PorousZones and IOcells.
void setActiveDesignVariables(bool activeIO=false)
Determine which design variables are active.
volScalarField beta_
The indicator field.
List< wallPointData< label > > allCellInfo_
autoPtr< topOInterpolationFunction > interpolation_
Function to transorm signed distances to the indicator field beta_.
void readField()
Read the design variables field.
virtual bool globalSum() const
Whether to use global sum when computing matrix-vector products in update methods.
void updateSignedDistances()
Make aTilda a signed distance field based on the zero iso-surface of the current aTilda field.
autoPtr< regularisationPDE > regularisation_
Regularisation mechanism.
virtual const volScalarField & beta() const
Const reference to the beta field.
virtual ~levelSetDesignVariables()=default
Destructor.
labelList changedFaces_
Mesh faces acting as the source of MeshWave.
static autoPtr< levelSetDesignVariables > New(fvMesh &mesh, const dictionary &dict)
Return a reference to the selected turbulence model.
bool writeAllDistanceFields_
Write all fields related to the distance calculation (debugging).
virtual scalar computeEta(scalarField &correction)
Compute eta if not set in the first step.
volScalarField aTilda_
The regularised field.
volScalarField signedDistances_
The signed distances field.
virtual void writeDesignVars()
Write useful quantities to files.
A class for managing temporary objects.
List< label > labelList
A List of labels.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix by subtracting the matrix multiplied by the current fi...
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.