37namespace incompressible
51 for (
const label patchI : sensitivityPatchIDs_)
56 const scalar wei(
func.weight());
60 wei*
func.dxdbDirectMultiplier(patchI)*magSfDt;
74 for (
const label patchI : sensitivityPatchIDs_)
78 if (isA<adjointVectorBoundaryCondition>(Uab))
83 & refCast<adjointVectorBoundaryCondition>(Uab).dxdbMult()
93 tres(createZeroBoundaryPtr<vector>(meshShape_).ptr());
110 for (
const label patchI : sensitivityPatchIDs_)
112 const fvPatch& patch = meshShape_.boundary()[patchI];
121 + (gradUabf[patchI] & nf)
125 + adjointTurbulence().adjointMomentumBCSource()[patchI];
Generic GeometricBoundaryField class.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Base class for adjoint solvers.
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,...
virtual bool write()
Write the output fields.
Mesh data needed to do the Finite Volume discretisation.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const volScalarField & pa() const
Return const reference to pressure.
const volVectorField & Ua() const
Return const reference to velocity.
Base class for incompressibleAdjoint solvers.
const autoPtr< incompressibleAdjoint::adjointRASModel > & adjointTurbulence() const
Return const reference to the adjointRASModel.
const singlePhaseTransportModel & laminarTransport() const
Return const reference to transport model.
const autoPtr< incompressible::RASModelVariables > & RASModelVariables() const
Return const reference to the turbulence model variables.
Abstract base class for adjoint-based sensitivities in incompressible flows.
virtual void clearSensitivities()
Zero sensitivity fields and their constituents.
objectiveManager & objectiveManager_
incompressibleAdjointVars & adjointVars_
const incompressibleVars & primalVars_
virtual void clearSensitivities()
Zero sensitivity fields and their constituents.
autoPtr< boundaryVectorField > dxdbDirectMult_
autoPtr< boundaryVectorField > bcDxDbMult_
virtual void accumulateBCSensitivityIntegrand(const scalar dt)
Accumulate sensitivities enamating from the boundary conditions.
autoPtr< boundaryVectorField > dnfdbMult_
autoPtr< boundaryVectorField > dSfdbMult_
Fields related to direct sensitivities.
virtual void accumulateDirectSensitivityIntegrand(const scalar dt)
Accumulate direct sensitivities.
tmp< boundaryVectorField > dvdbMult() const
Compute multiplier of dv_i/db.
PtrList< objective > & getObjectiveFunctions()
Return reference to objective functions.
Abstract base class for objective functions. No point in making this runTime selectable since its chi...
void clearSensitivities()
Zero sensitivity fields and their constituents.
void write()
Write sensitivity fields.
A simple single-phase transport model based on viscosityModel.
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#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)
void func(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
autoPtr< typename GeometricField< Type, fvPatchField, volMesh >::Boundary > createZeroBoundaryPtr(const fvMesh &mesh, bool printAllocation=false)
A non-counting (dummy) refCount.