167 virtual void solve() = 0;
170 virtual bool loop() = 0;
188 List<
void (Type::*)()>& funcs
205 virtual bool write(
const bool valid =
true)
const
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Volume discretisation.
localIOdictionary(const IOobject &io, const dictionary *fallback=nullptr)
Construct given an IOobject and optional fallback dictionary content.
autoPtr< variablesSet > vars_
Base variableSet pointer.
const word & managerType() const
Return the manager type.
bool active()
Return state of solver.
void solveWithArgs(Type &type, List< void(Type::*)()> &funcs)
Main control loop.
bool active_
Solve equations?
bool useSolverNameForFields_
Append the variables related to the solver with it name.
bool isMaster_
Is the solver the master one.
const word managerType_
The optimisation type.
virtual void restoreInitValues()
Restore initial field values if necessary.
virtual void solveIter()=0
Execute one iteration of the solution algorithm.
dictionary dict_
Dictionary holding the solver info.
bool isMaster() const
Whether the solver is the master one, in case of coupled solvers.
virtual bool write(const bool valid=true) const
Workaround for turbulent fields on multi-point runs.
virtual bool readDict(const dictionary &dict)
word extendedVariableName(const word &varName) const
Given a variable name, return a name that is possibly appended by the solverName, depending on useSol...
bool useSolverNameForFields() const
Use solver name as a suffix to the involved fields.
virtual void addTopOFvOptions() const
Add topO fvOptions.
const variablesSet & getVariablesSet() const
Return constant reference to variableSet used by the solver.
virtual ~solver()=default
Destructor.
virtual void solve()=0
Main control loop.
void operator=(const solver &)=delete
No copy assignment.
virtual bool writeData(Ostream &) const
Required by regIOobject.
virtual bool writeNow() const
Workaround for turbulent fields on multi-point runs.
const dictionary & dict() const
Return the solver dictionary.
virtual void preLoop()
Functions to be called before loop.
TypeName("solver")
Run-time type information.
const word solverName_
Solver name.
const fvMesh & mesh() const
Return the solver mesh.
const word & solverName() const
Return the solver name.
fvMesh & mesh_
Reference to the mesh database.
virtual void postLoop()
Functions to be called after loop.
solver(const solver &)=delete
No copy construct.
virtual bool loop()=0
Looper (advances iters, time step).
Base class for creating a set of variables.
A class for handling words, derived from Foam::string.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.