objectivePartialVolume Class Reference
Inheritance diagram for objectivePartialVolume:
[legend]
Collaboration diagram for objectivePartialVolume:
[legend]

Public Member Functions

 TypeName ("partialVolume")
 Runtime type information. More...
 
 objectivePartialVolume (const fvMesh &mesh, const dictionary &dict, const word &adjointSolverName, const word &primalSolverName)
 from components More...
 
virtual ~objectivePartialVolume ()=default
 Destructor. More...
 
scalar J ()
 Return the objective function value. More...
 
void update_dxdbDirectMultiplier ()
 
void update_dSdbMultiplier ()
 
void write () const
 Write objective function history. More...
 
- Public Member Functions inherited from objectiveIncompressible
 TypeName ("incompressible")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, objectiveIncompressible, dictionary,(const fvMesh &mesh, const dictionary &dict, const word &adjointSolverName, const word &primalSolverName),(mesh, dict, adjointSolverName, primalSolverName))
 
 objectiveIncompressible (const fvMesh &mesh, const dictionary &dict, const word &adjointSolverName, const word &primalSolverName)
 Construct from components. More...
 
virtual ~objectiveIncompressible ()=default
 Destructor. More...
 
const volVectorFielddJdv ()
 Contribution to field adjoint momentum eqs. More...
 
const volScalarFielddJdp ()
 Contribution to field adjoint continuity eq. More...
 
const volScalarFielddJdT ()
 Contribution to field adjoint energy eq. More...
 
const volScalarFielddJdTMvar1 ()
 Contribution to field adjoint turbulence model variable 1. More...
 
const volScalarFielddJdTMvar2 ()
 Contribution to field adjoint turbulence model variable 2. More...
 
const fvPatchVectorFieldboundarydJdv (const label)
 Objective partial deriv wrt velocity for a specific patch. More...
 
const fvPatchScalarFieldboundarydJdvn (const label)
 Objective partial deriv wrt normal velocity for a specific patch. More...
 
const fvPatchVectorFieldboundarydJdvt (const label)
 Objective partial deriv wrt tangent velocity for a specific patch. More...
 
const fvPatchVectorFieldboundarydJdp (const label)
 
const fvPatchScalarFieldboundarydJdT (const label)
 Objective partial deriv wrt temperature for a specific patch. More...
 
const fvPatchScalarFieldboundarydJdTMvar1 (const label)
 
const fvPatchScalarFieldboundarydJdTMvar2 (const label)
 
const boundaryVectorFieldboundarydJdv ()
 Objective partial deriv wrt velocity for all patches. More...
 
const boundaryScalarFieldboundarydJdvn ()
 Objective partial deriv wrt normal velocity for all patches. More...
 
const boundaryVectorFieldboundarydJdvt ()
 Objective partial deriv wrt tangent velocity for all patches. More...
 
const boundaryVectorFieldboundarydJdp ()
 Objective partial deriv wrt pressure (times normal) for all patches. More...
 
const boundaryScalarFieldboundarydJdT ()
 Objective partial deriv wrt temperature for all patches. More...
 
const boundaryScalarFieldboundarydJdTMvar1 ()
 Objective partial deriv wrt turbulence model var 1 for all patches. More...
 
const boundaryScalarFieldboundarydJdTMvar2 ()
 Objective partial deriv wrt turbulence model var 2 for all patches. More...
 
virtual void update ()
 Update objective function derivatives. More...
 
virtual void nullify ()
 Update objective function derivatives. More...
 
virtual void update_dJdv ()
 Update vol and boundary fields and derivatives. More...
 
virtual void update_dJdp ()
 
virtual void update_dJdT ()
 
virtual void update_dJdTMvar1 ()
 
virtual void update_dJdTMvar2 ()
 
virtual void update_dJdb ()
 
virtual void update_divDxDbMultiplier ()
 Update div( dx/db multiplier). Volume-based sensitivity term. More...
 
