43Foam::fieldRegularisation::fieldRegularisation
54 regularise_(
dict.getOrDefault<bool>(
"regularise", false)),
55 project_(
dict.getOrDefault<bool>(
"project", regularise_)),
73 fixedValueFvPatchScalarField::
typeName
84 betaArg_(regularise_ ? alphaTilda_().primitiveField() : alpha_),
85 growFromWalls_(
dict.getOrDefault<bool>(
"growFromWalls", false)),
113 regularise(alpha_, alphaTilda_(),
true);
118 sharpenFunction_->interpolate(betaArg_, beta_.primitiveFieldRef());
125 beta_.correctBoundaryConditions();
133 const bool isTopoField,
134 const regularisationRadius& radius
146 const bool isTopoField
159 sens *= sharpenFunction_->derivative(betaArg_);
165 regularise(sens, sens,
false);
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool growFromWalls_
Whether to apply a fixedValue BC or zeroGradient one to alphaTilda, when regularisation is performed.
autoPtr< regularisationRadius > radius_
Smoothing radius.
bool regularise_
Perform regulaisation on alpha before inputing it on beta?
virtual void updateBeta()
Update the beta field.
bool project_
Perform the projection (sharpening) step?
volScalarField beta_
Beta is the field used for all interpolations between fluid and solid in topology optimisation.
autoPtr< topOInterpolationFunction > sharpenFunction_
Function used to sharpen the field after regularisation.
void postProcessSens(scalarField &sens)
Update part of fieldRegularisation to the sensitivitiy derivatives.
autoPtr< volScalarField > alphaTilda_
The regularised alpha field, if regulatisation is performed.
void regularise(const scalarField &source, scalarField &result, const bool isTopoField, const regularisationRadius &radius)
Regularise an externally provided radius.
autoPtr< regularisationPDE > regularisationPDE_
PDE used for the regularisation.
const topOZones & zones_
Cell zones related to topology optimisation.
const scalarField & betaArg_
Argument of the beta field.
const scalarField & alpha_
Alpha field (design variables of topology optimisation).
Mesh data needed to do the Finite Volume discretisation.
Template invariant parts for fvPatchField.
Base class for selecting the regulatisation PDE.
Base class for selecting the regulatisation radius.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define DebugInfo
Report an information message using Foam::Info.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
const dimensionSet dimless
Dimensionless.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0).
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
constexpr char nl
The newline '\n' character (0x0a).