43 Foam::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());
122 beta_.primitiveFieldRef() = betaArg_;
125 beta_.correctBoundaryConditions();
133 const bool isTopoField,
134 const regularisationRadius& radius
138 regularise(alphaTilda_(), source, result, isTopoField, radius);
146 const bool isTopoField
150 regularise(alphaTilda_(), source, result, isTopoField, radius_());
159 sens *= sharpenFunction_->derivative(betaArg_);
165 regularise(sens, sens,
false);
Base class for selecting the regulatisation radius.
const word zeroGradientType
A zeroGradient patch field type.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
bool regularise_
Perform regulaisation on alpha before inputing it on beta?
constexpr char nl
The newline '\n' character (0x0a)
bool project_
Perform the projection (sharpening) step?
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
virtual void updateBeta()
Update the beta field.
Template invariant parts for fvPatchField.
Base class for selecting the regulatisation PDE.
const dimensionSet dimless
Dimensionless.
void regularise(const scalarField &source, scalarField &result, const bool isTopoField, const regularisationRadius &radius)
Regularise an externally provided radius.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
#define DebugInfo
Report an information message using Foam::Info.
defineTypeNameAndDebug(combustionModel, 0)
void postProcessSens(scalarField &sens)
Update part of fieldRegularisation to the sensitivitiy derivatives.
Mesh data needed to do the Finite Volume discretisation.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Defines the attributes of an object for which implicit objectRegistry management is supported...
static constexpr const zero Zero
Global zero (0)