Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
objective Class Referenceabstract

Abstract base class for objective functions. No point in making this runTime selectable since its children will have different constructors. More...

Inheritance diagram for objective:
Inheritance graph
[legend]
Collaboration diagram for objective:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("objective")
 
 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)
 
virtual ~objective ()=default
 
virtual bool readDict (const dictionary &dict)
 
virtual scalar J ()=0
 
scalar JCycle () const
 
void accumulateJMean (solverControl &solverControl)
 
void accumulateJMean ()
 
scalar weight () const
 
bool normalize () const
 
virtual void doNormalization ()
 
bool isWithinIntegrationTime () const
 
void incrementIntegrationTimes (const scalar timeSpan)
 
const volScalarFielddJdb ()
 
const fvPatchVectorFieldboundarydJdb (const label)
 
const fvPatchVectorFielddSdbMultiplier (const label)
 
const fvPatchVectorFielddndbMultiplier (const label)
 
const fvPatchVectorFielddxdbMultiplier (const label)
 
const fvPatchVectorFielddxdbDirectMultiplier (const label)
 
const vectorFieldboundaryEdgeMultiplier (const label patchI, const label edgeI)
 
const fvPatchTensorFieldboundarydJdStress (const label)
 
const boundaryVectorFieldboundarydJdb ()
 
const boundaryVectorFielddSdbMultiplier ()
 
const boundaryVectorFielddndbMultiplier ()
 
const boundaryVectorFielddxdbMultiplier ()
 
const boundaryVectorFielddxdbDirectMultiplier ()
 
const vectorField3boundaryEdgeMultiplier ()
 
const boundaryTensorFieldboundarydJdStress ()
 
const volScalarFielddivDxDbMultiplier ()
 
const volTensorFieldgradDxDbMultiplier ()
 
virtual void update ()=0
 
virtual void nullify ()
 
virtual void updateNormalizationFactor ()
 
virtual void update_boundarydJdb ()
 
virtual void update_dSdbMultiplier ()
 
virtual void update_dndbMultiplier ()
 
virtual void update_dxdbMultiplier ()
 
virtual void update_dxdbDirectMultiplier ()
 
virtual void update_boundaryEdgeContribution ()
 
virtual void update_dJdStressMultiplier ()
 
virtual void update_divDxDbMultiplier ()
 
virtual void update_gradDxDbMultiplier ()
 
virtual bool write (const bool valid=true) const
 
virtual void writeInstantaneousValue () const
 
virtual void writeInstantaneousSeparator () const
 
virtual void writeMeanValue () const
 
virtual bool writeData (Ostream &os) const
 
virtual void addHeaderInfo () const
 
virtual void addHeaderColumns () const
 
virtual void addColumnValues () const
 
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
 
- Public Member Functions inherited from localIOdictionary
 localIOdictionary (const IOobject &io, const dictionary *fallback=nullptr)
 
 localIOdictionary (const IOobject &io, const dictionary &dict)
 
 localIOdictionary (const IOobject &io, const word &wantedType, const dictionary *fallback=nullptr)
 
 localIOdictionary (const IOobject &io, Istream &is)
 
virtual ~localIOdictionary ()=default
 
virtual bool global () const
 
virtual fileName filePath () const
 
- Public Member Functions inherited from baseIOdictionary
 TypeName ("dictionary")
 
 baseIOdictionary (const baseIOdictionary &)=default
 
 baseIOdictionary (baseIOdictionary &&)=default
 
virtual ~baseIOdictionary ()=default
 
 baseIOdictionary (const IOobject &io, const dictionary *fallback=nullptr)
 
 baseIOdictionary (const IOobject &io, const dictionary &dict)
 
 baseIOdictionary (const IOobject &io, Istream &is)
 
const wordname () const
 
virtual bool readData (Istream &)
 
void operator= (const baseIOdictionary &rhs)
 
void operator= (const dictionary &rhs)
 
- Public Member Functions inherited from regIOobject
 TypeName ("regIOobject")
 
 regIOobject (const IOobject &io, const bool isTimeObject=false)
 
 regIOobject (const regIOobject &rio)
 
 regIOobject (const regIOobject &rio, bool registerCopy)
 
 regIOobject (const word &newName, const regIOobject &, bool registerCopy)
 
 regIOobject (const IOobject &io, const regIOobject &rio)
 
virtual ~regIOobject ()
 
bool checkIn ()
 
bool checkOut ()
 
virtual void addWatch ()
 
bool ownedByRegistry () const
 
bool store ()
 
void release (const bool unregister=false)
 
label eventNo () const
 
label & eventNo ()
 
bool upToDate (const regIOobject &) const
 
bool upToDate (const regIOobject &, const regIOobject &) const
 
bool upToDate (const regIOobject &, const regIOobject &, const regIOobject &) const
 
bool upToDate (const regIOobject &, const regIOobject &, const regIOobject &, const regIOobject &) const
 
void setUpToDate ()
 
virtual void rename (const word &newName)
 
const dictionaryfindMetaData () const noexcept
 
dictionarygetMetaData () noexcept
 
void removeMetaData ()
 
virtual void updateMetaData ()
 
bool headerOk ()
 
IstreamreadStream (const word &, const bool valid=true)
 
void close ()
 
virtual bool read ()
 
virtual label addWatch (const fileName &)
 
const labelListwatchIndices () const
 
labelListwatchIndices ()
 
virtual bool modified () const
 
virtual bool readIfModified ()
 
virtual bool writeObject (IOstreamOption streamOpt, const bool valid) const
 
void operator= (const IOobject &io)
 
virtual bool writeObject (IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver, IOstreamOption::compressionType comp, const bool valid) const
 
- Public Member Functions inherited from IOobject
 TypeName ("IOobject")
 
 IOobject (const IOobject &)=default
 
virtual ~IOobject ()=default
 
 IOobject (const word &name, const fileName &instance, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false)
 
 IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false)
 
 IOobject (const fileName &path, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false)
 
 IOobject (const IOobject &io, const objectRegistry &registry)
 
 IOobject (const IOobject &io, const word &name)
 
 IOobject (const IOobject &io, readOption, writeOption)
 
autoPtr< IOobjectclone () const
 
autoPtr< IOobjectclone (const objectRegistry &registry) const
 
const objectRegistrydb () const noexcept
 
const Timetime () const
 
const wordname () const noexcept
 
const wordheaderClassName () const noexcept
 
wordheaderClassName () noexcept
 
const stringnote () const noexcept
 
stringnote () noexcept
 
bool registerObject () const noexcept
 
bool registerObject (bool on) noexcept
 
bool globalObject () const noexcept
 
bool globalObject (bool on) noexcept
 
unsigned labelByteSize () const noexcept
 
unsigned scalarByteSize () const noexcept
 
bool isHeaderClassName (const word &clsName) const
 
template<class Type >
bool isHeaderClassName () const
 
readOption readOpt () const noexcept
 
readOption readOpt (readOption opt) noexcept
 
writeOption writeOpt () const noexcept
 
writeOption writeOpt (writeOption opt) noexcept
 
word group () const
 
word member () const
 
const fileNamerootPath () const
 
const fileNamecaseName () const
 
const fileNameinstance () const noexcept
 
fileNameinstance () noexcept
 
const fileNamelocal () const noexcept
 
fileName path () const
 
fileName path (const word &instance, const fileName &local=fileName::null) const
 
fileName objectPath () const
 
fileName objectRelPath () const
 
fileName localFilePath (const word &typeName, const bool search=true) const
 
fileName globalFilePath (const word &typeName, const bool search=true) const
 
IOstreamOption parseHeader (const dictionary &headerDict)
 
bool readHeader (Istream &is)
 
bool readHeader (dictionary &headerDict, Istream &is)
 
template<class Type >
bool typeHeaderOk (const bool checkType=true, const bool search=true, const bool verbose=true)
 
template<class Type >
void warnNoRereading () const
 
bool writeHeader (Ostream &os) const
 
bool writeHeader (Ostream &os, const word &objectType) const
 
void writeHeader (dictionary &dict, IOstreamOption streamOpt) const
 
void writeHeader (dictionary &dict, const word &objectType, IOstreamOption streamOpt) const
 
bool good () const noexcept
 
bool bad () const noexcept
 
InfoProxy< IOobjectinfo () const
 
void operator= (const IOobject &io)
 
readOptionreadOpt () noexcept
 
writeOptionwriteOpt () noexcept
 
boolregisterObject () noexcept
 
boolglobalObject () noexcept
 
template<>
bool isHeaderClassName () const
 
template<class StringType >
Foam::word groupName (StringType base, const word &group)
 
- Public Member Functions inherited from dictionary
 ClassName ("dictionary")
 
 dictionary ()
 
 dictionary (const fileName &name)
 
 dictionary (const fileName &name, const dictionary &parentDict, Istream &is, bool keepHeader=false)
 
 dictionary (Istream &is)
 
 dictionary (Istream &is, bool keepHeader)
 
 dictionary (const dictionary &parentDict, const dictionary &dict)
 
 dictionary (const dictionary &dict)
 
 dictionary (const dictionary *dict)
 
 dictionary (const dictionary &parentDict, dictionary &&dict)
 
 dictionary (dictionary &&dict)
 
autoPtr< dictionaryclone () const
 
virtual ~dictionary ()
 
const fileNamename () const noexcept
 
fileNamename () noexcept
 
word dictName () const
 
fileName relativeName (const bool caseTag=false) const
 
bool isNullDict () const noexcept
 
const dictionaryparent () const noexcept
 
const dictionarytopDict () const
 
label startLineNumber () const
 
label endLineNumber () const
 
SHA1Digest digest () const
 
tokenList tokens () const
 
