59 fixedValueFvPatchScalarField::typeName
75 const scalar defaultEps =
77 subOrEmptyDict(
"advectionDiffusionCoeffs").
78 getOrDefault<scalar>(
"epsilon", 0.1);
110 nybf[patchi] == -
patches[patchi].nf();
123 adjointEikonalSolver::adjointEikonalSolver
132 dict_(
dict.subOrEmptyDict(
"adjointEikonalSolver")),
134 sensitivityPatchIDs_(sensitivityPatchIDs),
231 Info<<
"Adjoint Eikonal Iteration : " << iter <<
endl;
245 scalar residual = daEqn.solve().initialResidual();
255 Info<<
"\n***Reached adjoint eikonal convergence limit, iteration " 256 << iter <<
"***\n\n";
276 Info<<
"Calculating distance sensitivities " <<
endl;
288 distanceSens[patchi] =
299 Info<<
"Calculating distance sensitivities " <<
endl;
351 distanceSens.correctBoundaryConditions();
353 return tdistanceSens;
359 const word& designVarsName
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
tmp< scalarField > topologySensitivities(const word &designVarsName) const
Return sensitivity contribution to topology optimisation.
tmp< volVectorField > gradEikonal()
Return the gradient of the eikonal equation.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
void size(const label n)
Older name for setAddressableSize.
const surfaceVectorField & Sf() const
Return cell face area vectors.
const Internal::FieldType & primitiveField() const noexcept
Return a const-reference to the internal field values.
void accumulateIntegrand(const scalar dt)
Accumulate source term.
labelHashSet wallPatchIDs_
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...
const word & name() const noexcept
Return the object name.
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
GeometricField< tensor, fvPatchField, volMesh > volTensorField
boundaryVectorField & distanceSensitivities()
Return the sensitivity term depending on da.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
wordList patchTypes(nPatches)
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface...
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const volScalarField & da()
Return the adjoint distance field.
Base class for adjoint solvers.
Ignore writing from objectRegistry::writeObject()
const dimensionSet dimless
Dimensionless.
const Time & time() const
Return the top-level database.
void solve()
Calculate the adjoint distance field.
GeometricField< vector, fvPatchField, volMesh > volVectorField
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
bool read(const char *buf, int32_t &val)
Same as readInt32.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionedScalar e
Elementary charge.
wordList patchTypes() const
Return the boundary condition types for da.
autoPtr< typename GeometricField< Type, fvPatchField, volMesh >::Boundary > createZeroBoundaryPtr(const fvMesh &mesh, bool printAllocation=false)
tmp< surfaceScalarField > computeYPhi()
Compute convecting velocity.
const labelHashSet & sensitivityPatchIDs_
A class for handling words, derived from Foam::string.
void reset()
Reset source term.
label size() const noexcept
The number of entries in the list.
tmp< volTensorField > getFISensitivityTerm() const
Return the volume-based sensitivity term depending on da.
virtual bool write(const bool writeOnProc=true) const
Write using setting from DB.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
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.
zeroField SuSp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
const dictionary & schemesDict() const
The entire dictionary or the optional "select" sub-dictionary.
const volScalarField & d()
Return the distance field.
Calculation of adjoint based sensitivities for topology optimisation. This returns just the field par...
dimensioned< tensor > dimensionedTensor
Dimensioned tensor obtained from generic dimensioned type.
autoPtr< boundaryVectorField > distanceSensPtr_
Wall face sens w.r.t. (x,y.z)
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
int debug
Static debugging option.
Type gMax(const FieldField< Field, Type > &f)
virtual tmp< volScalarField > adjointEikonalSource()
Return the source the adjoint eikonal equation.
defineTypeNameAndDebug(combustionModel, 0)
Ostream & printExecutionTime(OSstream &os) const
Print the elapsed ExecutionTime (cpu-time), ClockTime.
static void postProcessSens(scalarField &sens, scalarField &auxSens, fv::options &fvOptions, const word &fieldName, const word &designVariablesName)
Add part of the sensitivities coming from fvOptions.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Mesh data needed to do the Finite Volume discretisation.
const polyBoundaryMesh & patches
Automatically write from objectRegistry::writeObject()
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Internal & ref(const bool updateAccessTime=true)
Same as internalFieldRef()
const fvBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
void read()
Read options each time a new solution is found.
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...
A class for managing temporary objects.
virtual tmp< volScalarField > yWall() const
Return the distance field, to be used in the solution of the adjoint eikonal PDE. ...
static options & New(const fvMesh &mesh)
Construct fvOptions and register to database if not present.
Solver of the adjoint to the eikonal PDE.
Defines the attributes of an object for which implicit objectRegistry management is supported...
adjointSolver & adjointSolver_
virtual bool readDict(const dictionary &dict)
Read dict if changed.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
Do not request registration (bool: false)
const dimensionSet & dimensions() const noexcept
Return dimensions.
static constexpr const zero Zero
Global zero (0)