37 #ifndef MultiscaleModel_H 38 #define MultiscaleModel_H 1
40 #include <lifev/multiscale/framework/MultiscaleDefinitions.hpp> 41 #include <lifev/multiscale/framework/MultiscaleGlobalData.hpp> 42 #include <lifev/multiscale/couplings/MultiscaleCoupling.hpp> 98 virtual void setupData (
const std::string& fileName );
199 M_couplings.resize ( couplingsNumber );
209 M_couplings[localCouplingID] = coupling ;
218 M_couplings.push_back ( coupling );
241 const std::array< Real,
NDIM >& rotate,
242 const std::array< Real,
NDIM >& translate );
284 return M_boundaryFlags[boundaryID];
302 return static_cast< UInt > ( M_couplings.size() );
319 return M_couplings[localID];
348 void displayModelStatus (
const std::string& tag )
const;
383 if ( M_comm->MyPID() == 0 )
385 std::cout <<
" MS- " << tag <<
" model " << M_ID <<
" - " << M_modelName << std::endl;
virtual void setupModel()=0
Setup the model.
virtual void buildModel()=0
Build the initial model.
multiscaleCommPtr_Type M_comm
std::shared_ptr< multiscaleCoupling_Type > multiscaleCouplingPtr_Type
flag_Type multiscaleID_Type
Displayer::commPtr_Type multiscaleCommPtr_Type
virtual void updateModel()=0
Update the model.
UInt couplingLocalID(const UInt &ID) const
Get the coupling local ID through global ID.
MultiscaleModel()
The main constructor.
std::shared_ptr< multiscaleData_Type > multiscaleDataPtr_Type
multiscaleDataPtr_Type M_globalData
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.
const multiscaleCommPtr_Type & communicator() const
Get the communicator of the model.
virtual void solveModel()=0
Solve the System.
const models_Type & type() const
Get the type of the model.
virtual Real checkSolution() const =0
Return a specific scalar quantity to be used for a comparison with a reference value.
void updateInverseJacobian(const UInt &iQuadPt)
void setCommunicator(const multiscaleCommPtr_Type &comm)
Set the epetra communicator for the model.
std::array< Real, NDIM > M_geometryTranslate
void setCoupling(const UInt &localCouplingID, const multiscaleCouplingPtr_Type &coupling)
Add a pointer to one of the couplings attached to this model.
std::array< Real, NDIM > M_geometryRotate
multiscaleCouplingsContainer_Type M_couplings
void setGlobalData(const multiscaleDataPtr_Type &globalData)
Setup the global data of the model.
const multiscaleID_Type & boundaryFlag(const multiscaleID_Type &boundaryID) const
Get one available flag by id.
virtual void showMe()
Display some information about the model.
virtual ~MultiscaleModel()
Destructor.
multiscaleIDContainer_Type M_boundaryFlags
std::array< Real, NDIM > M_geometryScale
const std::string & modelName() const
Get the name of the model.
MultiscaleModel(const MultiscaleModel &model)
void addCoupling(const multiscaleCouplingPtr_Type &coupling)
Add a pointer to one of the couplings which couple the model.
std::vector< multiscaleCouplingPtr_Type > multiscaleCouplingsContainer_Type
double Real
Generic real data.
std::vector< multiscaleID_Type > multiscaleIDContainer_Type
MultiscaleModel & operator=(const MultiscaleModel &model)
UInt couplingsNumber() const
Get the number of couplings connecting the model.
const multiscaleDataPtr_Type & globalData() const
Get the global data of the model.
virtual void saveSolution()=0
Save the solution.
multiscaleCouplingPtr_Type coupling(const UInt &localID) const
Get the coupling through local ID.
const UInt & ID() const
Get the global ID of the model.
void setCouplingsNumber(const UInt &couplingsNumber)
Set the number of couplings attached to this model.
void clearCouplingsList()
Clear the list of pointers to the couplings.
void setID(const UInt &id)
Set the global ID of the model.
MultiscaleModel - The Multiscale Physical Model.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
virtual void updateSolution()=0
Update the solution.