Go to the documentation of this file.
48 objectiveIncompressible,
49 objectivePartialVolume,
60 const word& adjointSolverName,
61 const word& primalSolverName
68 mesh_.boundaryMesh().patchSet
75 if (!
dict.readIfPresent(
"initialVolume", initVol_))
78 for (
const label patchi : objectivePatches_)
85 bdxdbDirectMultPtr_.reset(createZeroBoundaryPtr<vector>(mesh_));
86 bdSdbMultPtr_.reset(createZeroBoundaryPtr<vector>(mesh_));
97 for (
const label patchi : objectivePatches_)
111 for (
const label patchi : objectivePatches_)
116 bdxdbDirectMultPtr_()[patchi] = -
oneThird*nf/initVol_;
124 for (
const label patchi : objectivePatches_)
134 objFunctionFilePtr_()
135 <<
setw(width_) <<
"#VInit" <<
" "
136 <<
setw(width_) << initVol_ <<
endl;
scalar J()
Return the objective function value.
static constexpr scalar oneThird
A class for handling words, derived from Foam::string.
A class for managing temporary objects.
objectivePartialVolume(const fvMesh &mesh, const dictionary &dict, const word &adjointSolverName, const word &primalSolverName)
from components
static constexpr const zero Zero
Global zero (0)
addToRunTimeSelectionTable(objectiveIncompressible, objectiveForce, dictionary)
virtual void addHeaderInfo() const
Write headers for additional columns.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Type gSum(const FieldField< Field, Type > &f)
defineTypeNameAndDebug(objectiveForce, 0)
scalar J_
Objective function value and weight.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Istream and Ostream manipulators taking arguments.
Abstract base class for objective functions in incompressible flows.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
void update_dSdbMultiplier()
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
Omanip< int > setw(const int i)
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
void update_dxdbDirectMultiplier()
const std::string patch
OpenFOAM patch number as a std::string.
A List of wordRe with additional matching capabilities.