Go to the documentation of this file.
38 namespace incompressible
56 adjointMeshMovementSolver::adjointMeshMovementSolver
66 dict_(
dict.subOrEmptyDict(
"adjointMeshMovementSolver")),
68 sensitivityPatchIDs_(sensitivityPatchIDs),
84 "sourceAdjointMeshMovement",
85 mesh_.time().timeName(),
93 meshMovementSensPtr_(createZeroBoundaryPtr<vector>(mesh_)),
94 adjointEikonalSolverPtr_(adjointEikonalSolverPtr)
104 dict_ =
dict.subOrEmptyDict(
"adjointMeshMovementSolver");
134 Info<<
"Adjoint Mesh Movement Iteration: " << iter <<
endl;
145 scalar residual =
mag(maEqn.
solve().initialResidual());
154 Info<<
"\n***Reached adjoint mesh movement convergence limit, "
155 "iteration " << iter <<
"***\n\n";
172 Info<<
"Calculating mesh movement sensitivities " <<
endl;
182 return meshMovementSens;
Defines the attributes of an object for which implicit objectRegistry management is supported,...
void boundaryManipulate(typename GeometricField< Type, fvPatchField, volMesh >::Boundary &values)
Manipulate based on a boundary field.
const autoPtr< adjointEikonalSolver > & adjointEikonalSolverPtr_
defineTypeNameAndDebug(adjointEikonalSolver, 0)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
void reset()
Reset source term.
static constexpr const zero Zero
Global zero (0)
void accumulateIntegrand(const scalar dt)
Accumulate source term.
void read()
Read options each time a new solution is found.
bool read(const char *buf, int32_t &val)
Same as readInt32.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
void solve()
Calculate the adjoint distance field.
boundaryVectorField & meshMovementSensitivities()
Return the sensitivity term depending on da.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Ostream & printExecutionTime(OSstream &os) const
Print the elapsed ExecutionTime (cpu-time), ClockTime.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Abstract base class for adjoint-based sensitivities in incompressible flows.
dimensionedScalar pow3(const dimensionedScalar &ds)
messageStream Info
Information stream (stdout output on master, null elsewhere)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Foam::incompressible::adjointSensitivity & adjointSensitivity_
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
virtual bool readDict(const dictionary &dict)
Read dict if changed.
const volVectorField & ma()
Return the adjoint distance field.
static tmp< volVectorField > autoCreateMeshMovementField(const fvMesh &mesh, const word &name, const dimensionSet &dims)
Auto create variable for mesh movement.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Volume discretisation.
autoPtr< boundaryVectorField > meshMovementSensPtr_
Wall face sens w.r.t.(x, y.z) //wall face sens w.r.t. (x,y.z)
const labelHashSet & sensitivityPatchIDs_
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
tmp< volVectorField > adjointMeshMovementSource()
Compute source term for adjoint mesh movement equation.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const dimensionedScalar e
Elementary charge.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
SolverPerformance< Type > solve(const dictionary &)
Solve returning the solution statistics.
const Time & time() const
Return the top-level database.
static const Vector< scalar > zero
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Type gMax(const FieldField< Field, Type > &f)
const Boundary & boundaryField() const
Return const-reference to the boundary field.