37 #ifndef MS_Definitions_H 38 #define MS_Definitions_H 1
47 #include <boost/array.hpp> 48 #include <boost/shared_ptr.hpp> 49 #include <boost/algorithm/string.hpp> 53 #include <lifev/core/LifeV.hpp> 54 #include <lifev/core/util/StringUtility.hpp> 55 #include <lifev/core/util/Displayer.hpp> 56 #include <lifev/core/util/Factory.hpp> 57 #include <lifev/core/util/FactorySingleton.hpp> 58 #include <lifev/core/mesh/MarkerDefinitions.hpp> 60 #include <lifev/core/algorithm/LinearSolver.hpp> 62 #include <lifev/core/array/MapEpetra.hpp> 63 #include <lifev/core/array/VectorEpetra.hpp> 64 #include <lifev/core/array/MatrixEpetra.hpp> 66 #include <lifev/multiscale/framework/MultiscaleGlobalData.hpp> 194 #if defined(LIFEV_HAS_NAVIERSTOKES) 195 multiscaleModelsMap[
"Fluid3D"] = Fluid3D;
197 #if defined(LIFEV_HAS_ONEDFSI) 198 multiscaleModelsMap[
"FSI1D"] = FSI1D;
200 #if defined(LIFEV_HAS_FSI) 201 multiscaleModelsMap[
"FSI3D"] = FSI3D;
203 multiscaleModelsMap[
"Multiscale"] = Multiscale;
204 #if defined(LIFEV_HAS_ZERODIMENSIONAL) 205 multiscaleModelsMap[
"Windkessel0D"] = Windkessel0D;
206 multiscaleModelsMap[
"ZeroDimensional"] = ZeroDimensional;
209 multiscaleCouplingsMap[
"BoundaryCondition"] = BoundaryCondition;
210 multiscaleCouplingsMap[
"MeanNormalStress"] = MeanNormalStress;
211 multiscaleCouplingsMap[
"MeanNormalStressValve"] = MeanNormalStressValve;
212 multiscaleCouplingsMap[
"MeanTotalNormalStress"] = MeanTotalNormalStress;
213 #if defined(LIFEV_HAS_ONEDFSI) && defined(LIFEV_HAS_FSI) 214 multiscaleCouplingsMap[
"MeanNormalStressArea"] = MeanNormalStressArea;
215 multiscaleCouplingsMap[
"MeanTotalNormalStressArea"] = MeanTotalNormalStressArea;
218 multiscaleAlgorithmsMap[
"Aitken"] = Aitken;
219 multiscaleAlgorithmsMap[
"Broyden"] = Broyden;
220 multiscaleAlgorithmsMap[
"Explicit"] = Explicit;
221 multiscaleAlgorithmsMap[
"Newton"] = Newton;
229 template <
typename DerivedType,
typename BasePtrType >
233 return std::dynamic_pointer_cast< DerivedType > ( base );
243 std::cerr << std::setprecision ( 10 ) << std::scientific <<
"MS ERROR: " << errorMessage.str() << std::endl;
252 multiscaleErrorCheck (
const errors_Type& error,
const std::string& message =
"",
const UInt& isLeader =
true )
256 std::stringstream errorMessage;
260 case IterationsMaximumNumber:
262 errorMessage <<
"Maximum number of iterations reached!\n";
268 errorMessage <<
"Tolerance not satisfied!\n";
274 errorMessage <<
"External residual not satisfied!\n";
280 errorMessage <<
"Solution check not satisfied!\n";
286 errorMessage <<
"Model type incorrect!\n";
292 errorMessage <<
"Coupling type incorrect!\n";
298 errorMessage <<
"Model interface not available!\n";
304 errorMessage <<
"No error message for this errorType!\n";
309 errorMessage << message <<
"\n";
VectorEpetra - The Epetra Vector format Wrapper.
multiscaleCouplingsContainer_Type::iterator multiscaleCouplingsContainerIterator_Type
std::shared_ptr< multiscaleAlgorithm_Type > multiscaleAlgorithmPtr_Type
Teuchos::ParameterList parameterList_Type
uint32_type flag_Type
bit-flag with up to 32 different flags
MultiscaleAlgorithm - The Multiscale Algorithm Interface.
Teuchos::RCP< parameterList_Type > parameterListPtr_Type
multiscaleModelsContainer_Type::iterator multiscaleModelsContainerIterator_Type
FactorySingleton< Factory< multiscaleModel_Type, models_Type > > multiscaleModelFactory_Type
std::shared_ptr< multiscaleCoupling_Type > multiscaleCouplingPtr_Type
flag_Type multiscaleID_Type
Displayer::commPtr_Type multiscaleCommPtr_Type
std::string multiscaleProblemFolder
void importFromHDF5(std::string const &fileName, std::string const &matrixName="matrix")
Read a matrix from a HDF5 (.h5) file.
std::shared_ptr< multiscaleData_Type > multiscaleDataPtr_Type
MultiscaleCoupling multiscaleCoupling_Type
std::shared_ptr< comm_Type > commPtr_Type
void multiscaleMapsDefinition()
Define the map of the MS objects.
void updateInverseJacobian(const UInt &iQuadPt)
multiscaleIDContainer_Type::const_iterator multiscaleIDContainerConstIterator_Type
std::map< std::string, couplings_Type > multiscaleCouplingsMap
MultiscaleGlobalData - Global data container for the physical quantities of the problem.
std::shared_ptr< multiscaleModel_Type > multiscaleModelPtr_Type
std::shared_ptr< DerivedType > multiscaleDynamicCast(BasePtrType &base)
Perform a dynamic cast from a base class to a derived class.
UInt multiscaleProblemStep
void multiscaleErrorMessage(const std::stringstream &errorMessage)
Display and error message.
multiscaleCouplingsContainer_Type::const_iterator multiscaleCouplingsContainerConstIterator_Type
UInt multiscaleCoresPerNode
FactorySingleton< Factory< multiscaleAlgorithm_Type, algorithms_Type > > multiscaleAlgorithmFactory_Type
MultiscaleModel multiscaleModel_Type
std::string multiscaleProblemPrefix
LinearSolver - Class to wrap linear solver.
FactorySingleton< Factory< multiscaleCoupling_Type, couplings_Type > > multiscaleCouplingFactory_Type
MatrixEpetra< Real > multiscaleMatrix_Type
std::vector< multiscaleModelPtr_Type > multiscaleModelsContainer_Type
multiscaleModelsContainer_Type::const_iterator multiscaleModelsContainerConstIterator_Type
std::map< std::string, algorithms_Type > multiscaleAlgorithmsMap
MultiscaleAlgorithm multiscaleAlgorithm_Type
std::vector< multiscaleCouplingPtr_Type > multiscaleCouplingsContainer_Type
LinearSolver::parameterList_Type multiscaleParameterList_Type
double Real
Generic real data.
std::vector< multiscaleID_Type > multiscaleIDContainer_Type
MultiscaleGlobalData multiscaleData_Type
UInt multiscaleSaveEachNTimeSteps
std::map< std::string, models_Type > multiscaleModelsMap
LinearSolver::parameterListPtr_Type multiscaleParameterListPtr_Type
MultiscaleCoupling - The Multiscale Physical Coupling.
std::shared_ptr< multiscaleMatrix_Type > multiscaleMatrixPtr_Type
std::shared_ptr< multiscaleVector_Type > multiscaleVectorPtr_Type
MultiscaleModel - The Multiscale Physical Model.
Displayer - This class is used to display messages in parallel simulations.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
VectorEpetra multiscaleVector_Type