virtual void update_gradDxDbMultiplier ()
 Update grad( dx/db multiplier). Volume-based sensitivity term. More...
 
virtual void update_boundarydJdv ()
 
virtual void update_boundarydJdvn ()
 
virtual void update_boundarydJdvt ()
 
virtual void update_boundarydJdp ()
 
virtual void update_boundarydJdT ()
 
virtual void update_boundarydJdTMvar1 ()
 
virtual void update_boundarydJdTMvar2 ()
 
virtual void update_boundarydJdb ()
 Update objective function derivative term. More...
 
virtual void update_dndbMultiplier ()
 Update d (normal) / db multiplier. Surface-based sensitivity term. More...
 
virtual void update_dxdbMultiplier ()
 Update d (x) / db multiplier. Surface-based sensitivity term. More...
 
virtual void update_meanValues ()
 
bool hasdJdv () const
 Inline functions for checking whether pointers are set or not. More...
 
bool hasdJdp () const
 
bool hasdJdT () const
 
bool hasdJdTMVar1 () const
 
bool hasdJdTMVar2 () const
 
bool hasBoundarydJdv () const
 
bool hasBoundarydJdvn () const
 
bool hasBoundarydJdvt () const
 
bool hasBoundarydJdp () const
 
bool hasBoundarydJdT () const
 
bool hasBoundarydJdTMVar1 () const
 
bool hasBoundarydJdTMVar2 () const
 
- Public Member Functions inherited from objective
 TypeName ("objective")
 Runtime type information. More...
 
 declareRunTimeNewSelectionTable (autoPtr, objective, objective,(const fvMesh &mesh, const dictionary &dict, const word &adjointSolverName, const word &primalSolverName),(mesh, dict, adjointSolverName, primalSolverName))
 
 objective (const fvMesh &mesh, const dictionary &dict, const word &adjointSolverName, const word &primalSolverName)
 Construct from components. More...
 
virtual ~objective ()=default
 Destructor. More...
 
virtual bool readDict (const dictionary &dict)
 
scalar JCycle () const
 
void accumulateJMean (solverControl &solverControl)
 Accumulate contribution for the mean objective value. More...
 
void accumulateJMean ()
 Accumulate contribution for the mean objective value. More...
 
scalar weight () const
 Return the objective function weight. More...
 
bool isWithinIntegrationTime () const
 Check whether this is an objective integration time. More...
 
void incrementIntegrationTimes (const scalar timeSpan)
 Increment integration times. More...
 
const volScalarFielddJdb ()
 Contribution to field sensitivities. More...
 
const fvPatchVectorFieldboundarydJdb (const label)
 Contribution to surface sensitivities for a specific patch. More...
 
const fvPatchVectorFielddSdbMultiplier (const label)
 Multiplier of delta(n dS)/delta b. More...
 
const fvPatchVectorFielddndbMultiplier (const label)
 Multiplier of delta(n dS)/delta b. More...
 
const fvPatchVectorFielddxdbMultiplier (const label)
 Multiplier of delta(x)/delta b. More...
 
const fvPatchVectorFielddxdbDirectMultiplier (const label)
 Multiplier of delta(x)/delta b. More...
 
const vectorFieldboundaryEdgeMultiplier (const label patchI, const label edgeI)
 Multiplier located at patch boundary edges. More...
 
const fvPatchTensorFieldboundarydJdStress (const label)
 Objective partial deriv wrt stress tensor. More...
 
const boundaryVectorFieldboundarydJdb ()
 Contribution to surface sensitivities for all patches. More...
 
const boundaryVectorFielddSdbMultiplier ()
 Multiplier of delta(n dS)/delta b for all patches. More...
 
const boundaryVectorFielddndbMultiplier ()
 Multiplier of delta(n dS)/delta b for all patches. More...
 
const boundaryVectorFielddxdbMultiplier ()
 Multiplier of delta(x)/delta b for all patches. More...
 
const boundaryVectorFielddxdbDirectMultiplier ()
 Multiplier of delta(x)/delta b for all patches. More...
 
