64 gradDxDbMult += eikonalSolver->getFISensitivityTerm();
71 & reverseLinear<tensor>(
mesh_).interpolate(gradDxDbMult)
75 PtrList<objective>& functions =
77 getObjectiveFunctions();
78 for (objective& func : functions)
80 if (func.hasDivDxDbMult())
93adjointMeshMovementSolver::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;
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Base class supporting Shape sensitivity derivatives.
virtual const labelHashSet & geometryVariationIntegrationPatches() const
Return set of patches on which to compute direct sensitivities.
Ostream & printExecutionTime(OSstream &os) const
Print the elapsed ExecutionTime (cpu-time), ClockTime.
Class solving the adjoint grid dispalcement PDEs. Assumes the primal grid displacement PDE is a Lapla...
volVectorField source_
Source term of the adjoint grid displacement PDEs.
autoPtr< boundaryVectorField > meshMovementSensPtr_
Part of sensitivity derivatives coming from the adjoint grid displacement PDE.
const fvMesh & mesh_
Reference to mesh.
ShapeSensitivitiesBase & adjointSensitivity_
dictionary dict_
Dictionary containing solution controls.
virtual bool readDict(const dictionary &dict)
Read dict if changed.
boundaryVectorField & meshMovementSensitivities()
Return the sensitivity term depending on ma.
void read()
Read options each time a new solution is found.
volVectorField ma_
Adjoint grid displacement field.
void setSource()
Set the source term of the PDE.
void reset()
Reset the source term.
label iters_
Solution controls.
virtual void solve()
Calculate the adjoint distance field.
Abstract base class for adjoint-based sensitivities.
autoPtr< adjointEikonalSolver > & getAdjointEikonalSolver()
Return the adjoint eikonal solver.
const autoPtr< volTensorField > & gradDxDbMult() const
const adjointSolver & getAdjointSolver() const
Const access to adjoint solver.
const objectiveManager & getObjectiveManager() const
Return a const reference to the objective manager.
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,...
void boundaryManipulate(typename GeometricField< Type, fvPatchField, volMesh >::Boundary &values)
Manipulate based on a boundary field.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
const surfaceVectorField & Sf() const
Return cell face area vectors.
Abstract base class for objective functions. No point in making this runTime selectable since its chi...
virtual bool write(const bool writeOnProc=true) const
Write using setting from DB.
Inversed weight central-differencing interpolation scheme class.
const dictionary & solverDict(const word &name) const
The solver controls dictionary for the given field. Same as solversDict().subDict(....
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &, const tmp< surfaceScalarField > &, const tmp< surfaceScalarField > &)
Return the face-interpolate of the given cell field.
Base class for creating a set of variables.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
bool read(const char *buf, int32_t &val)
Same as readInt32.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
GeometricField< tensor, fvPatchField, volMesh > volTensorField
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
fvMatrix< vector > fvVectorMatrix
SolverPerformance< Type > solve(faMatrix< Type > &, const dictionary &solverControls)
Solve returning the solution statistics given convergence tolerance.
static constexpr const zero Zero
Global zero (0).
autoPtr< typename GeometricField< Type, fvPatchField, volMesh >::Boundary > createZeroBoundaryPtr(const fvMesh &mesh, bool printAllocation=false)
volVectorField::Boundary boundaryVectorField
Type gMax(const FieldField< Field, Type > &f)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Forwards and collection of common volume field types.