MaMiCo 1.2
Loading...
Searching...
No Matches
coupling::interface::PintableMacroSolver Class Referenceabstract

#include <PintableMacroSolver.h>

Inheritance diagram for coupling::interface::PintableMacroSolver:

Public Types

enum class  Mode { supervising , coupling }
 
using State = PintableMacroSolverState
 

Public Member Functions

virtual std::unique_ptr< StategetState ()=0
 
virtual void setState (const std::unique_ptr< State > &, int cycle=0)=0
 
virtual std::unique_ptr< Stateoperator() (const std::unique_ptr< State > &, int cycle=0)=0
 
virtual Mode getMode () const =0
 
virtual std::unique_ptr< PintableMacroSolvergetSupervisor (int num_cycles, double visc_multiplier=1) const =0
 
virtual void print (std::ostream &os) const =0
 
virtual double get_avg_vel (const std::unique_ptr< State > &state) const
 

Friends

std::ostream & operator<< (std::ostream &os, const coupling::interface::PintableMacroSolver &s)
 

Detailed Description

Interface for a macroscopic solver who supports parallel-in-time coupled simulations. This requires:

  • The macro solver can be switched between *supervising mode* and *coupling mode*
  • In supervising mode, the macro solver runs everywhere (incl inner MD cells)
  • In coupling mode, the macro solver runs only on the CFD domain (outer MD cells and outside MaMiCo)
  • Parameterization of the solver (e.g. viscosity, relaxation time) can differ between supervising and coupling mode
  • The macro solver can output / return a full state object, containing all data describing the CFD state on this ranks subdomain
  • In supervising mode, the macro solver can be non-zero-initialised to a given state (thus it can not be analytical)
  • Simulation state instances can perform the arithmetic operations addition, subtraction, copy assignment

All macroscopic solvers which want to support PinT have to implement this interface.

Author
Piet Jarmatz

Member Function Documentation

◆ get_avg_vel()

virtual double coupling::interface::PintableMacroSolver::get_avg_vel ( const std::unique_ptr< State > & state) const
inlinevirtual

Useful to test if a solver behaves as expected, similar to a "det(state)": should return a single numeric value that characterises the state object, by computing the mean flow velocity

Reimplemented in coupling::solvers::LBCouetteSolver.

◆ getMode()

virtual Mode coupling::interface::PintableMacroSolver::getMode ( ) const
pure virtual

returns either Mode.supervising or Mode.coupling

Implemented in coupling::solvers::LBCouetteSolver.

◆ getState()

virtual std::unique_ptr< State > coupling::interface::PintableMacroSolver::getState ( )
pure virtual

This method should return all information that is required to define the full state of CFD on the subdomain of this rank

Implemented in coupling::solvers::LBCouetteSolver.

◆ getSupervisor()

virtual std::unique_ptr< PintableMacroSolver > coupling::interface::PintableMacroSolver::getSupervisor ( int num_cycles,
double visc_multiplier = 1 ) const
pure virtual

assuming this is called on a PintableMacroSolver in coupling mode, this creates a new supervisor instance and returnes it

Implemented in coupling::solvers::LBCouetteSolver.

◆ operator()()

virtual std::unique_ptr< State > coupling::interface::PintableMacroSolver::operator() ( const std::unique_ptr< State > & ,
int cycle = 0 )
pure virtual

This advances the macroSolver by one time step, starting from the given state

Implemented in coupling::solvers::LBCouetteSolver.

◆ print()

virtual void coupling::interface::PintableMacroSolver::print ( std::ostream & os) const
pure virtual

this is expected to print information about the mode and type of this solver object to os

Implemented in coupling::solvers::LBCouetteSolver.

◆ setState()

virtual void coupling::interface::PintableMacroSolver::setState ( const std::unique_ptr< State > & ,
int cycle = 0 )
pure virtual

This method fully reset / initialize the CFD solver to the given state

Implemented in coupling::solvers::LBCouetteSolver.


The documentation for this class was generated from the following file: