Commit 3d6e0598 authored by Cristiano Malossi's avatar Cristiano Malossi
Browse files

Using the zerodimensional data class instead of the MultiscaleGlobalData

parent d1c3b2e9
...@@ -69,16 +69,16 @@ public: ...@@ -69,16 +69,16 @@ public:
//! @name Type definitions //! @name Type definitions
//@{ //@{
typedef ZeroDimensionalBCHandler bc_Type;
typedef boost::shared_ptr< bc_Type > bcPtr_Type;
typedef BCInterface0D< bc_Type, MultiscaleGlobalData > bcInterface_Type;
typedef boost::shared_ptr< bcInterface_Type > bcInterfacePtr_Type;
typedef ZeroDimensionalData data_Type; typedef ZeroDimensionalData data_Type;
typedef boost::shared_ptr< data_Type > dataPtr_Type; typedef boost::shared_ptr< data_Type > dataPtr_Type;
typedef ZeroDimensionalSolver solver_Type; typedef ZeroDimensionalSolver solver_Type;
typedef boost::shared_ptr< solver_Type > solverPtr_Type; typedef boost::shared_ptr< solver_Type > solverPtr_Type;
typedef ZeroDimensionalBCHandler bc_Type;
typedef boost::shared_ptr< bc_Type > bcPtr_Type;
typedef BCInterface0D< bc_Type, data_Type > bcInterface_Type;
typedef boost::shared_ptr< bcInterface_Type > bcInterfacePtr_Type;
//@} //@}
......
...@@ -50,6 +50,7 @@ MultiscaleModelWindkessel0D::MultiscaleModelWindkessel0D() : ...@@ -50,6 +50,7 @@ MultiscaleModelWindkessel0D::MultiscaleModelWindkessel0D() :
MultiscaleInterface (), MultiscaleInterface (),
M_outputFile (), M_outputFile (),
M_bc ( new bcInterface_Type() ), M_bc ( new bcInterface_Type() ),
M_data ( new data_Type() ),
M_pressureLeft_tn (), M_pressureLeft_tn (),
M_flowRateLeft_tn (), M_flowRateLeft_tn (),
M_pressureLeft (), M_pressureLeft (),
...@@ -114,7 +115,7 @@ MultiscaleModelWindkessel0D::setupModel() ...@@ -114,7 +115,7 @@ MultiscaleModelWindkessel0D::setupModel()
initializeSolution(); initializeSolution();
M_bc->setPhysicalSolver ( M_globalData ); M_bc->setPhysicalSolver ( M_data );
// Safety check // Safety check
if ( M_bc->handler()->bc ( 1 ).bcType() != Voltage ) if ( M_bc->handler()->bc ( 1 ).bcType() != Voltage )
...@@ -281,10 +282,14 @@ MultiscaleModelWindkessel0D::setupGlobalData ( const std::string& fileName ) ...@@ -281,10 +282,14 @@ MultiscaleModelWindkessel0D::setupGlobalData ( const std::string& fileName )
{ {
GetPot dataFile ( fileName ); GetPot dataFile ( fileName );
//Global data time
M_data->setTimeData ( M_globalData->dataTime() );
if ( !dataFile.checkVariable ( "Coefficients/VenousPressure" ) ) if ( !dataFile.checkVariable ( "Coefficients/VenousPressure" ) )
{ {
M_pressureRight = M_globalData->fluidVenousPressure(); M_pressureRight = M_globalData->fluidVenousPressure();
} }
M_data->setVenousPressure( M_pressureRight );
} }
void void
......
...@@ -40,6 +40,8 @@ ...@@ -40,6 +40,8 @@
#include <lifev/bc_interface/fem/BCInterface0D.hpp> #include <lifev/bc_interface/fem/BCInterface0D.hpp>
#include <lifev/zero_dimensional/solver/ZeroDimensionalData.hpp>
#include <lifev/multiscale/solver/MultiscaleModel.hpp> #include <lifev/multiscale/solver/MultiscaleModel.hpp>
#include <lifev/multiscale/solver/MultiscaleInterface.hpp> #include <lifev/multiscale/solver/MultiscaleInterface.hpp>
...@@ -70,7 +72,10 @@ public: ...@@ -70,7 +72,10 @@ public:
typedef ZeroDimensionalBCHandler bc_Type; typedef ZeroDimensionalBCHandler bc_Type;
typedef boost::shared_ptr< bc_Type > bcPtr_Type; typedef boost::shared_ptr< bc_Type > bcPtr_Type;
typedef BCInterface0D< bc_Type, MultiscaleGlobalData > bcInterface_Type; typedef ZeroDimensionalData data_Type;
typedef boost::shared_ptr< data_Type > dataPtr_Type;
typedef BCInterface0D< bc_Type, data_Type > bcInterface_Type;
typedef boost::shared_ptr< bcInterface_Type > bcInterfacePtr_Type; typedef boost::shared_ptr< bcInterface_Type > bcInterfacePtr_Type;
//@} //@}
...@@ -351,6 +356,8 @@ private: ...@@ -351,6 +356,8 @@ private:
bcInterfacePtr_Type M_bc; bcInterfacePtr_Type M_bc;
dataPtr_Type M_data;
Real M_pressureLeft_tn; // pressure left (P1) @ t=t(n) Real M_pressureLeft_tn; // pressure left (P1) @ t=t(n)
Real M_flowRateLeft_tn; // flowRate left (Q1) @ t=t(n) Real M_flowRateLeft_tn; // flowRate left (Q1) @ t=t(n)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment