39 namespace incompressible
99 divDxDbMult_(mesh_.nCells(),
Zero),
100 optionsDxDbMult_(mesh_.nCells(),
Zero),
102 includeDistance_(false),
103 eikonalSolver_(nullptr)
136 if (func.hasDivDxDbMult())
139 func.weight()*func.divDxDbMultiplier().primitiveField()*dt;
autoPtr< adjointEikonalSolver > eikonalSolver_
Adjoint eikonal equation solver.
const incompressibleVars & primalVars_
virtual bool readDict(const dictionary &dict)
Read dictionary if changed.
defineTypeNameAndDebug(adjointEikonalSolver, 0)
volTensorField gradDxDbMult_
grad(dx/db) multiplier
virtual void accumulateDirectSensitivityIntegrand(const scalar dt)
Accumulate direct sensitivities.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
PtrList< objective > & getObjectiveFunctions()
Return reference to objective functions.
void postProcessSens(Field< Type > &sensField, const word &fieldName=word::null, const word &designVariablesName=word::null)
Post process sensitivity field related to the fvOption.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
void read()
Read options and update solver pointers if necessary.
virtual void accumulateIntegrand(const scalar dt)
Accumulate sensitivity integrands.
Base class for adjoint solvers.
virtual void clearSensitivities()
Zero sensitivity fields and their constituents.
Generic dimensioned Type class.
Macros for easy insertion into run-time selection tables.
bool read(const char *buf, int32_t &val)
Same as readInt32.
objectiveManager & objectiveManager_
Base class for incompressibleAdjoint solvers.
scalarField divDxDbMult_
div(dx/db) multiplier
const dictionary & dict() const
Return the construction dictionary.
virtual bool readDict(const dictionary &dict)
Read dict if changed.
const autoPtr< incompressibleAdjoint::adjointRASModel > & adjointTurbulence() const
Return const reference to the adjointRASModel.
dimensioned< tensor > dimensionedTensor
Dimensioned tensor obtained from generic dimensioned type.
const word & solverName() const
Return solver name.
bool includeDistance_
Include distance variation in sens computation.
Abstract base class for objective functions. No point in making this runTime selectable since its chi...
virtual void clearSensitivities()
Zero sensitivity fields and their constituents.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
const autoPtr< incompressible::RASModelVariables > & RASModelVariables() const
Return const reference to the turbulence model variables.
tmp< volTensorField > computeGradDxDbMultiplier()
Compute the volTensorField multiplying grad(dxdb) for the volume-based approach to compute shape sens...
vectorField optionsDxDbMult_
dx/db multiplier coming from fvOptions
dimensionedScalar pow3(const dimensionedScalar &ds)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Mesh data needed to do the Finite Volume discretisation.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
incompressibleAdjointVars & adjointVars_
static options & New(const fvMesh &mesh)
Construct fvOptions and register to database if not present.
Defines the attributes of an object for which implicit objectRegistry management is supported...
Base class for Field Integral-based sensitivity derivatives.
const dimensionSet & dimensions() const noexcept
Return dimensions.
Solver of the adjoint to the eikonal PDE.
virtual void accumulateBCSensitivityIntegrand(const scalar dt)
Accumulate sensitivities enamating from the boundary conditions.
static constexpr const zero Zero
Global zero (0)