const vectorField3boundaryEdgeMultiplier ()
 Multiplier located at patch boundary edges. More...
 
const boundaryTensorFieldboundarydJdStress ()
 Objective partial deriv wrt stress tensor. More...
 
const volScalarFielddivDxDbMultiplier ()
 Multiplier of grad( delta(x)/delta b) for volume-based sensitivities. More...
 
const volTensorFieldgradDxDbMultiplier ()
 Multiplier of grad( delta(x)/delta b) for volume-based sensitivities. More...
 
virtual void updateNormalizationFactor ()
 
virtual void update_boundaryEdgeContribution ()
 Update boundary edge contributions. More...
 
virtual void update_dJdStressMultiplier ()
 Update dJ/dStress field. More...
 
virtual void writeInstantaneousValue () const
 Write objective function history at each primal solver iteration. More...
 
virtual void writeMeanValue () const
 Write mean objective function history. More...
 
const wordobjectiveName () const
 
bool hasdJdb () const
 
bool hasBoundarydJdb () const
 
bool hasdSdbMult () const
 
bool hasdndbMult () const
 
bool hasdxdbMult () const
 
bool hasdxdbDirectMult () const
 
bool hasBoundaryEdgeContribution () const
 
bool hasBoundarydJdStress () const
 
bool hasDivDxDbMult () const
 
bool hasGradDxDbMult () const
 
bool hasIntegrationStartTime () const
 
bool hasIntegrationEndTime () const
 

Additional Inherited Members

- Static Public Member Functions inherited from objectiveIncompressible
static autoPtr< objectiveIncompressibleNew (const fvMesh &mesh, const dictionary &dict, const word &adjointSolverName, const word &primalSolverName)
 Return a reference to the selected turbulence model. More...
 
- Static Public Member Functions inherited from objective
static autoPtr< objectiveNew (const fvMesh &mesh, const dictionary &dict, const word &objectiveType, const word &adjointSolverName, const word &primalSolverName)
 Return a reference to the selected turbulence model. More...
 
- Protected Member Functions inherited from objective
const dictionarydict () const
 Return objective dictionary. More...
 
void setObjectiveFilePtr () const
 Set the output file ptr. More...
 
void setInstantValueFilePtr () const
 Set the output file ptr for the instantaneous value. More...
 
void setMeanValueFilePtr () const
 Set the output file ptr for the mean value. More...
 
- Protected Attributes inherited from objectiveIncompressible
const incompressibleVarsvars_
 
autoPtr< volVectorFielddJdvPtr_
 
autoPtr< volScalarFielddJdpPtr_
 
autoPtr< volScalarFielddJdTPtr_
 
autoPtr< volScalarFielddJdTMvar1Ptr_
 First turbulence model variable. More...
 
autoPtr< volScalarFielddJdTMvar2Ptr_
 Second turbulence model variable. More...
 
autoPtr< boundaryVectorFieldbdJdvPtr_
 
autoPtr< boundaryScalarFieldbdJdvnPtr_
 Adjoint outlet pressure. More...
 
autoPtr< boundaryVectorFieldbdJdvtPtr_
 Adjoint outlet velocity. More...
 
autoPtr< boundaryVectorFieldbdJdpPtr_
 Adjoint (intlet,wall) velocity. More...
 
autoPtr< boundaryScalarFieldbdJdTPtr_
 Adjoint outlet temperature. More...
 
autoPtr< boundaryScalarFieldbdJdTMvar1Ptr_
 Adjoint outlet turbulence model var 1. More...
 
autoPtr< boundaryScalarFieldbdJdTMvar2Ptr_
 Adjoint outlet turbulence model var 2. More...
 
- Protected Attributes inherited from objective
const fvMeshmesh_
 
dictionary dict_
 
const word adjointSolverName_
 
const word primalSolverName_
 
const word objectiveName_
 
bool computeMeanFields_
 
bool nullified_
 
