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

Public Member Functions

 TypeName ("optionAdjointList")
 Runtime type information. More...
 
 optionAdjointList (const fvMesh &mesh)
 Construct null. More...
 
 optionAdjointList (const fvMesh &mesh, const dictionary &dict)
 Construct from mesh and dictionary. More...
 
virtual ~optionAdjointList ()=default
 Destructor. More...
 
void reset (const dictionary &dict)
 Reset the source list. More...
 
template<class Type >
void correct (GeometricField< Type, fvPatchField, volMesh > &fld)
 Correct. More...
 
template<class Type >
tmp< fvMatrix< Type > > operator() (GeometricField< Type, fvPatchField, volMesh > &fld)
 Return source for equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > operator() (GeometricField< Type, fvPatchField, volMesh > &fld, const word &fieldName)
 Return source for equation with specified name. More...
 
template<class Type >
tmp< fvMatrix< Type > > operator() (const volScalarField &rho, GeometricField< Type, fvPatchField, volMesh > &fld)
 Return source for equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > operator() (const volScalarField &rho, GeometricField< Type, fvPatchField, volMesh > &fld, const word &fieldName)
 Return source for equation with specified name. More...
 
template<class Type >
tmp< fvMatrix< Type > > operator() (const volScalarField &alpha, const volScalarField &rho, GeometricField< Type, fvPatchField, volMesh > &fld)
 Return source for equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > operator() (const volScalarField &alpha, const volScalarField &rho, GeometricField< Type, fvPatchField, volMesh > &fld, const word &fieldName)
 Return source for equation with specified name. More...
 
template<class Type >
void constrain (fvMatrix< Type > &eqn)
 Apply constraints to equation. More...
 
virtual bool read (const dictionary &dict)
 Read dictionary. More...
 
virtual bool writeData (Ostream &os) const
 Write data to Ostream. More...
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > operator() (GeometricField< Type, fvPatchField, volMesh > &fld)
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > operator() (GeometricField< Type, fvPatchField, volMesh > &fld, const word &fieldName)
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > operator() (const volScalarField &rho, GeometricField< Type, fvPatchField, volMesh > &fld)
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > operator() (const volScalarField &rho, GeometricField< Type, fvPatchField, volMesh > &fld, const word &fieldName)
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > operator() (const volScalarField &alpha, const volScalarField &rho, GeometricField< Type, fvPatchField, volMesh > &fld)
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > operator() (const volScalarField &alpha, const volScalarField &rho, GeometricField< Type, fvPatchField, volMesh > &fld, const word &fieldName)
 
- Public Member Functions inherited from PtrList< optionAdjoint >
constexpr PtrList () noexcept
 Construct null. More...
 
 PtrList (const label len)
 Construct with specified size, each element initialized to nullptr. More...
 
 PtrList (const PtrList< optionAdjoint > &list)
 Copy construct using 'clone()' method on each element. More...
 
 PtrList (PtrList< optionAdjoint > &&list)
 Move construct. More...
 
 PtrList (UList< optionAdjoint * > &list)
 Take ownerskip of pointers in the list, set old pointers to null. More...
 
 PtrList (const PtrList< optionAdjoint > &list, const CloneArg &cloneArgs)
 Copy construct using 'clone()' method on each element. More...
 
 PtrList (PtrList< optionAdjoint > &list, bool reuse)
 Construct as copy or re-use as specified. More...
 
 PtrList (const SLPtrList< optionAdjoint > &list)
 Copy construct using 'clone()' on each element of SLPtrList<T> More...
 
 PtrList (Istream &is, const INew &inew)
 Construct from Istream using given Istream constructor class. More...
 
 PtrList (Istream &is)
 Construct from Istream using default Istream constructor class. More...
 
 ~PtrList ()
 Destructor. More...
 
PtrList< optionAdjoint > clone (Args &&... args) const
 Make a copy by cloning each of the list elements. More...
 
Foam::PtrList< optionAdjoint > clone (Args &&... args) const
 
void clear ()
 Clear the PtrList. Delete allocated entries and set size to zero. More...
 
void resize (const label newLen)
 Adjust size of PtrList. More...
 
void setSize (const label newLen)
 Same as resize() More...
 
void append (optionAdjoint *ptr)
 Append an element to the end of the list. More...
 
void append (autoPtr< optionAdjoint > &aptr)
 Move append an element to the end of the list. More...
 
void append (autoPtr< optionAdjoint > &&aptr)
 Move append an element to the end of the list. More...
 
void append (const tmp< optionAdjoint > &tptr)
 Move or clone append a tmp to the end of the list. More...
 
void transfer (PtrList< optionAdjoint > &list)
 Transfer into this list and annul the argument list. More...
 
const optionAdjoint * set (const label i) const
 Return const pointer to element (if set) or nullptr. More...
 
autoPtr< optionAdjoint > set (const label i, optionAdjoint *ptr)
 Set element to given pointer and return old element (can be null) More...
 
autoPtr< optionAdjoint > set (const label i, autoPtr< optionAdjoint > &aptr)
 Set element to given autoPtr and return old element. More...
 
autoPtr< optionAdjoint > set (const label i, autoPtr< optionAdjoint > &&aptr)
 Set element to given autoPtr and return old element. More...
 
autoPtr< optionAdjoint > set (const label i, const tmp< optionAdjoint > &tptr)
 Set element to given tmp and return old element. More...
 
autoPtr< optionAdjoint > release (const label i)
 Release ownership of the pointer at the given position. More...
 
void operator= (const PtrList< optionAdjoint > &list)
 Copy assignment. More...
 
void operator= (PtrList< optionAdjoint > &&list)
 Move assignment. More...
 

Protected Member Functions

const dictionaryoptionAdjointsDict (const dictionary &dict) const
 
bool readOptionAdjoints (const dictionary &dict)
 Read optionAdjoints dictionary. More...
 
void checkApplied () const
 Check that all sources have been applied. More...
 
- Protected Member Functions inherited from PtrList< optionAdjoint >
void readIstream (Istream &is, const INew &inew)
 Read from Istream using Istream constructor class. More...
 
void free ()
 Delete the allocated entries, but retain the list size. More...
 

Protected Attributes

const fvMeshmesh_
 Reference to the mesh database. More...
 
label checkTimeIndex_
 Time index to check that all defined sources have been applied. More...
 

Friends

Ostreamoperator<< (Ostream &os, const optionAdjointList &optionAdjoints)
 Ostream operator. More...
 

Detailed Description

DescriptionAdjoint List of finite volume optionAdjoints

SourceFile optionAdjointList.C

Definition at line 59 of file fvOptionAdjointList.H.

Constructor & Destructor Documentation

◆ optionAdjointList() [1/2]

optionAdjointList ( const fvMesh mesh)

Construct null.

Definition at line 106 of file fvOptionAdjointList.C.

◆ optionAdjointList() [2/2]

optionAdjointList ( const fvMesh mesh,
const dictionary dict 
)

Construct from mesh and dictionary.

Definition at line 93 of file fvOptionAdjointList.C.

References dict.

◆ ~optionAdjointList()

virtual ~optionAdjointList ( )
virtualdefault

Destructor.

Member Function Documentation

◆ optionAdjointsDict()

const Foam::dictionary & optionAdjointsDict ( const dictionary dict) const
protected

Return the "optionAdjoints" sub-dictionary if present otherwise return dict

Definition at line 47 of file fvOptionAdjointList.C.

References dict.

◆ readOptionAdjoints()

bool readOptionAdjoints ( const dictionary dict)
protected

Read optionAdjoints dictionary.

Definition at line 62 of file fvOptionAdjointList.C.

References optionAdjointList::checkTimeIndex_, dict, forAll, optionAdjointList::mesh_, option::name(), option::read(), fvMesh::time(), and TimeState::timeIndex().

Here is the call graph for this function:

◆ checkApplied()

void checkApplied ( ) const
protected

Check that all sources have been applied.

Definition at line 77 of file fvOptionAdjointList.C.

References option::checkApplied(), and forAll.

Referenced by optionAdjointList::constrain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TypeName()

TypeName ( "optionAdjointList"  )

Runtime type information.

◆ reset()

void reset ( const dictionary dict)

Reset the source list.

Definition at line 116 of file fvOptionAdjointList.C.

References Foam::BitOps::count(), dict, forAllConstIter, Foam::name(), optionAdjoint::New(), and setSize().

Here is the call graph for this function:

◆ correct()

void correct ( GeometricField< Type, fvPatchField, volMesh > &  fld)

Correct.

Definition at line 34 of file fvOptionAdjointListTemplates.C.

References option::applyToField(), option::correct(), Foam::expressions::patchExpr::debug, Foam::endl(), fld, forAll, Foam::Info, option::isActive(), option::name(), and option::setApplied().

Here is the call graph for this function:

◆ operator()() [1/12]

tmp<fvMatrix<Type> > operator() ( GeometricField< Type, fvPatchField, volMesh > &  fld)

Return source for equation.

◆ operator()() [2/12]

tmp<fvMatrix<Type> > operator() ( GeometricField< Type, fvPatchField, volMesh > &  fld,
const word fieldName 
)

Return source for equation with specified name.

◆ operator()() [3/12]

tmp<fvMatrix<Type> > operator() ( const volScalarField rho,
GeometricField< Type, fvPatchField, volMesh > &  fld 
)

Return source for equation.

◆ operator()() [4/12]

tmp<fvMatrix<Type> > operator() ( const volScalarField rho,
GeometricField< Type, fvPatchField, volMesh > &  fld,
const word fieldName 
)

Return source for equation with specified name.

◆ operator()() [5/12]

tmp<fvMatrix<Type> > operator() ( const volScalarField alpha,
const volScalarField rho,
GeometricField< Type, fvPatchField, volMesh > &  fld 
)

Return source for equation.

◆ operator()() [6/12]

tmp<fvMatrix<Type> > operator() ( const volScalarField alpha,
const volScalarField rho,
GeometricField< Type, fvPatchField, volMesh > &  fld,
const word fieldName 
)

Return source for equation with specified name.

◆ constrain()

void constrain ( fvMatrix< Type > &  eqn)

Apply constraints to equation.

Definition at line 226 of file fvOptionAdjointListTemplates.C.

References option::applyToField(), optionAdjointList::checkApplied(), option::constrain(), Foam::expressions::patchExpr::debug, Foam::endl(), forAll, Foam::Info, option::isActive(), option::name(), fvMatrix< Type >::psi(), and option::setApplied().

Here is the call graph for this function:

◆ read()

bool read ( const dictionary dict)
virtual

Read dictionary.

Definition at line 147 of file fvOptionAdjointList.C.

References dict.

Referenced by incompressibleAdjointSolver::readDict().

Here is the caller graph for this function:

◆ writeData()

bool writeData ( Ostream os) const
virtual

Write data to Ostream.

Definition at line 153 of file fvOptionAdjointList.C.

References forAll, IOstream::good(), and Foam::nl.

Here is the call graph for this function:

◆ operator()() [7/12]

Foam::tmp<Foam::fvMatrix<Type> > operator() ( GeometricField< Type, fvPatchField, volMesh > &  fld)

Definition at line 67 of file fvOptionAdjointListTemplates.C.

References fld.

◆ operator()() [8/12]

Foam::tmp<Foam::fvMatrix<Type> > operator() ( GeometricField< Type, fvPatchField, volMesh > &  fld,
const word fieldName 
)

Definition at line 77 of file fvOptionAdjointListTemplates.C.

References option::addSup(), option::applyToField(), Foam::expressions::patchExpr::debug, Foam::dimTime, Foam::dimVolume, Foam::endl(), fld, forAll, Foam::Info, option::isActive(), option::name(), tmp< T >::ref(), and option::setApplied().

Here is the call graph for this function:

◆ operator()() [9/12]

Foam::tmp<Foam::fvMatrix<Type> > operator() ( const volScalarField rho,
GeometricField< Type, fvPatchField, volMesh > &  fld 
)

Definition at line 118 of file fvOptionAdjointListTemplates.C.

References fld, and rho.

◆ operator()() [10/12]

Foam::tmp<Foam::fvMatrix<Type> > operator() ( const volScalarField rho,
GeometricField< Type, fvPatchField, volMesh > &  fld,
const word fieldName 
)

Definition at line 129 of file fvOptionAdjointListTemplates.C.

References option::addSup(), option::applyToField(), Foam::expressions::patchExpr::debug, Foam::dimTime, Foam::dimVolume, Foam::endl(), fld, forAll, Foam::Info, option::isActive(), option::name(), tmp< T >::ref(), rho, and option::setApplied().

Here is the call graph for this function:

◆ operator()() [11/12]

Foam::tmp<Foam::fvMatrix<Type> > operator() ( const volScalarField alpha,
const volScalarField rho,
GeometricField< Type, fvPatchField, volMesh > &  fld 
)

Definition at line 171 of file fvOptionAdjointListTemplates.C.

References Foam::constant::atomic::alpha, fld, and rho.

◆ operator()() [12/12]

Foam::tmp<Foam::fvMatrix<Type> > operator() ( const volScalarField alpha,
const volScalarField rho,
GeometricField< Type, fvPatchField, volMesh > &  fld,
const word fieldName 
)

Definition at line 183 of file fvOptionAdjointListTemplates.C.

References option::addSup(), Foam::constant::atomic::alpha, option::applyToField(), Foam::expressions::patchExpr::debug, dimensioned< Type >::dimensions(), Foam::dimTime, Foam::dimVolume, Foam::endl(), fld, forAll, Foam::Info, option::isActive(), option::name(), tmp< T >::ref(), rho, and option::setApplied().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

Ostream& operator<< ( Ostream os,
const optionAdjointList optionAdjoints 
)
friend

Ostream operator.

Definition at line 172 of file fvOptionAdjointList.C.

Member Data Documentation

◆ mesh_

const fvMesh& mesh_
protected

Reference to the mesh database.

Definition at line 79 of file fvOptionAdjointList.H.

Referenced by optionAdjointList::readOptionAdjoints().

◆ checkTimeIndex_

label checkTimeIndex_
protected

Time index to check that all defined sources have been applied.

Definition at line 82 of file fvOptionAdjointList.H.

Referenced by optionAdjointList::readOptionAdjoints().


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