LifeV
MultiscaleSolver Class Reference

MultiscaleSolver - The Multiscale solver. More...

#include <MultiscaleSolver.hpp>

+ Collaboration diagram for MultiscaleSolver:

Private Attributes

multiscaleModelPtr_Type M_model
 
multiscaleDataPtr_Type M_globalData
 
multiscaleCommPtr_Type M_comm
 

Constructors & Destructor

 MultiscaleSolver ()
 Constructor. More...
 
virtual ~MultiscaleSolver ()
 Destructor. More...
 

Methods

void setupProblem (const std::string &fileName, const std::string &problemName, const UInt &coresPerNode)
 Setup the problem. More...
 
bool solveProblem (const Real &referenceSolution=-1., const Real &tolerance=1e-8)
 Run the time-loop to solve the Multiscale problem. More...
 
void showMe () const
 Display some information about the Multiscale problem (should be called after setupProblem) More...
 

Set Methods

void setCommunicator (const multiscaleCommPtr_Type &comm)
 Set the epetra communicator for the Multiscale problem. More...
 

Unimplemented Methods

 MultiscaleSolver (const MultiscaleSolver &solver)
 
MultiscaleSolveroperator= (const MultiscaleSolver &solver)
 

Private methods

void saveCPUTime (const Real &totalCPUTime, const Real &buildUpdateCPUTime, const Real &solveCPUTime, const Real &updateSolutionCPUTime, const Real &saveCPUTime) const
 Save CPU time at each time step. More...
 
void importIterationNumber ()
 Import iteration number from the CPU file. More...
 

Detailed Description

MultiscaleSolver - The Multiscale solver.

Author
Cristiano Malossi
See also
Full description of the Geometrical Multiscale Framework: [15]
Methodology: [12] [13] [14] [2]
Applications: [11] [10] [3]

The MultiscaleSolver class provides a series of methods to create and solve a general Geometrical Multiscale problem.

Definition at line 59 of file MultiscaleSolver.hpp.

Constructor & Destructor Documentation

◆ MultiscaleSolver() [1/2]

MultiscaleSolver ( )
explicit

Constructor.

Definition at line 54 of file MultiscaleSolver.cpp.

+ Here is the caller graph for this function:

◆ ~MultiscaleSolver()

virtual ~MultiscaleSolver ( )
inlinevirtual

Destructor.

Definition at line 70 of file MultiscaleSolver.hpp.

◆ MultiscaleSolver() [2/2]

MultiscaleSolver ( const MultiscaleSolver solver)
private

Member Function Documentation

◆ setupProblem()

void setupProblem ( const std::string &  fileName,
const std::string &  problemName,
const UInt coresPerNode 
)

Setup the problem.

Parameters
fileNameName of the data file.
problemNamethe name of the problem (used to save data in a specific folder).
coresPerNodenumber of cores for each node (this is mandatory when running on clusters for a correct distribution of the models among the nodes).

Definition at line 88 of file MultiscaleSolver.cpp.

◆ solveProblem()

bool solveProblem ( const Real referenceSolution = -1.,
const Real tolerance = 1e-8 
)

Run the time-loop to solve the Multiscale problem.

If the provided reference solution is positive, the solver make also a check on the last computed solution.

Parameters
referenceSolutionthe reference coupling variables norm 2.
tolerancethe tolerance to check the reference solution with respect to the computed one.
Returns
0: EXIT_SUCCESS, 1: EXIT_FAILURE

Definition at line 146 of file MultiscaleSolver.cpp.

+ Here is the caller graph for this function:

◆ showMe()

void showMe ( ) const

Display some information about the Multiscale problem (should be called after setupProblem)

Definition at line 239 of file MultiscaleSolver.cpp.

+ Here is the caller graph for this function:

◆ setCommunicator()

void setCommunicator ( const multiscaleCommPtr_Type comm)
inline

Set the epetra communicator for the Multiscale problem.

Parameters
commEpetra communicator

Definition at line 108 of file MultiscaleSolver.hpp.

◆ operator=()

MultiscaleSolver& operator= ( const MultiscaleSolver solver)
private

◆ saveCPUTime()

void saveCPUTime ( const Real totalCPUTime,
const Real buildUpdateCPUTime,
const Real solveCPUTime,
const Real updateSolutionCPUTime,
const Real saveCPUTime 
) const
private

Save CPU time at each time step.

Parameters
totalCPUTimetotal CPU time of the iteration
buildUpdateCPUTimeCPU time to build/update the problem
solveCPUTimeCPU time to solve the problem
updateSolutionCPUTimeCPU time to update the solution of the problem
saveCPUTimeCPU time to save the solution

Definition at line 270 of file MultiscaleSolver.cpp.

◆ importIterationNumber()

void importIterationNumber ( )
private

Import iteration number from the CPU file.

Definition at line 299 of file MultiscaleSolver.cpp.

+ Here is the caller graph for this function:

Field Documentation

◆ M_model

multiscaleModelPtr_Type M_model
private

Definition at line 148 of file MultiscaleSolver.hpp.

◆ M_globalData

multiscaleDataPtr_Type M_globalData
private

Definition at line 151 of file MultiscaleSolver.hpp.

◆ M_comm

multiscaleCommPtr_Type M_comm
private

Definition at line 154 of file MultiscaleSolver.hpp.


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