bool found (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 
entryfindEntry (const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
 
const entryfindEntry (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 
const entryfindScoped (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 
dictionaryfindDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
 
const dictionaryfindDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 
const entrylookupEntry (const word &keyword, enum keyType::option matchOpt) const
 
ITstreamlookup (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 
template<class T >
T get (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 
template<class T >
T getOrDefault (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
 
template<class T >
T getOrAdd (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX)
 
template<class T >
bool readEntry (const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
 
template<class T >
bool readIfPresent (const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
 
template<class T , class Predicate >
T getCheck (const word &keyword, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) const
 
template<class T , class Predicate >
T getCheckOrDefault (const word &keyword, const T &deflt, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) const
 
template<class T , class Predicate >
T getCheckOrAdd (const word &keyword, const T &deflt, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX)
 
template<class T , class Predicate >
bool readCheck (const word &keyword, T &val, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
 
template<class T , class Predicate >
bool readCheckIfPresent (const word &keyword, T &val, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) const
 
bool isDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 
const dictionarysubDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 
dictionarysubDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
 
dictionarysubDictOrAdd (const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
 
dictionary subOrEmptyDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX, const bool mandatory=false) const
 
const dictionaryoptionalSubDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 
wordList toc () const
 
wordList sortedToc () const
 
template<class Compare >
wordList sortedToc (const Compare &comp) const
 
List< keyTypekeys (bool patterns=false) const
 
bool substituteKeyword (const word &keyword, bool mergeEntry=false)
 
bool substituteScopedKeyword (const word &keyword, bool mergeEntry=false)
 
entryadd (entry *entryPtr, bool mergeEntry=false)
 
entryadd (const entry &e, bool mergeEntry=false)
 
entryadd (const keyType &k, const word &v, bool overwrite=false)
 
entryadd (const keyType &k, const string &v, bool overwrite=false)
 
entryadd (const keyType &k, const label v, bool overwrite=false)
 
entryadd (const keyType &k, const scalar v, bool overwrite=false)
 
entryadd (const keyType &k, const dictionary &d, bool mergeEntry=false)
 
template<class T >
entryadd (const keyType &k, const T &v, bool overwrite=false)
 
entryset (entry *entryPtr)
 
entryset (const entry &e)
 
entryset (const keyType &k, const dictionary &v)
 
template<class T >
entryset (const keyType &k, const T &v)
 
bool remove (const word &keyword)
 
bool changeKeyword (const keyType &oldKeyword, const keyType &newKeyword, bool overwrite=false)
 
bool merge (const dictionary &dict)
 
void clear ()
 
void transfer (dictionary &dict)
 
void checkITstream (const ITstream &is, const word &keyword) const
 
bool read (Istream &is)
 
bool read (Istream &is, bool keepHeader)
 
void writeEntry (Ostream &os) const
 
void writeEntry (const keyType &keyword, Ostream &os) const
 
void writeEntries (Ostream &os, const bool extraNewLine=false) const
 
void write (Ostream &os, const bool subDict=true) const
 
const_searcher csearch (const word &keyword, enum keyType::option=keyType::REGEX) const
 
const_searcher search (const word &keyword, enum keyType::option=keyType::REGEX) const
 
searcher search (const word &keyword, enum keyType::option=keyType::REGEX)
 
const_searcher csearchScoped (const word &keyword, enum keyType::option) const
 
const_searcher searchScoped (const word &keyword, enum keyType::option) const
 
searcher searchScoped (const word &keyword, enum keyType::option)
 
const dictionarycfindScopedDict (const fileName &dictPath) const
 
const dictionaryfindScopedDict (const fileName &dictPath) const
 
dictionaryfindScopedDict (const fileName &dictPath)
 
dictionarymakeScopedDict (const fileName &dictPath)
 
const_searcher csearchCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option=keyType::REGEX) const
 
bool foundCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option=keyType::REGEX) const
 
const entryfindCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option) const
 
const entrylookupEntryCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option) const
 
ITstreamlookupCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option=keyType::REGEX) const
 
template<class T >
T getCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option=keyType::REGEX) const
 
template<class T >
T getOrDefaultCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, const T &deflt, enum keyType::option=keyType::REGEX) const
 
template<class T >
bool readCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, T &val, enum keyType::option=keyType::REGEX, bool mandatory=true) const
 
template<class T >
bool readIfPresentCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, T &val, enum keyType::option=keyType::REGEX) const
 
void operator= (const dictionary &rhs)
 
void operator+= (const dictionary &rhs)
 
void operator|= (const dictionary &rhs)
 
void operator<<= (const dictionary &rhs)
 
template<class T >
T lookupOrDefault (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
 
template<class T >
T lookupOrAddDefault (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX)
 
template<class T >
T lookupOrDefaultCompat (const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
 
ITstreamoperator[] (const word &keyword) const
 
bool found (const word &keyword, bool recursive, bool patternMatch=true) const
 
entrylookupEntryPtr (const word &keyword, bool recursive, bool patternMatch)
 
const entrylookupEntryPtr (const word &keyword, bool recursive, bool patternMatch) const
 
const entrylookupScopedEntryPtr (const word &keyword, bool recursive, bool patternMatch) const
 
const dictionarysubDictPtr (const word &keyword) const
 
dictionarysubDictPtr (const word &keyword)
 
const entrylookupEntry (const word &keyword, bool recursive, bool patternMatch) const
 
ITstreamlookup (const word &keyword, bool recursive, bool patternMatch=true) const
 
template<class T >
T lookupOrDefault (const word &keyword, const T &deflt, bool recursive, bool patternMatch=true) const
 
template<class T >
T lookupOrAddDefault (const word &keyword, const T &deflt, bool recursive, bool patternMatch=true)
 
template<class T >
bool readIfPresent (const word &keyword, T &val, bool recursive, bool patternMatch=true) const
 
template<class T >
T lookupType (const word &keyword, bool recursive=false, bool patternMatch=true) const
 
bool getBool (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Same as get< bool >(const word&, keyType::option) More...
 
label getLabel (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Same as get< label >(const word&, keyType::option) More...
 
scalar getScalar (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Same as get< scalar >(const word&, keyType::option) More...
 
string getString (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Same as get< string >(const word&, keyType::option) More...
 
word getWord (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Same as get< word >(const word&, keyType::option) More...
 
fileName getFileName (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
 Same as get< fileName >(const word&, keyType::option) More...
 
template<class Compare >
Foam::wordList sortedToc (const Compare &comp) const
 
template<class T >
Foam::entryadd (const keyType &k, const T &v, bool overwrite)
 
template<class T >
Foam::entryset (const keyType &k, const T &v)
 
- Public Member Functions inherited from ILList
 ILList ()=default
 
 ILList (T *item)
 
 ILList (Istream &is)
 
 ILList (const ILList< LListBase, T > &lst)
 
 ILList (ILList< LListBase, T > &&lst)
 
template<class CloneArg >
 ILList (const ILList< LListBase, T > &lst, const CloneArg &cloneArg)
 
template<class INew >
 ILList (Istream &is, const INew &inew)
 
 ~ILList ()
 
bool eraseHead ()
 
bool erase (T *item)
 
void clear ()
 
void transfer (ILList< LListBase, T > &lst)
 
void operator= (const ILList< LListBase, T > &lst)
 
void operator= (ILList< LListBase, T > &&lst)
 

Static Public Member Functions

static autoPtr< objectiveNew (const fvMesh &mesh, const dictionary &dict, const word &objectiveType, const word &adjointSolverName, const word &primalSolverName)
 
- Static Public Member Functions inherited from regIOobject
template<class Type >
static Type & store (Type *p)
 
template<class Type >
static Type & store (autoPtr< Type > &ptr)
 
template<class Type >
static Type & store (autoPtr< Type > &&ptr)
 
template<class Type >
static Type & store (refPtr< Type > &ptr)
 
template<class Type >
static Type & store (refPtr< Type > &&ptr)
 
template<class Type >
static Type & store (tmp< Type > &ptr)
 
template<class Type >
static Type & store (tmp< Type > &&ptr)
 
- Static Public Member Functions inherited from IOobject
static bool bannerEnabled () noexcept
 
static bool bannerEnabled (bool on) noexcept
 
static bool fileNameComponents (const fileName &path, fileName &instance, fileName &local, word &name)
 
template<class StringType >
static word groupName (StringType base, const word &group)
 
static word group (const word &name)
 
static word member (const word &name)
 
static word scopedName (const std::string &scope, const word &name)
 
static IOobject selectIO (const IOobject &io, const fileName &altFile, const word &ioName="")
 
static OstreamwriteBanner (Ostream &os, const bool noSyntaxHint=false)
 
static OstreamwriteDivider (Ostream &os)
 
static OstreamwriteEndDivider (Ostream &os)
 
- Static Public Member Functions inherited from dictionary
static int reportOptional () noexcept
 
static int reportOptional (const int level) noexcept
 
static autoPtr< dictionaryNew (Istream &is)
 

Protected Member Functions

const dictionarydict () const
 
void setObjectiveFilePtr () const
 
void setInstantValueFilePtr () const
 
void setMeanValueFilePtr () const
 
- Protected Member Functions inherited from regIOobject
bool readHeaderOk (const IOstreamOption::streamFormat fmt, const word &typeName)
 
- Protected Member Functions inherited from IOobject
void setBad (const string &s)
 

Protected Attributes

const fvMeshmesh_
 
dictionary dict_
 
const word adjointSolverName_
 
const word primalSolverName_
 
const word objectiveName_
 
bool computeMeanFields_
 
bool nullified_
 
bool normalize_
 
scalar J_
 
scalar JMean_
 
scalar weight_
 
autoPtr< scalar > normFactor_
 
autoPtr< scalar > target_
 
autoPtr< scalar > integrationStartTimePtr_
 
autoPtr< scalar > integrationEndTimePtr_
 
autoPtr< volScalarFielddJdbPtr_
 
autoPtr< boundaryVectorFieldbdJdbPtr_
 
autoPtr< boundaryVectorFieldbdSdbMultPtr_
 
autoPtr< boundaryVectorFieldbdndbMultPtr_
 
autoPtr< boundaryVectorFieldbdxdbMultPtr_
 
autoPtr< boundaryVectorFieldbdxdbDirectMultPtr_
 
autoPtr< vectorField3bEdgeContribution_
 
autoPtr< boundaryTensorFieldbdJdStressPtr_
 
autoPtr< volScalarFielddivDxDbMultPtr_
 
autoPtr< volTensorFieldgradDxDbMultPtr_
 
fileName objFunctionFolder_
 
autoPtr< OFstreamobjFunctionFilePtr_
 
autoPtr< OFstreaminstantValueFilePtr_
 
autoPtr< OFstreammeanValueFilePtr_
 
unsigned int width_
 

Additional Inherited Members

- Public Types inherited from IOobject
enum  objectState : char { GOOD, BAD }
 
enum  readOption : char { MUST_READ, MUST_READ_IF_MODIFIED, READ_IF_PRESENT, NO_READ }
 
enum  writeOption : char { AUTO_WRITE = 0, NO_WRITE = 1 }
 
enum  fileCheckTypes : char { timeStamp, timeStampMaster, inotify, inotifyMaster }
 
- Public Types inherited from dictionary
typedef Searcher< true > const_searcher
 
typedef Searcher< false > searcher
 
- Public Attributes inherited from dictionary
friend const_searcher
 
friend searcher
 
- Static Public Attributes inherited from IOobject
static const Enum< fileCheckTypesfileCheckTypesNames
 
static char scopeSeparator
 
static fileCheckTypes fileModificationChecking
 
static float fileModificationSkew
 
static int maxFileModificationPolls
 
- Static Public Attributes inherited from dictionary
static int writeOptionalEntries
 
static const dictionary null
 
static refPtr< OSstreamreportingOutput
 
- Static Protected Member Functions inherited from IOobject
static void writeHeaderContent (Ostream &os, const IOobject &io, const word &objectType, const dictionary *metaDataDict=nullptr)
 
static void writeHeaderContent (dictionary &dict, const IOobject &io, const word &objectType, IOstreamOption streamOpt, const dictionary *metaDataDict=nullptr)
 
- Static Protected Attributes inherited from regIOobject
static bool masterOnlyReading = false
 

Detailed Description

Abstract base class for objective functions. No point in making this runTime selectable since its children will have different constructors.

Source files

Definition at line 55 of file objective.H.

Constructor & Destructor Documentation

◆ objective()

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

Definition at line 96 of file objective.C.

References dict, dictionary::found(), dictionary::get(), dictionary::readIfPresent(), and Foam::Zero.

Here is the call graph for this function:

◆ ~objective()

virtual ~objective ( )
virtualdefault

Member Function Documentation

◆ dict()

const dictionary & dict ( ) const
protected

Definition at line 87 of file objective.C.

References objective::dict_.

Referenced by objectivePtLosses::initialize(), and objective::readDict().

Here is the caller graph for this function:

◆ setObjectiveFilePtr()

void setObjectiveFilePtr ( ) const
protected

Definition at line 52 of file objective.C.

References objective::adjointSolverName_, objective::objectiveName_, objective::objFunctionFilePtr_, and objective::objFunctionFolder_.

Referenced by objective::write().

Here is the caller graph for this function:

◆ setInstantValueFilePtr()

void setInstantValueFilePtr ( ) const
protected

Definition at line 61 of file objective.C.

References objective::adjointSolverName_, objective::instantValueFilePtr_, objective::objectiveName_, and objective::objFunctionFolder_.

Referenced by objective::writeInstantaneousValue().

Here is the caller graph for this function:

◆ setMeanValueFilePtr()

void setMeanValueFilePtr ( ) const
protected

Definition at line 73 of file objective.C.

References objective::adjointSolverName_, objective::meanValueFilePtr_, objective::objectiveName_, and objective::objFunctionFolder_.

Referenced by objective::writeMeanValue().

Here is the caller graph for this function:

◆ TypeName()

TypeName ( "objective"  )

◆ declareRunTimeNewSelectionTable()

declareRunTimeNewSelectionTable ( autoPtr  ,
objective  ,
objective  ,
(const fvMesh &mesh, const dictionary &dict, const word &adjointSolverName, const word &primalSolverName)  ,
(mesh, dict, adjointSolverName, primalSolverName)   
)

◆ New()

autoPtr< objective > New ( const fvMesh mesh,
const dictionary dict,
const word objectiveType,
const word adjointSolverName,
const word primalSolverName 
)
static

Definition at line 199 of file objective.C.

References dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, and mesh.

Referenced by objectiveManager::objectiveManager().

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

◆ readDict()

bool readDict ( const dictionary dict)
virtual

Definition at line 235 of file objective.C.

References objective::dict(), and objective::dict_.

Here is the call graph for this function:

◆ J()

virtual scalar J ( )
pure virtual

Implemented in objectiveIncompressible, objectiveNutSqr, objectiveMoment, objectiveForce, objectivePtLosses, and objectivePartialVolume.

Referenced by objective::JCycle().

Here is the caller graph for this function:

◆ JCycle()

scalar JCycle ( ) const

◆ accumulateJMean() [1/2]

void accumulateJMean ( solverControl solverControl)

Definition at line 279 of file objective.C.

References solverControl::averageIter(), solverControl::doAverageIter(), objective::J_, objective::JMean_, and Foam::Zero.

Here is the call graph for this function:

◆ accumulateJMean() [2/2]

void accumulateJMean ( )

◆ weight()

scalar weight ( ) const

Definition at line 318 of file objective.C.

References objective::weight_.

◆ normalize()

bool normalize ( ) const

Definition at line 324 of file objective.C.

References objective::normalize_.

◆ doNormalization()

void doNormalization ( )
virtual

◆ isWithinIntegrationTime()

bool isWithinIntegrationTime ( ) const

◆ incrementIntegrationTimes()

void incrementIntegrationTimes ( const scalar  timeSpan)

◆ dJdb()

const volScalarField & dJdb ( )

Definition at line 417 of file objective.C.

References objective::dJdbPtr_, objective::mesh_, and objective::objectiveName_.

◆ boundarydJdb() [1/2]

const fvPatchVectorField & boundarydJdb ( const label  patchI)

Definition at line 437 of file objective.C.

References objective::bdJdbPtr_, and objective::mesh_.

◆ dSdbMultiplier() [1/2]

const fvPatchVectorField & dSdbMultiplier ( const label  patchI)

Definition at line 447 of file objective.C.

References objective::bdSdbMultPtr_, and objective::mesh_.

◆ dndbMultiplier() [1/2]

const fvPatchVectorField & dndbMultiplier ( const label  patchI)

Definition at line 457 of file objective.C.

References objective::bdndbMultPtr_, and objective::mesh_.

◆ dxdbMultiplier() [1/2]

const fvPatchVectorField & dxdbMultiplier ( const label  patchI)

Definition at line 467 of file objective.C.

References objective::bdxdbMultPtr_, and objective::mesh_.

◆ dxdbDirectMultiplier() [1/2]

const fvPatchVectorField & dxdbDirectMultiplier ( const label  patchI)

Definition at line 477 of file objective.C.

References objective::bdxdbDirectMultPtr_, and objective::mesh_.

◆ boundaryEdgeMultiplier() [1/2]

const vectorField & boundaryEdgeMultiplier ( const label  patchI,
const label  edgeI 
)

Definition at line 488 of file objective.C.

References Foam::exit(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ boundarydJdStress() [1/2]

const fvPatchTensorField & boundarydJdStress ( const label  patchI)

Definition at line 503 of file objective.C.

References objective::bdJdStressPtr_, and objective::mesh_.

◆ boundarydJdb() [2/2]

const boundaryVectorField & boundarydJdb ( )

Definition at line 513 of file objective.C.

References objective::bdJdbPtr_, and objective::mesh_.

◆ dSdbMultiplier() [2/2]

const boundaryVectorField & dSdbMultiplier ( )

Definition at line 523 of file objective.C.

References objective::bdSdbMultPtr_, and objective::mesh_.

◆ dndbMultiplier() [2/2]

const boundaryVectorField & dndbMultiplier ( )

Definition at line 533 of file objective.C.

References objective::bdndbMultPtr_, and objective::mesh_.

◆ dxdbMultiplier() [2/2]

const boundaryVectorField & dxdbMultiplier ( )

Definition at line 543 of file objective.C.

References objective::bdxdbMultPtr_, and objective::mesh_.

◆ dxdbDirectMultiplier() [2/2]

const boundaryVectorField & dxdbDirectMultiplier ( )

Definition at line 553 of file objective.C.

References objective::bdxdbDirectMultPtr_, and objective::mesh_.

◆ boundaryEdgeMultiplier() [2/2]

const vectorField3 & boundaryEdgeMultiplier ( )

Definition at line 563 of file objective.C.

References objective::bdxdbDirectMultPtr_, objective::bEdgeContribution_, Foam::endl(), Foam::exit(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ boundarydJdStress() [2/2]

const boundaryTensorField & boundarydJdStress ( )

Definition at line 576 of file objective.C.

References objective::bdJdStressPtr_, and objective::mesh_.

◆ divDxDbMultiplier()

const volScalarField & divDxDbMultiplier ( )

◆ gradDxDbMultiplier()

const volTensorField & gradDxDbMultiplier ( )

Definition at line 607 of file objective.C.

References Foam::dimLength, Foam::dimTime, objective::gradDxDbMultPtr_, objective::mesh_, objective::objectiveName_, Foam::pow2(), and Foam::pow3().

Here is the call graph for this function:

◆ update()

virtual void update ( )
pure virtual

Implemented in objectiveIncompressible.

◆ nullify()

void nullify ( )
virtual

◆ updateNormalizationFactor()

void updateNormalizationFactor ( )
virtual

Definition at line 270 of file objective.C.

References objective::JCycle(), objective::normalize_, objective::normFactor_, and autoPtr::reset().

Here is the call graph for this function:

◆ update_boundarydJdb()

virtual void update_boundarydJdb ( )
inlinevirtual

Reimplemented in objectiveIncompressible.

Definition at line 337 of file objective.H.

◆ update_dSdbMultiplier()

virtual void update_dSdbMultiplier ( )
inlinevirtual

Reimplemented in objectiveIncompressible, objectiveMoment, objectiveForce, and objectivePartialVolume.

Definition at line 341 of file objective.H.

◆ update_dndbMultiplier()

virtual void update_dndbMultiplier ( )
inlinevirtual

Reimplemented in objectiveIncompressible.

Definition at line 345 of file objective.H.

◆ update_dxdbMultiplier()

virtual void update_dxdbMultiplier ( )
inlinevirtual

Reimplemented in objectiveIncompressible, objectiveMoment, and objectiveForce.

Definition at line 349 of file objective.H.

◆ update_dxdbDirectMultiplier()

virtual void update_dxdbDirectMultiplier ( )
inlinevirtual

Reimplemented in objectiveIncompressible, objectiveMoment, and objectivePartialVolume.

Definition at line 354 of file objective.H.

◆ update_boundaryEdgeContribution()

virtual void update_boundaryEdgeContribution ( )
inlinevirtual

Definition at line 358 of file objective.H.

Referenced by objectiveIncompressible::update().

Here is the caller graph for this function:

◆ update_dJdStressMultiplier()

virtual void update_dJdStressMultiplier ( )
inlinevirtual

Reimplemented in objectiveForce.

Definition at line 362 of file objective.H.

Referenced by objectiveIncompressible::update().

Here is the caller graph for this function:

◆ update_divDxDbMultiplier()

virtual void update_divDxDbMultiplier ( )
inlinevirtual

Reimplemented in objectiveIncompressible, and objectiveNutSqr.

Definition at line 366 of file objective.H.

◆ update_gradDxDbMultiplier()

virtual void update_gradDxDbMultiplier ( )
inlinevirtual

Reimplemented in objectiveIncompressible.

Definition at line 370 of file objective.H.

◆ write()

bool write ( const bool  valid = true) const
virtual

◆ writeInstantaneousValue()

void writeInstantaneousValue ( ) const
virtual

◆ writeInstantaneousSeparator()

void writeInstantaneousSeparator ( ) const
virtual

Definition at line 743 of file objective.C.

References Foam::endl(), objective::instantValueFilePtr_, and UPstream::master().

Here is the call graph for this function:

◆ writeMeanValue()

void writeMeanValue ( ) const
virtual

◆ writeData()

bool writeData ( Ostream os) const
virtual

Reimplemented from baseIOdictionary.

Definition at line 782 of file objective.C.

References objective::JMean_, objective::normFactor_, and os().

Here is the call graph for this function:

◆ addHeaderInfo()

void addHeaderInfo ( ) const
virtual

Reimplemented in objectivePartialVolume.

Definition at line 793 of file objective.C.

Referenced by objective::write().

Here is the caller graph for this function:

◆ addHeaderColumns()

void addHeaderColumns ( ) const
virtual

Reimplemented in objectivePtLosses.

Definition at line 799 of file objective.C.

Referenced by objective::write().

Here is the caller graph for this function:

◆ addColumnValues()

void addColumnValues ( ) const
virtual

Reimplemented in objectivePtLosses.

Definition at line 805 of file objective.C.

Referenced by objective::write().

Here is the caller graph for this function:

◆ objectiveName()

const Foam::word & objectiveName ( ) const
inline

Definition at line 26 of file objectiveI.H.

References objective::objectiveName_.

◆ hasdJdb()

bool hasdJdb ( ) const
inline

Definition at line 32 of file objectiveI.H.

References bool.

Referenced by objective::doNormalization(), and objective::nullify().

Here is the caller graph for this function:

◆ hasBoundarydJdb()

bool hasBoundarydJdb ( ) const
inline

Definition at line 38 of file objectiveI.H.

References bool.

Referenced by objective::doNormalization(), and objective::nullify().

Here is the caller graph for this function:

◆ hasdSdbMult()

bool hasdSdbMult ( ) const
inline

Definition at line 44 of file objectiveI.H.

References bool.

Referenced by objective::doNormalization(), and objective::nullify().

Here is the caller graph for this function:

◆ hasdndbMult()

bool hasdndbMult ( ) const
inline

Definition at line 50 of file objectiveI.H.

References bool.

Referenced by objective::doNormalization(), and objective::nullify().

Here is the caller graph for this function:

◆ hasdxdbMult()

bool hasdxdbMult ( ) const
inline

Definition at line 56 of file objectiveI.H.

References bool.

Referenced by objective::doNormalization(), and objective::nullify().

Here is the caller graph for this function:

◆ hasdxdbDirectMult()

bool hasdxdbDirectMult ( ) const
inline

Definition at line 62 of file objectiveI.H.

References bool.

Referenced by objective::doNormalization(), and objective::nullify().

Here is the caller graph for this function:

◆ hasBoundaryEdgeContribution()

bool hasBoundaryEdgeContribution ( ) const
inline

Definition at line 68 of file objectiveI.H.

References bool.

Referenced by objective::doNormalization(), and objective::nullify().

Here is the caller graph for this function:

◆ hasBoundarydJdStress()

bool hasBoundarydJdStress ( ) const
inline

Definition at line 86 of file objectiveI.H.

References bool.

Referenced by objective::doNormalization(), and objective::nullify().

Here is the caller graph for this function:

◆ hasDivDxDbMult()

bool hasDivDxDbMult ( ) const
inline

Definition at line 74 of file objectiveI.H.

References bool.

Referenced by objective::doNormalization(), and objective::nullify().

Here is the caller graph for this function:

◆ hasGradDxDbMult()

bool hasGradDxDbMult ( ) const
inline

Definition at line 80 of file objectiveI.H.

References bool.

Referenced by objective::doNormalization(), and objective::nullify().

Here is the caller graph for this function:

◆ hasIntegrationStartTime()

bool hasIntegrationStartTime ( ) const
inline

Definition at line 92 of file objectiveI.H.

References bool.

Referenced by objective::accumulateJMean(), objective::incrementIntegrationTimes(), objective::isWithinIntegrationTime(), objective::JCycle(), and objective::writeMeanValue().

Here is the caller graph for this function:

◆ hasIntegrationEndTime()

bool hasIntegrationEndTime ( ) const
inline

Definition at line 98 of file objectiveI.H.

References bool.

Referenced by objective::accumulateJMean(), objective::incrementIntegrationTimes(), objective::isWithinIntegrationTime(), objective::JCycle(), and objective::writeMeanValue().

Here is the caller graph for this function:

Member Data Documentation

◆ mesh_

const fvMesh& mesh_
protected

Definition at line 63 of file objective.H.

Referenced by objective::accumulateJMean(), objectivePtLosses::addHeaderColumns(), objective::boundarydJdb(), objectiveIncompressible::boundarydJdp(), objective::boundarydJdStress(), objectiveIncompressible::boundarydJdT(), objectiveIncompressible::boundarydJdTMvar1(), objectiveIncompressible::boundarydJdTMvar2(), objectiveIncompressible::boundarydJdv(), objectiveIncompressible::boundarydJdvn(), objectiveIncompressible::boundarydJdvt(), objective::divDxDbMultiplier(), objective::dJdb(), objectiveIncompressible::dJdp(), objectiveIncompressible::dJdT(), objectiveIncompressible::dJdTMvar1(), objectiveIncompressible::dJdTMvar2(), objectiveIncompressible::dJdv(), objective::dndbMultiplier(), objective::dSdbMultiplier(), objective::dxdbDirectMultiplier(), objective::dxdbMultiplier(), objective::gradDxDbMultiplier(), objectivePtLosses::initialize(), objective::isWithinIntegrationTime(), objectivePartialVolume::J(), objectivePtLosses::J(), objectiveForce::J(), objectiveMoment::J(), objectiveNutSqr::J(), objectivePtLosses::update_boundarydJdp(), objectiveMoment::update_boundarydJdp(), objectivePtLosses::update_boundarydJdv(), objectivePtLosses::update_boundarydJdvn(), objectivePtLosses::update_boundarydJdvt(), objectiveNutSqr::update_divDxDbMultiplier(), objectiveForce::update_dJdStressMultiplier(), objectiveNutSqr::update_dJdTMvar1(), objectivePartialVolume::update_dSdbMultiplier(), objectiveMoment::update_dSdbMultiplier(), objectivePartialVolume::update_dxdbDirectMultiplier(), objectiveMoment::update_dxdbDirectMultiplier(), objectiveForce::update_dxdbMultiplier(), objectiveMoment::update_dxdbMultiplier(), objective::write(), objective::writeInstantaneousValue(), and objective::writeMeanValue().

◆ dict_

dictionary dict_
protected

Definition at line 64 of file objective.H.

Referenced by objective::dict(), and objective::readDict().

◆ adjointSolverName_

const word adjointSolverName_
protected

◆ primalSolverName_

const word primalSolverName_
protected

Definition at line 66 of file objective.H.

◆ objectiveName_

const word objectiveName_
protected

◆ computeMeanFields_

bool computeMeanFields_
protected

◆ nullified_

bool nullified_
protected

Definition at line 69 of file objective.H.

Referenced by objectiveIncompressible::nullify(), and objective::nullify().

◆ normalize_

bool normalize_
protected

◆ J_

scalar J_
protected

◆ JMean_

scalar JMean_
protected

◆ weight_

scalar weight_
protected

Definition at line 79 of file objective.H.

Referenced by objective::weight().

◆ normFactor_

autoPtr<scalar> normFactor_
protected

◆ target_

autoPtr<scalar> target_
protected

Definition at line 87 of file objective.H.

Referenced by objective::JCycle(), and objective::write().

◆ integrationStartTimePtr_

autoPtr<scalar> integrationStartTimePtr_
protected

◆ integrationEndTimePtr_

autoPtr<scalar> integrationEndTimePtr_
protected

◆ dJdbPtr_

autoPtr<volScalarField> dJdbPtr_
protected

Definition at line 98 of file objective.H.

Referenced by objective::dJdb(), objective::doNormalization(), and objective::nullify().

◆ bdJdbPtr_

autoPtr<boundaryVectorField> bdJdbPtr_
protected

◆ bdSdbMultPtr_

autoPtr<boundaryVectorField> bdSdbMultPtr_
protected

◆ bdndbMultPtr_

autoPtr<boundaryVectorField> bdndbMultPtr_
protected

◆ bdxdbMultPtr_

autoPtr<boundaryVectorField> bdxdbMultPtr_
protected

◆ bdxdbDirectMultPtr_

autoPtr<boundaryVectorField> bdxdbDirectMultPtr_
protected

◆ bEdgeContribution_

autoPtr<vectorField3> bEdgeContribution_
protected

◆ bdJdStressPtr_

autoPtr<boundaryTensorField> bdJdStressPtr_
protected

◆ divDxDbMultPtr_

autoPtr<volScalarField> divDxDbMultPtr_
protected

◆ gradDxDbMultPtr_

autoPtr<volTensorField> gradDxDbMultPtr_
protected

◆ objFunctionFolder_

fileName objFunctionFolder_
protected

◆ objFunctionFilePtr_

autoPtr<OFstream> objFunctionFilePtr_
mutableprotected

◆ instantValueFilePtr_

autoPtr<OFstream> instantValueFilePtr_
mutableprotected

◆ meanValueFilePtr_

autoPtr<OFstream> meanValueFilePtr_
mutableprotected

Definition at line 150 of file objective.H.

Referenced by objective::setMeanValueFilePtr(), and objective::writeMeanValue().

◆ width_

unsigned int width_
protected

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