scalar J_
 
scalar JMean_
 
scalar weight_
 
autoPtr< scalar > integrationStartTimePtr_
 
autoPtr< scalar > integrationEndTimePtr_
 
autoPtr< volScalarFielddJdbPtr_
 
autoPtr< boundaryVectorFieldbdJdbPtr_
 Term from material derivative. More...
 
autoPtr< boundaryVectorFieldbdSdbMultPtr_
 Term multiplying delta(n dS)/delta b. More...
 
autoPtr< boundaryVectorFieldbdndbMultPtr_
 Term multiplying delta(n)/delta b. More...
 
autoPtr< boundaryVectorFieldbdxdbMultPtr_
 Term multiplying delta(x)/delta b at the boundary. More...
 
autoPtr< boundaryVectorFieldbdxdbDirectMultPtr_
 
autoPtr< vectorField3bEdgeContribution_
 
autoPtr< boundaryTensorFieldbdJdStressPtr_
 For use with discrete-like sensitivities. More...
 
autoPtr< volScalarFielddivDxDbMultPtr_
 Multiplier of d(Volume)/db. More...
 
autoPtr< volTensorFieldgradDxDbMultPtr_
 Emerging from volume objectives that include spatial derivatives. More...
 
fileName objFunctionFolder_
 Output file variables. More...
 
autoPtr< OFstreamobjFunctionFilePtr_
 File to keep the objective values after the end of the primal solver. More...
 
autoPtr< OFstreaminstantValueFilePtr_
 
autoPtr< OFstreammeanValueFilePtr_
 

Detailed Description

Constructor & Destructor Documentation

◆ objectivePartialVolume()

objectivePartialVolume ( const fvMesh mesh,
const dictionary dict,
const word adjointSolverName,
const word primalSolverName 
)

from components

Definition at line 57 of file objectivePartialVolume.C.

References dict, forAllConstIters(), Foam::gSum(), Foam::oneThird, and Foam::foamVersion::patch.

Here is the call graph for this function:

◆ ~objectivePartialVolume()

virtual ~objectivePartialVolume ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "partialVolume"  )

Runtime type information.

◆ J()

scalar J ( )
virtual

Return the objective function value.

Implements objectiveIncompressible.

Definition at line 98 of file objectivePartialVolume.C.

References fvMesh::boundary(), forAllConstIters(), Foam::gSum(), objective::J_, objective::mesh_, Foam::oneThird, Foam::foamVersion::patch, and Foam::Zero.

Here is the call graph for this function:

◆ update_dxdbDirectMultiplier()

void update_dxdbDirectMultiplier ( )
virtual

Update d (x) / db multiplier. Surface and volume-based sensitivity term

Reimplemented from objectiveIncompressible.

Definition at line 114 of file objectivePartialVolume.C.

References objective::bdxdbDirectMultPtr_, fvMesh::boundary(), forAllConstIter, objective::mesh_, Foam::oneThird, and Foam::foamVersion::patch.

Here is the call graph for this function:

◆ update_dSdbMultiplier()

void update_dSdbMultiplier ( )
virtual

Update d (normal dS) / db multiplier. Surface and volume-based sensitivity term

Reimplemented from objectiveIncompressible.

Definition at line 128 of file objectivePartialVolume.C.

References objective::bdSdbMultPtr_, fvMesh::boundary(), forAllConstIter, objective::mesh_, Foam::oneThird, and Foam::foamVersion::patch.

Here is the call graph for this function:

◆ write()

void write ( ) const
virtual

Write objective function history.

Reimplemented from objectiveIncompressible.

Definition at line 140 of file objectivePartialVolume.C.

References IOstream::defaultPrecision(), Foam::endl(), objective::J_, UPstream::master(), objective::mesh_, objective::objFunctionFilePtr_, objective::setObjectiveFilePtr(), Foam::setw(), fvMesh::time(), and dimensioned< Type >::value().

Here is the call graph for this function:

The documentation for this class was generated from the following files: