LifeV
|
MultiscaleModel - The Multiscale Physical Model. More...
#include <MultiscaleModel.hpp>
Protected Member Functions | |
void | displayModelStatus (const std::string &tag) const |
Display model ID and name with a user provided tag. More... | |
Protected Attributes | |
UInt | M_ID |
models_Type | M_type |
multiscaleCouplingsContainer_Type | M_couplings |
std::string | M_modelName |
multiscaleIDContainer_Type | M_boundaryFlags |
multiscaleDataPtr_Type | M_globalData |
std::array< Real, NDIM > | M_geometryScale |
std::array< Real, NDIM > | M_geometryRotate |
std::array< Real, NDIM > | M_geometryTranslate |
multiscaleCommPtr_Type | M_comm |
Constructors & Destructor | |
MultiscaleModel () | |
The main constructor. More... | |
virtual | ~MultiscaleModel () |
Destructor. More... | |
Multiscale PhysicalModel Virtual Methods | |
virtual void | setupData (const std::string &fileName) |
Setup the data of the model. More... | |
virtual void | setupModel ()=0 |
Setup the model. More... | |
virtual void | buildModel ()=0 |
Build the initial model. More... | |
virtual void | updateModel ()=0 |
Update the model. More... | |
virtual void | solveModel ()=0 |
Solve the System. More... | |
virtual void | updateSolution ()=0 |
Update the solution. More... | |
virtual void | saveSolution ()=0 |
Save the solution. More... | |
virtual void | showMe () |
Display some information about the model. More... | |
virtual Real | checkSolution () const =0 |
Return a specific scalar quantity to be used for a comparison with a reference value. More... | |
Methods | |
void | clearCouplingsList () |
Clear the list of pointers to the couplings. More... | |
Set Methods | |
void | setID (const UInt &id) |
Set the global ID of the model. More... | |
void | setCouplingsNumber (const UInt &couplingsNumber) |
Set the number of couplings attached to this model. More... | |
void | setCoupling (const UInt &localCouplingID, const multiscaleCouplingPtr_Type &coupling) |
Add a pointer to one of the couplings attached to this model. More... | |
void | addCoupling (const multiscaleCouplingPtr_Type &coupling) |
Add a pointer to one of the couplings which couple the model. More... | |
void | setGlobalData (const multiscaleDataPtr_Type &globalData) |
Setup the global data of the model. More... | |
void | setGeometry (const std::array< Real, NDIM > &scale, const std::array< Real, NDIM > &rotate, const std::array< Real, NDIM > &translate) |
Scale, rotate and translate the Model in the 3D space. More... | |
void | setCommunicator (const multiscaleCommPtr_Type &comm) |
Set the epetra communicator for the model. More... | |
Get Methods | |
const UInt & | ID () const |
Get the global ID of the model. More... | |
const models_Type & | type () const |
Get the type of the model. More... | |
const multiscaleID_Type & | boundaryFlag (const multiscaleID_Type &boundaryID) const |
Get one available flag by id. More... | |
const std::string & | modelName () const |
Get the name of the model. More... | |
UInt | couplingsNumber () const |
Get the number of couplings connecting the model. More... | |
UInt | couplingLocalID (const UInt &ID) const |
Get the coupling local ID through global ID. More... | |
multiscaleCouplingPtr_Type | coupling (const UInt &localID) const |
Get the coupling through local ID. More... | |
const multiscaleDataPtr_Type & | globalData () const |
Get the global data of the model. More... | |
const multiscaleCommPtr_Type & | communicator () const |
Get the communicator of the model. More... | |
Unimplemented Methods | |
MultiscaleModel (const MultiscaleModel &model) | |
MultiscaleModel & | operator= (const MultiscaleModel &model) |
MultiscaleModel - The Multiscale Physical Model.
The MultiscaleModel class provides a general interface between the MS_Algorithm and all the other models. Moreover it provides internal methods for accessing general information and model related couplings.
Definition at line 62 of file MultiscaleModel.hpp.
|
explicit |
The main constructor.
All the derived classes has to be constructed using an empty constructor which calls (as first operation) this empty constructor.
Definition at line 49 of file MultiscaleModel.cpp.
|
inlinevirtual |
Destructor.
Definition at line 78 of file MultiscaleModel.hpp.
|
private |
|
virtual |
Setup the data of the model.
This method is called only once at the beginning of the simulation. It is designed for the following operations:
fileName | Name of data file. |
Reimplemented in MultiscaleModelFSI3D, MultiscaleModelFSI1D, MultiscaleModelFluid3D, MultiscaleModel0D, MultiscaleModelMultiscale, and MultiscaleModelWindkessel0D.
Definition at line 79 of file MultiscaleModel.cpp.
|
pure virtual |
Setup the model.
In particular it does the following operations:
Implemented in MultiscaleModelFSI3D, MultiscaleModelFSI1D, MultiscaleModelFluid3D, MultiscaleModel0D, MultiscaleModelMultiscale, and MultiscaleModelWindkessel0D.
|
pure virtual |
Build the initial model.
This method is alternative to updateModel and should be called only once at the fist timestep. This method is reserved for the construction of:
Implemented in MultiscaleModelFSI3D, MultiscaleModelFSI1D, MultiscaleModelFluid3D, MultiscaleModel0D, MultiscaleModelMultiscale, and MultiscaleModelWindkessel0D.
|
pure virtual |
Update the model.
This method is alternative to buildModel and should be called from the second timestep. This method is reserved for the update of:
Implemented in MultiscaleModelFSI3D, MultiscaleModelFSI1D, MultiscaleModelFluid3D, MultiscaleModel0D, MultiscaleModelMultiscale, and MultiscaleModelWindkessel0D.
|
pure virtual |
Solve the System.
This method is called once for each subiteration (in the case of implicit coupling). It computes the solution at time t_n+1.
Implemented in MultiscaleModelFSI3D, MultiscaleModelFSI1D, MultiscaleModelFluid3D, MultiscaleModel0D, MultiscaleModelMultiscale, and MultiscaleModelWindkessel0D.
|
pure virtual |
Update the solution.
This method is called after the last call to solveModel. It updates the solution both for the next time step and for the call to saveSolution.
Implemented in MultiscaleModelFSI3D, MultiscaleModelFSI1D, MultiscaleModelFluid3D, MultiscaleModel0D, MultiscaleModelMultiscale, and MultiscaleModelWindkessel0D.
|
pure virtual |
Save the solution.
This method wrote to file the solution computed during the last call of solveModel.
Implemented in MultiscaleModelFSI3D, MultiscaleModelFSI1D, MultiscaleModelFluid3D, MultiscaleModel0D, MultiscaleModelMultiscale, and MultiscaleModelWindkessel0D.
|
virtual |
Display some information about the model.
Reimplemented in MultiscaleModelFSI3D, MultiscaleModelFSI1D, MultiscaleModelFluid3D, MultiscaleModel0D, MultiscaleModelMultiscale, and MultiscaleModelWindkessel0D.
Definition at line 101 of file MultiscaleModel.cpp.
|
pure virtual |
Return a specific scalar quantity to be used for a comparison with a reference value.
This method is meant to be used for night checks.
Implemented in MultiscaleModelFSI3D, MultiscaleModelFSI1D, MultiscaleModelFluid3D, MultiscaleModel0D, MultiscaleModelMultiscale, and MultiscaleModelWindkessel0D.
|
inline |
Clear the list of pointers to the couplings.
This method has to be called before the automatic destructor, in order to disconnect the coupling classes from the model classes.
Definition at line 173 of file MultiscaleModel.hpp.
|
inline |
Set the global ID of the model.
id | Model ID |
Definition at line 188 of file MultiscaleModel.hpp.
|
inline |
Set the number of couplings attached to this model.
couplingsNumber | number of couplings attached to this model |
Definition at line 197 of file MultiscaleModel.hpp.
|
inline |
Add a pointer to one of the couplings attached to this model.
localCouplingID | local coupling ID |
coupling | shared_ptr of the coupling |
Definition at line 207 of file MultiscaleModel.hpp.
|
inline |
Add a pointer to one of the couplings which couple the model.
coupling | shared_ptr of the coupling |
Definition at line 216 of file MultiscaleModel.hpp.
|
inline |
Setup the global data of the model.
In particular, it can be used to replace the local values specified in the model data file, with the ones in the global container.
globalData | Global data container. |
Definition at line 228 of file MultiscaleModel.hpp.
void setGeometry | ( | const std::array< Real, NDIM > & | scale, |
const std::array< Real, NDIM > & | rotate, | ||
const std::array< Real, NDIM > & | translate | ||
) |
Scale, rotate and translate the Model in the 3D space.
This method apply directly to the mesh before its partitioning.
scale | Vector (Sx,Sy,Sz) of scale factors |
rotate | Vector (Rx,Ry,Rz) of angles for rotation (degree units) |
translate | Vector (Tx,Ty,Tz) of offset for position |
Definition at line 151 of file MultiscaleModel.cpp.
|
inline |
Set the epetra communicator for the model.
comm | Epetra communicator |
Definition at line 248 of file MultiscaleModel.hpp.
Get the global ID of the model.
Definition at line 263 of file MultiscaleModel.hpp.
|
inline |
Get the type of the model.
Definition at line 272 of file MultiscaleModel.hpp.
|
inline |
Get one available flag by id.
id | id of the boundary flag |
Definition at line 282 of file MultiscaleModel.hpp.
|
inline |
Get the name of the model.
Definition at line 291 of file MultiscaleModel.hpp.
|
inline |
Get the number of couplings connecting the model.
Definition at line 300 of file MultiscaleModel.hpp.
Get the coupling local ID through global ID.
ID | global ID of the coupling |
Definition at line 169 of file MultiscaleModel.cpp.
|
inline |
Get the coupling through local ID.
ID | local ID of the coupling |
Definition at line 317 of file MultiscaleModel.hpp.
|
inline |
Get the global data of the model.
Definition at line 326 of file MultiscaleModel.hpp.
|
inline |
Get the communicator of the model.
Definition at line 335 of file MultiscaleModel.hpp.
|
inlineprotected |
Display model ID and name with a user provided tag.
tag | user provided tag. |
Definition at line 381 of file MultiscaleModel.hpp.
|
private |
|
protected |
Definition at line 350 of file MultiscaleModel.hpp.
|
protected |
Definition at line 351 of file MultiscaleModel.hpp.
|
protected |
Definition at line 353 of file MultiscaleModel.hpp.
|
protected |
Definition at line 354 of file MultiscaleModel.hpp.
|
protected |
Definition at line 355 of file MultiscaleModel.hpp.
|
protected |
Definition at line 357 of file MultiscaleModel.hpp.
Definition at line 359 of file MultiscaleModel.hpp.
Definition at line 360 of file MultiscaleModel.hpp.
Definition at line 361 of file MultiscaleModel.hpp.
|
protected |
Definition at line 363 of file MultiscaleModel.hpp.