Go to the documentation of this file.
38 namespace incompressible
65 Info<<
" Writing new mesh points " <<
endl;
91 if (!updateMethod_->initialEtaSet())
98 scalar eta = optMeshMovement_->computeEta(
correction);
103 updateMethod_->setStep(eta);
104 updateMethod_->initialEtaSet() =
true;
119 shapeOptimisation::shapeOptimisation
127 optMeshMovement_(
nullptr),
130 dict.subDict(
"optimisationType").
131 getOrDefault<bool>(
"writeEachMesh",
false)
135 dict.subDict(
"optimisationType").
136 getOrDefault<bool>(
"updateGeometry",
true)
142 mesh_.boundaryMesh().patchSet
144 dict_.subDict(
"sensitivities").get<
wordRes>(
"patches")
150 <<
"There is no patch on which to compute sensitivities. "
151 <<
"Check optimisationDict \n"
155 optMeshMovement_.reset
160 dict_.subDict(
"meshMovement"),
168 !updateMethod_->initialEtaSet()
169 && !optMeshMovement_().maxAllowedDisplacementSet()
173 <<
"Neither eta (updateMethod) "
174 <<
"nor maxAllowedDisplacement (meshMovement) have been set"
virtual const pointField & points() const
Return raw points.
virtual void storeDesignVariables()
Store design variables, as the starting point for line search.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A primitive field of type <T> with automated input and output.
defineTypeNameAndDebug(adjointEikonalSolver, 0)
virtual void write()
Write useful quantities to files.
static autoPtr< optMeshMovement > New(fvMesh &mesh, const dictionary &dict, const labelList &patchIDs)
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
Abstract base class for optimisation methods.
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
autoPtr< optMeshMovement > optMeshMovement_
const fileName & pointsInstance() const
Return the current instance directory for points.
virtual void write()
Write useful quantities to files.
addToRunTimeSelectionTable(adjointSensitivity, sensitivityBezier, dictionary)
messageStream Info
Information stream (stdout output on master, null elsewhere)
PtrList< adjointSolverManager > & adjointSolverManagers
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
virtual void resetDesignVariables()
Store design variables, as the starting point for line search.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
virtual void updateDesignVariables(scalarField &correction)
Update the design variables given their correction.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Shape optimisation support library.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
autoPtr< updateMethod > updateMethod_
A List of wordRe with additional matching capabilities.
const polyBoundaryMesh & patches
virtual void computeEta(scalarField &correction)
Compute eta if not set in the first step.
#define WarningInFunction
Report a warning using Foam::Warning.