167 virtual void solve() = 0;
170 virtual bool loop() = 0;
188 List<
void (Type::*)()>& funcs
205 virtual bool write(
const bool valid =
true)
const virtual void restoreInitValues()
Restore initial field values if necessary.
bool useSolverNameForFields_
Append the variables related to the solver with it name.
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.
virtual ~solver()=default
Destructor.
dictionary dict_
Dictionary holding the solver info.
autoPtr< variablesSet > vars_
Base variableSet pointer.
virtual void solveIter()=0
Execute one iteration of the solution algorithm.
bool isMaster() const
Whether the solver is the master one, in case of coupled solvers.
localIOdictionary is derived from IOdictionary but excludes parallel master reading.
bool isMaster_
Is the solver the master one.
virtual void addTopOFvOptions() const
Add topO fvOptions.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
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.
solver(const solver &)=delete
No copy construct.
virtual bool loop()=0
Looper (advances iters, time step)
const word & managerType() const
Return the manager type.
const dictionary & dict() const
Return the solver dictionary.
virtual bool readDict(const dictionary &dict)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
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.
word extendedVariableName(const word &varName) const
Given a variable name, return a name that is possibly appended by the solverName, depending on useSol...
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...
const word managerType_
The optimisation type.
bool useSolverNameForFields() const
Use solver name as a suffix to the involved fields.
const word solverName_
Solver name.
virtual void postLoop()
Functions to be called after loop.