Commit 4f3fdcd5 authored by Cristiano Malossi's avatar Cristiano Malossi
Browse files

BCInterface functions are now templetized on the BCHandler.

parent d7ae432f
......@@ -236,7 +236,7 @@ BCInterface0D< BcHandler, PhysicalSolverType >::addBcToHandler()
this->createHandler();
}
this->M_handler->setBC ( M_data.flag(), M_data.type(), boost::bind ( &BCInterfaceFunction<PhysicalSolverType>::functionTime, this->M_vectorFunction.back(), _1 ) );
this->M_handler->setBC ( M_data.flag(), M_data.type(), boost::bind ( &BCInterfaceFunction<BcHandler, PhysicalSolverType>::functionTime, this->M_vectorFunction.back(), _1 ) );
}
} // Namespace LifeV
......
......@@ -45,11 +45,11 @@ namespace LifeV
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< ZeroDimensionalData >::updatePhysicalSolverVariables()
BCInterfaceFunctionParserSolver< ZeroDimensionalBCHandler, ZeroDimensionalData >::updatePhysicalSolverVariables()
{
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<ZeroDimensionalData>::updatePhysicalSolverVariables" << "\n";
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<ZeroDimensionalBCHandler, ZeroDimensionalData>::updatePhysicalSolverVariables" << "\n";
#endif
// Create/Update variables
......@@ -90,11 +90,11 @@ BCInterfaceFunctionParserSolver< ZeroDimensionalData >::updatePhysicalSolverVari
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< ZeroDimensionalData >::createAccessList ( const BCInterfaceData& data )
BCInterfaceFunctionParserSolver< ZeroDimensionalBCHandler, ZeroDimensionalData >::createAccessList ( const BCInterfaceData& data )
{
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<ZeroDimensionalData>::createAccessList( data )" << "\n";
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<ZeroDimensionalBCHandler, ZeroDimensionalData>::createAccessList( data )" << "\n";
#endif
std::map< std::string, physicalSolverList > mapList;
......
......@@ -51,14 +51,14 @@ namespace LifeV
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< ZeroDimensionalData >::updatePhysicalSolverVariables();
BCInterfaceFunctionParserSolver< ZeroDimensionalBCHandler, ZeroDimensionalData >::updatePhysicalSolverVariables();
// ===================================================
// Protected Methods
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< ZeroDimensionalData >::createAccessList ( const BCInterfaceData& data );
BCInterfaceFunctionParserSolver< ZeroDimensionalBCHandler, ZeroDimensionalData >::createAccessList ( const BCInterfaceData& data );
} // Namespace LifeV
......
......@@ -114,6 +114,9 @@ public:
typedef typename bcInterface_Type::bcFunctionPtr_Type bcFunctionPtr_Type;
typedef typename bcInterface_Type::vectorFunction_Type vectorFunction_Type;
typedef typename bcInterface_Type::bcFunctionParserSolver_Type bcFunctionParserSolver_Type;
typedef typename bcInterface_Type::bcFunctionParserSolverPtr_Type bcFunctionParserSolverPtr_Type;
typedef typename bcInterface_Type::bcFunctionSolverDefinedPtr_Type bcFunctionSolverDefinedPtr_Type;
typedef typename bcInterface_Type::vectorFunctionSolverDefined_Type vectorFunctionSolverDefined_Type;
......@@ -307,8 +310,7 @@ BCInterface1D< BcHandler, PhysicalSolverType >::setSolution ( const solutionPtr_
//for ( typename vectorFunction_Type::const_iterator i = M_vectorFunction.begin() ; i < M_vectorFunction.end() ; ++i )
for ( UInt i ( 0 ); i < this->M_vectorFunction.size(); ++i )
{
boost::shared_ptr< BCInterfaceFunctionParserSolver< physicalSolver_Type > > castedFunctionSolver =
boost::dynamic_pointer_cast< BCInterfaceFunctionParserSolver< physicalSolver_Type > > ( this->M_vectorFunction[i] );
bcFunctionParserSolverPtr_Type castedFunctionSolver = boost::dynamic_pointer_cast< bcFunctionParserSolver_Type > ( this->M_vectorFunction[i] );
if ( castedFunctionSolver != 0 )
{
......
......@@ -45,7 +45,7 @@ namespace LifeV
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< OneDFSISolver >::updatePhysicalSolverVariables()
BCInterfaceFunctionParserSolver< OneDFSIBCHandler, OneDFSISolver >::updatePhysicalSolverVariables()
{
#ifdef HAVE_LIFEV_DEBUG
......@@ -187,7 +187,7 @@ BCInterfaceFunctionParserSolver< OneDFSISolver >::updatePhysicalSolverVariables(
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< OneDFSISolver >::createAccessList ( const BCInterfaceData& data )
BCInterfaceFunctionParserSolver< OneDFSIBCHandler, OneDFSISolver >::createAccessList ( const BCInterfaceData& data )
{
#ifdef HAVE_LIFEV_DEBUG
......
......@@ -51,14 +51,14 @@ namespace LifeV
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< OneDFSISolver >::updatePhysicalSolverVariables();
BCInterfaceFunctionParserSolver< OneDFSIBCHandler, OneDFSISolver >::updatePhysicalSolverVariables();
// ===================================================
// Protected Methods
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< OneDFSISolver >::createAccessList ( const BCInterfaceData& data );
BCInterfaceFunctionParserSolver< OneDFSIBCHandler, OneDFSISolver >::createAccessList ( const BCInterfaceData& data );
} // Namespace LifeV
......
......@@ -42,7 +42,7 @@ namespace LifeV
// ===================================================
// Constructors
// ===================================================
BCInterfaceFunctionSolverDefined< OneDFSISolver >::BCInterfaceFunctionSolverDefined() :
BCInterfaceFunctionSolverDefined< OneDFSIBCHandler, OneDFSISolver >::BCInterfaceFunctionSolverDefined() :
M_defaultFunction (),
M_function ()
{
......@@ -57,7 +57,7 @@ BCInterfaceFunctionSolverDefined< OneDFSISolver >::BCInterfaceFunctionSolverDefi
// Methods
// ===================================================
void
BCInterfaceFunctionSolverDefined< OneDFSISolver >::assignFunction ( OneDFSIFunction& base )
BCInterfaceFunctionSolverDefined< OneDFSIBCHandler, OneDFSISolver >::assignFunction ( OneDFSIFunction& base )
{
switch ( M_defaultFunction )
{
......@@ -95,7 +95,7 @@ BCInterfaceFunctionSolverDefined< OneDFSISolver >::assignFunction ( OneDFSIFunct
// Set Methods
// ===================================================
void
BCInterfaceFunctionSolverDefined< OneDFSISolver >::setData ( const BCInterfaceData1D& data )
BCInterfaceFunctionSolverDefined< OneDFSIBCHandler, OneDFSISolver >::setData ( const BCInterfaceData1D& data )
{
#ifdef HAVE_LIFEV_DEBUG
......
......@@ -65,17 +65,18 @@ namespace LifeV
* </ol>
*/
template< >
class BCInterfaceFunctionSolverDefined< OneDFSISolver >
class BCInterfaceFunctionSolverDefined< OneDFSIBCHandler, OneDFSISolver >
{
public:
//! @name Type definitions
//@{
typedef OneDFSIBCHandler bcHandler_Type;
typedef OneDFSISolver physicalSolver_Type;
typedef boost::shared_ptr< physicalSolver_Type > physicalSolverPtr_Type;
typedef OneDFSIBC bc_Type;
typedef bcHandler_Type::bc_Type bc_Type;
typedef bc_Type::bcFunctionSolverDefinedPtr_Type bcFunctionSolverDefinedPtr_Type;
typedef bc_Type::vectorPtrContainer_Type vectorPtrContainer_Type;
......
......@@ -45,11 +45,11 @@ namespace LifeV
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< OseenSolver< RegionMesh< LinearTetra > > >::updatePhysicalSolverVariables()
BCInterfaceFunctionParserSolver< BCHandler, OseenSolver< RegionMesh< LinearTetra > > >::updatePhysicalSolverVariables()
{
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<OseenSolver>::updatePhysicalSolverVariables" << "\n";
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<BCHandler, OseenSolver>::updatePhysicalSolverVariables" << "\n";
#endif
// Create/Update variables
......@@ -123,11 +123,11 @@ BCInterfaceFunctionParserSolver< OseenSolver< RegionMesh< LinearTetra > > >::upd
template< >
void
BCInterfaceFunctionParserSolver< OseenSolverShapeDerivative< RegionMesh< LinearTetra > > >::updatePhysicalSolverVariables()
BCInterfaceFunctionParserSolver< BCHandler, OseenSolverShapeDerivative< RegionMesh< LinearTetra > > >::updatePhysicalSolverVariables()
{
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<OseenSolverShapeDerivative>::updatePhysicalSolverVariables" << "\n";
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<BCHandler, OseenSolverShapeDerivative>::updatePhysicalSolverVariables" << "\n";
#endif
// Create/Update variables
......@@ -204,11 +204,11 @@ BCInterfaceFunctionParserSolver< OseenSolverShapeDerivative< RegionMesh< LinearT
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< OseenSolver< RegionMesh< LinearTetra > > >::createAccessList ( const BCInterfaceData& data )
BCInterfaceFunctionParserSolver< BCHandler, OseenSolver< RegionMesh< LinearTetra > > >::createAccessList ( const BCInterfaceData& data )
{
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<OseenSolver>::createAccessList( data )" << "\n";
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<BCHandler, OseenSolver>::createAccessList( data )" << "\n";
#endif
std::map< std::string, physicalSolverList > mapList;
......@@ -224,11 +224,11 @@ BCInterfaceFunctionParserSolver< OseenSolver< RegionMesh< LinearTetra > > >::cre
template< >
void
BCInterfaceFunctionParserSolver< OseenSolverShapeDerivative< RegionMesh< LinearTetra > > >::createAccessList ( const BCInterfaceData& data )
BCInterfaceFunctionParserSolver< BCHandler, OseenSolverShapeDerivative< RegionMesh< LinearTetra > > >::createAccessList ( const BCInterfaceData& data )
{
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<OseenSolverShapeDerivative>::createAccessList( data )" << "\n";
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<BCHandler, OseenSolverShapeDerivative>::createAccessList( data )" << "\n";
#endif
std::map< std::string, physicalSolverList > mapList;
......
......@@ -51,22 +51,22 @@ namespace LifeV
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< OseenSolver< RegionMesh< LinearTetra > > >::updatePhysicalSolverVariables();
BCInterfaceFunctionParserSolver< BCHandler, OseenSolver< RegionMesh< LinearTetra > > >::updatePhysicalSolverVariables();
template< >
void
BCInterfaceFunctionParserSolver< OseenSolverShapeDerivative< RegionMesh< LinearTetra > > >::updatePhysicalSolverVariables();
BCInterfaceFunctionParserSolver< BCHandler, OseenSolverShapeDerivative< RegionMesh< LinearTetra > > >::updatePhysicalSolverVariables();
// ===================================================
// Protected Methods
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< OseenSolver< RegionMesh< LinearTetra > > >::createAccessList ( const BCInterfaceData& data );
BCInterfaceFunctionParserSolver< BCHandler, OseenSolver< RegionMesh< LinearTetra > > >::createAccessList ( const BCInterfaceData& data );
template< >
void
BCInterfaceFunctionParserSolver< OseenSolverShapeDerivative< RegionMesh< LinearTetra > > >::createAccessList ( const BCInterfaceData& data );
BCInterfaceFunctionParserSolver< BCHandler, OseenSolverShapeDerivative< RegionMesh< LinearTetra > > >::createAccessList ( const BCInterfaceData& data );
} // Namespace LifeV
......
......@@ -45,11 +45,11 @@ namespace LifeV
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< FSIOperator >::updatePhysicalSolverVariables()
BCInterfaceFunctionParserSolver< BCHandler, FSIOperator >::updatePhysicalSolverVariables()
{
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<FSIOperator>::updatePhysicalSolverVariables" << "\n";
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<BCHandler, FSIOperator>::updatePhysicalSolverVariables" << "\n";
#endif
// Create/Update variables
......@@ -189,11 +189,11 @@ BCInterfaceFunctionParserSolver< FSIOperator >::updatePhysicalSolverVariables()
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< FSIOperator >::createAccessList ( const BCInterfaceData& data )
BCInterfaceFunctionParserSolver< BCHandler, FSIOperator >::createAccessList ( const BCInterfaceData& data )
{
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<FSIOperator>::createAccessList( data )" << "\n";
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<BCHandler, FSIOperator>::createAccessList( data )" << "\n";
#endif
std::map< std::string, physicalSolverList > mapList;
......
......@@ -51,14 +51,14 @@ namespace LifeV
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< FSIOperator >::updatePhysicalSolverVariables();
BCInterfaceFunctionParserSolver< BCHandler, FSIOperator >::updatePhysicalSolverVariables();
// ===================================================
// Protected Methods
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< FSIOperator >::createAccessList ( const BCInterfaceData& data );
BCInterfaceFunctionParserSolver< BCHandler, FSIOperator >::createAccessList ( const BCInterfaceData& data );
} // Namespace LifeV
......
......@@ -42,7 +42,7 @@ namespace LifeV
// ===================================================
// Constructors
// ===================================================
BCInterfaceFunctionSolverDefined< FSIOperator >::BCInterfaceFunctionSolverDefined() :
BCInterfaceFunctionSolverDefined< BCHandler, FSIOperator >::BCInterfaceFunctionSolverDefined() :
M_FSIFunction (),
M_physicalSolver (),
M_name (),
......@@ -66,7 +66,7 @@ BCInterfaceFunctionSolverDefined< FSIOperator >::BCInterfaceFunctionSolverDefine
// Methods
// ===================================================
void
BCInterfaceFunctionSolverDefined< FSIOperator >::exportData ( BCInterfaceData3D& data )
BCInterfaceFunctionSolverDefined< BCHandler, FSIOperator >::exportData ( BCInterfaceData3D& data )
{
#ifdef HAVE_LIFEV_DEBUG
......@@ -81,7 +81,7 @@ BCInterfaceFunctionSolverDefined< FSIOperator >::exportData ( BCInterfaceData3D&
}
void
BCInterfaceFunctionSolverDefined< FSIOperator >::updatePhysicalSolverVariables()
BCInterfaceFunctionSolverDefined< BCHandler, FSIOperator >::updatePhysicalSolverVariables()
{
#ifdef HAVE_LIFEV_DEBUG
......@@ -100,8 +100,7 @@ BCInterfaceFunctionSolverDefined< FSIOperator >::updatePhysicalSolverVariables()
// Update the physical solver variables
for ( UInt i ( 0 ); i < M_vectorFunctionRobin.size(); ++i )
{
boost::shared_ptr< BCInterfaceFunctionParserSolver< physicalSolver_Type > > castedFunctionSolver =
boost::dynamic_pointer_cast< BCInterfaceFunctionParserSolver< physicalSolver_Type > > ( M_vectorFunctionRobin[i] );
functionParserSolverPtr_Type castedFunctionSolver = boost::dynamic_pointer_cast< functionParserSolver_Type > ( M_vectorFunctionRobin[i] );
if ( castedFunctionSolver != 0 )
{
......@@ -161,7 +160,7 @@ BCInterfaceFunctionSolverDefined< FSIOperator >::updatePhysicalSolverVariables()
// Set Methods
// ===================================================
void
BCInterfaceFunctionSolverDefined< FSIOperator >::setData ( const BCInterfaceData3D& data )
BCInterfaceFunctionSolverDefined< BCHandler, FSIOperator >::setData ( const BCInterfaceData3D& data )
{
#ifdef HAVE_LIFEV_DEBUG
......@@ -213,7 +212,7 @@ BCInterfaceFunctionSolverDefined< FSIOperator >::setData ( const BCInterfaceData
// Get Methods
// ===================================================
baseContainer_Type
BCInterfaceFunctionSolverDefined< FSIOperator >::baseType() const
BCInterfaceFunctionSolverDefined< BCHandler, FSIOperator >::baseType() const
{
switch ( M_FSIFunction )
{
......
......@@ -86,21 +86,26 @@ namespace LifeV
* </ol>
*/
template< >
class BCInterfaceFunctionSolverDefined< FSIOperator >
class BCInterfaceFunctionSolverDefined< BCHandler, FSIOperator >
{
public:
//! @name Type definitions
//@{
typedef FSIOperator physicalSolver_Type;
typedef boost::shared_ptr< physicalSolver_Type > physicalSolverPtr_Type;
typedef BCHandler bcHandler_Type;
typedef boost::shared_ptr< bcHandler_Type > bcHandlerPtr_Type;
typedef BCInterfaceFactory< FSIOperator > factory_Type;
typedef FSIOperator physicalSolver_Type;
typedef boost::shared_ptr< physicalSolver_Type > physicalSolverPtr_Type;
typedef BCInterfaceFunction< physicalSolver_Type > bcFunction_Type;
typedef boost::shared_ptr< bcFunction_Type > bcFunctionPtr_Type;
typedef std::vector< bcFunctionPtr_Type > vectorFunction_Type;
typedef BCInterfaceFactory< bcHandler_Type, physicalSolver_Type > factory_Type;
typedef BCInterfaceFunction< bcHandler_Type, physicalSolver_Type > bcFunction_Type;
typedef boost::shared_ptr< bcFunction_Type > bcFunctionPtr_Type;
typedef std::vector< bcFunctionPtr_Type > vectorFunction_Type;
typedef BCInterfaceFunctionParserSolver< bcHandler_Type, physicalSolver_Type > functionParserSolver_Type;
typedef boost::shared_ptr< functionParserSolver_Type > functionParserSolverPtr_Type;
//@}
......@@ -245,7 +250,7 @@ private:
// ===================================================
template< class BCBaseType >
inline void
BCInterfaceFunctionSolverDefined< FSIOperator >::assignFunction ( BCBaseType& base )
BCInterfaceFunctionSolverDefined< BCHandler, FSIOperator >::assignFunction ( BCBaseType& base )
{
//Set mapMethod
std::map< std::string, FSIMethod > mapMethod;
......@@ -310,7 +315,7 @@ BCInterfaceFunctionSolverDefined< FSIOperator >::assignFunction ( BCBaseType& ba
// Private functions
// ===================================================
template< class MethodType >
inline void BCInterfaceFunctionSolverDefined< FSIOperator >::checkFunction ( BCVectorInterface& base )
inline void BCInterfaceFunctionSolverDefined< BCHandler, FSIOperator >::checkFunction ( BCVectorInterface& base )
{
boost::shared_ptr< MethodType > operMethod = boost::dynamic_pointer_cast< MethodType > ( M_physicalSolver );
......@@ -479,7 +484,7 @@ inline void BCInterfaceFunctionSolverDefined< FSIOperator >::checkFunction ( BCV
}
template< class MethodType >
inline void BCInterfaceFunctionSolverDefined< FSIOperator >::checkFunction ( BCVector& base )
inline void BCInterfaceFunctionSolverDefined< BCHandler, FSIOperator >::checkFunction ( BCVector& base )
{
boost::shared_ptr< MethodType > operMethod = boost::dynamic_pointer_cast< MethodType > ( M_physicalSolver );
......@@ -509,8 +514,7 @@ inline void BCInterfaceFunctionSolverDefined< FSIOperator >::checkFunction ( BCV
// Set the physical solver in the Robin functions for alpha and beta
for ( UInt i ( 0 ); i < M_vectorFunctionRobin.size(); ++i )
{
boost::shared_ptr< BCInterfaceFunctionParserSolver< physicalSolver_Type > > castedFunctionSolver =
boost::dynamic_pointer_cast< BCInterfaceFunctionParserSolver< physicalSolver_Type > > ( M_vectorFunctionRobin[i] );
functionParserSolverPtr_Type castedFunctionSolver = boost::dynamic_pointer_cast< functionParserSolver_Type > ( M_vectorFunctionRobin[i] );
if ( castedFunctionSolver != 0 )
{
......@@ -529,7 +533,7 @@ inline void BCInterfaceFunctionSolverDefined< FSIOperator >::checkFunction ( BCV
}
template< class MethodType >
inline void BCInterfaceFunctionSolverDefined< FSIOperator >::checkFunction ( BCFunctionBase& /*base*/ )
inline void BCInterfaceFunctionSolverDefined< BCHandler, FSIOperator >::checkFunction ( BCFunctionBase& /*base*/ )
{
boost::shared_ptr< MethodType > operMethod = boost::dynamic_pointer_cast< MethodType > ( M_physicalSolver );
......
......@@ -162,21 +162,24 @@ public:
//! @name Type definitions
//@{
typedef BcHandler bcHandler_Type;
typedef boost::shared_ptr< bcHandler_Type > bcHandlerPtr_Type;
typedef BcHandler bcHandler_Type;
typedef boost::shared_ptr< bcHandler_Type > bcHandlerPtr_Type;
typedef PhysicalSolverType physicalSolver_Type;
typedef boost::shared_ptr< physicalSolver_Type > physicalSolverPtr_Type;
typedef PhysicalSolverType physicalSolver_Type;
typedef boost::shared_ptr< physicalSolver_Type > physicalSolverPtr_Type;
typedef BCInterfaceFactory< physicalSolver_Type > factory_Type;
typedef BCInterfaceFactory< bcHandler_Type, physicalSolver_Type > factory_Type;
typedef typename factory_Type::bcFunctionPtr_Type bcFunctionPtr_Type;
typedef std::vector< bcFunctionPtr_Type > vectorFunction_Type;
typedef typename factory_Type::bcFunctionPtr_Type bcFunctionPtr_Type;
typedef std::vector< bcFunctionPtr_Type > vectorFunction_Type;
typedef typename factory_Type::bcFunctionSolverDefinedPtr_Type bcFunctionSolverDefinedPtr_Type;
typedef std::vector< bcFunctionSolverDefinedPtr_Type > vectorFunctionSolverDefined_Type;
typedef typename factory_Type::bcFunctionParserSolver_Type bcFunctionParserSolver_Type;
typedef typename factory_Type::bcFunctionParserSolverPtr_Type bcFunctionParserSolverPtr_Type;
typedef BCInterfaceData data_Type;
typedef typename factory_Type::bcFunctionSolverDefinedPtr_Type bcFunctionSolverDefinedPtr_Type;
typedef std::vector< bcFunctionSolverDefinedPtr_Type > vectorFunctionSolverDefined_Type;
typedef BCInterfaceData data_Type;
//@}
......@@ -340,8 +343,7 @@ BCInterface< BcHandler, PhysicalSolverType >::updatePhysicalSolverVariables()
for ( UInt i ( 0 ); i < M_vectorFunction.size(); ++i )
{
boost::shared_ptr< BCInterfaceFunctionParserSolver< physicalSolver_Type > > castedFunctionSolver =
boost::dynamic_pointer_cast< BCInterfaceFunctionParserSolver< physicalSolver_Type > > ( M_vectorFunction[i] );
bcFunctionParserSolverPtr_Type castedFunctionSolver = boost::dynamic_pointer_cast< bcFunctionParserSolver_Type > ( M_vectorFunction[i] );
if ( castedFunctionSolver != 0 )
{
......@@ -365,8 +367,7 @@ BCInterface< BcHandler, PhysicalSolverType >::setPhysicalSolver ( const physical
//for ( typename vectorFunction_Type::const_iterator i = M_vectorFunction.begin() ; i < M_vectorFunction.end() ; ++i )
for ( UInt i ( 0 ); i < M_vectorFunction.size(); ++i )
{
boost::shared_ptr< BCInterfaceFunctionParserSolver< physicalSolver_Type > > castedFunctionSolver =
boost::dynamic_pointer_cast< BCInterfaceFunctionParserSolver< physicalSolver_Type > > ( M_vectorFunction[i] );
bcFunctionParserSolverPtr_Type castedFunctionSolver = boost::dynamic_pointer_cast< bcFunctionParserSolver_Type > ( M_vectorFunction[i] );
if ( castedFunctionSolver != 0 )
{
......
......@@ -78,16 +78,14 @@ enum baseList_Type
enum baseContainer_Type
{
BASEDefault,
#ifdef LIFEV_HAS_ONEDFSI
BASEFunction1D,
#endif
BASEFunction3D,
BASEVector3D,
BASEVectorInterface3D
};
// Forward class declarations
template< class PhysicalSolverType >
template< typename BcHandlerType, typename PhysicalSolverType >
class BCInterfaceFactory;
} // Namespace LifeV
......
......@@ -50,11 +50,11 @@ namespace LifeV
{
// Forward class declarations
template< class PhysicalSolverType >
template< typename BcHandlerType, typename PhysicalSolverType >
class BCInterfaceFunctionSolverDefined;
template< typename PhysicalSolverType >
inline BCInterfaceFunctionSolverDefined< PhysicalSolverType >* createBCInterfaceFunctionSolverDefined();
template< typename BcHandlerType, typename PhysicalSolverType >
inline BCInterfaceFunctionSolverDefined< BcHandlerType, PhysicalSolverType >* createBCInterfaceFunctionSolverDefined();
......@@ -75,7 +75,7 @@ inline BCInterfaceFunctionSolverDefined< PhysicalSolverType >* createBCInterface
* </ol>
*/
template< class PhysicalSolverType >
template< typename BcHandlerType, typename PhysicalSolverType >
class BCInterfaceFactory
{
public:
......@@ -83,13 +83,17 @@ public:
//! @name Type definitions
//@{
typedef BcHandlerType bcHandler_Type;
typedef PhysicalSolverType physicalSolver_Type;
typedef BCInterfaceFunction< physicalSolver_Type > bcFunction_Type;
typedef BCInterfaceFunction< bcHandler_Type, physicalSolver_Type > bcFunction_Type;
typedef boost::shared_ptr< bcFunction_Type > bcFunctionPtr_Type;
typedef FactorySingleton< Factory< bcFunction_Type , baseList_Type > > factoryFunction_Type;
typedef BCInterfaceFunctionSolverDefined< physicalSolver_Type > bcFunctionSolverDefined_Type;
typedef BCInterfaceFunctionParserSolver< bcHandler_Type, physicalSolver_Type > bcFunctionParserSolver_Type;
typedef boost::shared_ptr< bcFunctionParserSolver_Type > bcFunctionParserSolverPtr_Type;
typedef BCInterfaceFunctionSolverDefined< bcHandler_Type, physicalSolver_Type > bcFunctionSolverDefined_Type;
typedef boost::shared_ptr< bcFunctionSolverDefined_Type > bcFunctionSolverDefinedPtr_Type;
typedef FactorySingleton< Factory< bcFunctionSolverDefined_Type, baseList_Type > > factoryFunctionSolverDefined_Type;
......@@ -142,8 +146,8 @@ private:
// ===================================================
// Constructors & Destructor
// ===================================================
template< class PhysicalSolverType >
BCInterfaceFactory< PhysicalSolverType >::BCInterfaceFactory()
template< typename BcHandlerType, typename PhysicalSolverType >
BCInterfaceFactory< BcHandlerType, PhysicalSolverType >::BCInterfaceFactory()
{
#ifdef HAVE_LIFEV_DEBUG
......@@ -151,20 +155,20 @@ BCInterfaceFactory< PhysicalSolverType >::BCInterfaceFactory()
#endif
//Factory registration
factoryFunction_Type::instance().registerProduct ( BCIFunctionParser, &createBCInterfaceFunctionParser< physicalSolver_Type > );
factoryFunction_Type::instance().registerProduct ( BCIFunctionParserFile, &createBCInterfaceFunctionParserFile< physicalSolver_Type > );
factoryFunction_Type::instance().registerProduct ( BCIFunctionParserSolver, &createBCInterfaceFunctionParserSolver< physicalSolver_Type > );
factoryFunction_Type::instance().registerProduct ( BCIFunctionParserFileSolver, &createBCInterfaceFunctionParserFileSolver< physicalSolver_Type > );
factoryFunction_Type::instance().registerProduct ( BCIFunctionUserDefined, &createBCInterfaceFunctionUserDefined< physicalSolver_Type > );
factoryFunctionSolverDefined_Type::instance().registerProduct ( BCIFunctionSolverDefined, &createBCInterfaceFunctionSolverDefined< physicalSolver_Type > );
factoryFunction_Type::instance().registerProduct ( BCIFunctionParser, &createBCInterfaceFunctionParser< bcHandler_Type, physicalSolver_Type > );
factoryFunction_Type::instance().registerProduct ( BCIFunctionParserFile, &createBCInterfaceFunctionParserFile< bcHandler_Type, physicalSolver_Type > );
factoryFunction_Type::instance().registerProduct ( BCIFunctionParserSolver, &createBCInterfaceFunctionParserSolver< bcHandler_Type, physicalSolver_Type > );
factoryFunction_Type::instance().registerProduct ( BCIFunctionParserFileSolver, &createBCInterfaceFunctionParserFileSolver< bcHandler_Type, physicalSolver_Type > );
factoryFunction_Type::instance().registerProduct ( BCIFunctionUserDefined, &createBCInterfaceFunctionUserDefined< bcHandler_Type, physicalSolver_Type > );
factoryFunctionSolverDefined_Type::instance().registerProduct ( BCIFunctionSolverDefined, &createBCInterfaceFunctionSolverDefined< bcHandler_Type, physicalSolver_Type > );
}
// ===================================================
// Methods
// ===================================================
template< class PhysicalSolverType > template< typename DataType >
inline typename BCInterfaceFactory< PhysicalSolverType >::bcFunctionPtr_Type
BCInterfaceFactory< PhysicalSolverType >::createFunctionParser ( const DataType& data )