40 namespace incompressible
58 adjointMeshMovementSolver::adjointMeshMovementSolver
68 dict_(
dict.subOrEmptyDict(
"adjointMeshMovementSolver")),
70 sensitivityPatchIDs_(sensitivityPatchIDs),
90 fixedValueFvPatchVectorField::typeName
96 "sourceAdjointMeshMovement",
106 adjointEikonalSolverPtr_(adjointEikonalSolverPtr)
116 dict_ =
dict.subOrEmptyDict(
"adjointMeshMovementSolver");
146 Info<<
"Adjoint Mesh Movement Iteration: " << iter <<
endl;
167 Info<<
"\n***Reached adjoint mesh movement convergence limit, " 168 "iteration " << iter <<
"***\n\n";
185 Info<<
"Calculating mesh movement sensitivities " <<
endl;
195 return meshMovementSens;
Solver of the adjoint to the Laplace grid displacement equation.
defineTypeNameAndDebug(adjointEikonalSolver, 0)
SolverPerformance< Type > solve(faMatrix< Type > &, const dictionary &)
Solve returning the solution statistics given convergence tolerance.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
void accumulateIntegrand(const scalar dt)
Accumulate source term.
autoPtr< boundaryVectorField > meshMovementSensPtr_
Wall face sens w.r.t.(x, y.z) //wall face sens w.r.t. (x,y.z)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void read()
Read options each time a new solution is found.
void reset()
Reset source term.
Base class for adjoint solvers.
const Time & time() const
Return the top-level database.
const dictionary & solverDict(const word &name) const
Return the solver controls dictionary for the given field.
bool read(const char *buf, int32_t &val)
Same as readInt32.
const dimensionedScalar e
Elementary charge.
autoPtr< typename GeometricField< Type, fvPatchField, volMesh >::Boundary > createZeroBoundaryPtr(const fvMesh &mesh, bool printAllocation=false)
Foam::incompressible::adjointSensitivity & adjointSensitivity_
A class for handling words, derived from Foam::string.
Abstract base class for adjoint-based sensitivities in incompressible flows.
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 bool readDict(const dictionary &dict)
Read dict if changed.
tmp< volVectorField > adjointMeshMovementSource()
Compute source term for adjoint mesh movement equation.
void solve()
Calculate the adjoint distance field.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
Type gMax(const FieldField< Field, Type > &f)
Ostream & printExecutionTime(OSstream &os) const
Print the elapsed ExecutionTime (cpu-time), ClockTime.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
const labelHashSet & sensitivityPatchIDs_
dimensionedScalar pow3(const dimensionedScalar &ds)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
boundaryVectorField & meshMovementSensitivities()
Return the sensitivity term depending on da.
Mesh data needed to do the Finite Volume discretisation.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
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...
virtual bool write(const bool valid=true) const
Write using setting from DB.
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.
const autoPtr< adjointEikonalSolver > & adjointEikonalSolverPtr_
const dimensionSet & dimensions() const noexcept
Return dimensions.
static constexpr const zero Zero
Global zero (0)
const volVectorField & ma()
Return the adjoint distance field.