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());
156 Info<<
"\n***Reached adjoint mesh movement convergence limit, "
157 "iteration " << iter <<
"***\n\n";
174 Info<<
"Calculating mesh movement sensitivities " <<
endl;
184 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.
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.
T lookupOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
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.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Abstract base class for adjoint-based sensitivities in incompressible flows.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedScalar pow3(const dimensionedScalar &ds)
messageStream Info
Information stream (uses stdout - output is on the master only)
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)
double elapsedCpuTime() const
Return CPU time (in seconds) from the start.
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
Type gMax(const FieldField< Field, Type > &f)
double elapsedClockTime() const
Returns wall-clock time from clock instantiation.
const Boundary & boundaryField() const
Return const-reference to the boundary field.