64 gradDxDbMult += eikonalSolver->getFISensitivityTerm();
75 PtrList<objective>& functions =
77 getObjectiveFunctions();
78 for (objective& func : functions)
80 if (func.hasDivDxDbMult())
93 adjointMeshMovementSolver::adjointMeshMovementSolver
101 dict_(
dict.subOrEmptyDict(
"adjointMeshMovementSolver")),
119 "sourceadjointMeshMovement",
146 dict_ =
dict.subOrEmptyDict(
"adjointMeshMovementSolver");
158 for (label iter = 0; iter <
iters_; iter++)
160 Info<<
"adjoint Mesh Movement Iteration: " << iter <<
endl;
179 Info<<
"\n***Reached adjoint mesh movement convergence limit, " 180 "iteration " << iter <<
"***\n\n";
210 return meshMovementSens;
label iters_
Solution controls.
void reset()
Reset the source term.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
const surfaceVectorField & Sf() const
Return cell face area vectors.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Forwards and collection of common volume field types.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Abstract base class for adjoint-based sensitivities.
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void solve()
Calculate the adjoint distance field.
const Time & time() const
Return the top-level database.
const dictionary & solverDict(const word &name) const
The solver controls dictionary for the given field. Same as solversDict().subDict(...)
const adjointSolver & getAdjointSolver() const
Const access to adjoint solver.
volVectorField ma_
Adjoint grid displacement field.
const autoPtr< volTensorField > & gradDxDbMult() const
void read()
Read options each time a new solution is found.
Class solving the adjoint grid dispalcement PDEs. Assumes the primal grid displacement PDE is a Lapla...
boundaryVectorField & meshMovementSensitivities()
Return the sensitivity term depending on ma.
const objectiveManager & getObjectiveManager() const
Return a const reference to the objective manager.
volVectorField source_
Source term of the adjoint grid displacement PDEs.
autoPtr< typename GeometricField< Type, fvPatchField, volMesh >::Boundary > createZeroBoundaryPtr(const fvMesh &mesh, bool printAllocation=false)
virtual bool write(const bool writeOnProc=true) const
Write using setting from DB.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
virtual const labelHashSet & geometryVariationIntegrationPatches() const
Return set of patches on which to compute direct sensitivities.
SolverPerformance< Type > solve(faMatrix< Type > &, const dictionary &solverControls)
Solve returning the solution statistics given convergence tolerance.
virtual bool readDict(const dictionary &dict)
Read dict if changed.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
autoPtr< adjointEikonalSolver > & getAdjointEikonalSolver()
Return the adjoint eikonal solver.
Type gMax(const FieldField< Field, Type > &f)
defineTypeNameAndDebug(combustionModel, 0)
Ostream & printExecutionTime(OSstream &os) const
Print the elapsed ExecutionTime (cpu-time), ClockTime.
Base class supporting Shape sensitivity derivatives.
ShapeSensitivitiesBase & adjointSensitivity_
Base class for creating a set of variables.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field values.
const autoPtr< vectorField > & optionsDxDbMult() const
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Mesh data needed to do the Finite Volume discretisation.
autoPtr< boundaryVectorField > meshMovementSensPtr_
Part of sensitivity derivatives coming from the adjoint grid displacement PDE.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
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...
Defines the attributes of an object for which implicit objectRegistry management is supported...
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
dictionary dict_
Dictionary containing solution controls.
void setSource()
Set the source term of the PDE.
const fvMesh & mesh_
Reference to mesh.
const dimensionSet & dimensions() const noexcept
Return dimensions.
static constexpr const zero Zero
Global zero (0)