60 const word& adjointSolverName,
61 const word& primalSolverName
82 for (
const label patchi : objectivePatches_)
101 for (
const label patchi : objectivePatches_)
115 for (
const label patchi : objectivePatches_)
128 for (
const label patchi : objectivePatches_)
138 os.writeEntry(
"initialVolume", initVol_);
146 <<
setw(4) <<
"#" <<
" " List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
objectivePartialVolume(const fvMesh &mesh, const dictionary &dict, const word &adjointSolverName, const word &primalSolverName)
from components
const dictionary & dict() const
Return objective dictionary.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
autoPtr< OFstream > objFunctionFilePtr_
File to keep the objective values after the end of the primal solver.
virtual bool writeData(Ostream &os) const
Write initial volume for continuation.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface...
Abstract base class for objective functions that contain only geometric quantities.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
static constexpr scalar oneThird
Macros for easy insertion into run-time selection tables.
Type gSum(const FieldField< Field, Type > &f)
A class for handling words, derived from Foam::string.
defineTypeNameAndDebug(objectivePartialVolume, 1)
A List of wordRe with additional matching capabilities.
scalar J_
Objective function value and weight.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Istream and Ostream manipulators taking arguments.
virtual void addHeaderInfo() const
Write headers for additional columns.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens i...
virtual bool writeData(Ostream &os) const
Write averaged objective for continuation.
virtual void update_dSdbMultiplier()
Update d (normal dS) / db multiplier. Surface and volume-based sensitivity term.
OBJstream os(runTime.globalPath()/outputName)
virtual void update_dxdbDirectMultiplier()
Update d (x) / db multiplier. Surface and volume-based sensitivity term.
addToRunTimeSelectionTable(objectiveGeometric, objectivePartialVolume, dictionary)
unsigned int width_
Default width of entries when writing in the objective files.
virtual scalar J()
Return the objective function value.
Mesh data needed to do the Finite Volume discretisation.
const std::string patch
OpenFOAM patch number as a std::string.
List< label > sortedToc(const UList< bool > &bools)
Return the (sorted) values corresponding to 'true' entries.
const fvBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
Omanip< int > setw(const int i)
autoPtr< boundaryVectorField > bdxdbDirectMultPtr_
Term multiplying delta(x)/delta b at the boundary for objectives that directly depend on x...
A class for managing temporary objects.
autoPtr< boundaryVectorField > bdSdbMultPtr_
Term multiplying delta(n dS)/delta b.
static constexpr const zero Zero
Global zero (0)