110 const word& managerType,
154 virtual void solve() = 0;
157 virtual bool loop() = 0;
181 List<
void (Type::*)()>& funcs
198 virtual bool write(
const bool valid =
true)
const virtual void restoreInitValues()
Restore initial field values if necessary.
Base class for solution control classes.
void solveWithArgs(Type &type, List< void(Type::*)()> &funcs)
Main control loop.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const fvMesh & mesh() const
Return the solver mesh.
dictionary dict_
Dictionary holding the solver info.
autoPtr< variablesSet > vars_
Base variableSet pointer.
virtual void solveIter()=0
Execute one iteration of the solution algorithm.
localIOdictionary is derived from IOdictionary but excludes parallel master reading.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
virtual bool useSolverNameForFields() const =0
Use solver name as a suffix to the involved fields.
virtual bool active()
Return state of solver.
A class for handling words, derived from Foam::string.
bool active_
Solve equations?
TypeName("solver")
Run-time type information.
void operator=(const solver &)=delete
No copy assignment.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
solver(const solver &)=delete
No copy construct.
virtual bool loop()=0
Looper (advances iters, time step)
virtual const dictionary & dict() const
Return the solver dictionary.
virtual ~solver()
Destructor.
virtual bool readDict(const dictionary &dict)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const volScalarField * optTypeSource_
Pointer to a source term coming from the optimisationType (e.g. porosity from topologyOptimisation) ...
virtual void solve()=0
Main control loop.
virtual bool writeNow() const
Workaround for turbulent fields on multi-point runs.
virtual void preLoop()
Functions to be called before loop.
Base class for creating a set of variables.
virtual bool writeData(Ostream &) const
Required by regIOobject.
const word & solverName() const
Return the solver name.
Mesh data needed to do the Finite Volume discretisation.
const variablesSet & getVariablesSet() const
Return constant reference to variableSet used by the solver.
virtual bool write(const bool valid=true) const
Workaround for turbulent fields on multi-point runs.
fvMesh & mesh_
Reference to the mesh database.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
void updateOptTypeSource(const autoPtr< volScalarField > &optSourcePtr)
Update source term related to optimisationType.
const word managerType_
The optimisation type.
const word solverName_
Solver name.
void addOptimisationTypeSource(fvMatrix< Type > &matrix) const
Add source from optimisationType to underlaying equation.
virtual void postLoop()
Functions to be called after loop.