Commit 00391fce authored by Cristiano Malossi's avatar Cristiano Malossi
Browse files

Moving the template specializations in separated files.

parent 3d6e0598
......@@ -40,6 +40,9 @@
// BCInterface includes
#include <lifev/bc_interface/fem/BCInterface.hpp>
// Template specializations
#include <lifev/bc_interface/function/BCInterfaceFunctionSolverDefinedFSI1D.hpp>
namespace LifeV
{
......
......@@ -43,6 +43,9 @@
// BCInterface includes
#include <lifev/bc_interface/fem/BCInterface.hpp>
// Template specializations
#include <lifev/bc_interface/function/BCInterfaceFunctionSolverDefinedFSI3D.hpp>
namespace LifeV
{
......
......@@ -37,7 +37,7 @@
#ifndef BCInterfaceData0D_H
#define BCInterfaceData0D_H 1
// 1D BCHandler include
// 0D BCHandler include
#include <lifev/zero_dimensional/fem/ZeroDimensionalBCHandler.hpp>
// BCInterface includes
......
......@@ -78,7 +78,9 @@ enum baseList_Type
enum baseContainer_Type
{
BASEDefault,
#ifdef LIFEV_HAS_ONEDFSI
BASEFunction1D,
#endif
BASEFunction3D,
BASEVector3D,
BASEVectorInterface3D
......
......@@ -41,10 +41,16 @@
#include <lifev/bc_interface/function/BCInterfaceFunctionParser.hpp>
#include <lifev/bc_interface/function/BCInterfaceFunctionParserFile.hpp>
#include <lifev/bc_interface/function/BCInterfaceFunctionParserSolver.hpp>
//#include <lifev/bc_interface/function/BCInterfaceFunctionParserSolver.hpp>
#include <lifev/bc_interface/function/BCInterfaceFunctionParserSolver0D.hpp>
#include <lifev/bc_interface/function/BCInterfaceFunctionParserSolverFSI1D.hpp>
#include <lifev/bc_interface/function/BCInterfaceFunctionParserSolverFSI3D.hpp>
#include <lifev/bc_interface/function/BCInterfaceFunctionParserSolverFluid3D.hpp>
#include <lifev/bc_interface/function/BCInterfaceFunctionParserFileSolver.hpp>
#include <lifev/bc_interface/function/BCInterfaceFunctionUserDefined.hpp>
#include <lifev/bc_interface/function/BCInterfaceFunctionSolverDefined.hpp>
//#include <lifev/bc_interface/function/BCInterfaceFunctionSolverDefinedFSI1D.hpp>
//#include <lifev/bc_interface/function/BCInterfaceFunctionSolverDefinedFSI3D.hpp>
namespace LifeV
{
......
......@@ -60,7 +60,7 @@ public:
//! @name Type definitions
//@{
typedef PhysicalSolverType physicalSolver_Type;
typedef PhysicalSolverType physicalSolver_Type;
typedef boost::function<Real ( const Real& ) > boundaryFunctionTime_Type;
typedef boost::function<Real ( const Real&, const Real& ) > boundaryFunctionTimeTimeStep_Type;
......
//@HEADER
/*
*******************************************************************************
Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
This file is part of LifeV.
LifeV is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
LifeV is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with LifeV. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************
*/
//@HEADER
/*!
* @file
* @brief File containing the BCInterfaceFunctionParserSolver class
*
* @date 24-08-2009
* @author Cristiano Malossi <cristiano.malossi@epfl.ch>
*
* @maintainer Cristiano Malossi <cristiano.malossi@epfl.ch>
*/
// BCInterface includes
#include <lifev/bc_interface/function/BCInterfaceFunctionParserSolver0D.hpp>
namespace LifeV
{
// ===================================================
// Methods
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< ZeroDimensionalData >::updatePhysicalSolverVariables()
{
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<ZeroDimensionalData>::updatePhysicalSolverVariables" << "\n";
#endif
// Create/Update variables
for ( std::set< physicalSolverList >::iterator j = M_list.begin(); j != M_list.end(); ++j )
switch ( *j )
{
// f_ -> FLUID
case f_timeStep:
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << " f_timeStep(): " << M_physicalSolver->dataTime()->timeStep() << "\n";
#endif
setVariable ( "f_timeStep", M_physicalSolver->dataTime()->timeStep() );
break;
case f_venousPressure:
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << " f_venousPressure(): " << M_physicalSolver->venousPressure() << "\n";
#endif
setVariable ( "f_venousPressure", M_physicalSolver->venousPressure() );
break;
default:
switchErrorMessage ( "MultiscaleGlobalData" );
break;
}
}
// ===================================================
// Protected Methods
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< ZeroDimensionalData >::createAccessList ( const BCInterfaceData& data )
{
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<ZeroDimensionalData>::createAccessList( data )" << "\n";
#endif
std::map< std::string, physicalSolverList > mapList;
createFluidMap ( mapList );
createList ( mapList, data );
if ( M_physicalSolver.get() )
{
updatePhysicalSolverVariables();
}
}
} // Namespace LifeV
//@HEADER
/*
*******************************************************************************
Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
This file is part of LifeV.
LifeV is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
LifeV is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with LifeV. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************
*/
//@HEADER
/*!
* @file
* @brief File containing the BCInterfaceFunctionParserSolver class
*
* @date 24-08-2009
* @author Cristiano Malossi <cristiano.malossi@epfl.ch>
*
* @maintainer Cristiano Malossi <cristiano.malossi@epfl.ch>
*/
#ifndef BCInterfaceFunctionParserSolver0D_H
#define BCInterfaceFunctionParserSolver0D_H 1
// Multiscale includes
#include <lifev/zero_dimensional/solver/ZeroDimensionalData.hpp>
// BCInterface includes
#include <lifev/bc_interface/function/BCInterfaceFunctionParserSolver.hpp>
namespace LifeV
{
// ===================================================
// Methods
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< ZeroDimensionalData >::updatePhysicalSolverVariables();
// ===================================================
// Protected Methods
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< ZeroDimensionalData >::createAccessList ( const BCInterfaceData& data );
} // Namespace LifeV
#endif /* BCInterfaceFunctionParserSolver0D_H */
//@HEADER
/*
*******************************************************************************
Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
This file is part of LifeV.
LifeV is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
LifeV is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with LifeV. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************
*/
//@HEADER
/*!
* @file
* @brief File containing the BCInterfaceFunctionParserSolver class
*
* @date 24-08-2009
* @author Cristiano Malossi <cristiano.malossi@epfl.ch>
*
* @maintainer Cristiano Malossi <cristiano.malossi@epfl.ch>
*/
// BCInterface includes
#include <lifev/bc_interface/function/BCInterfaceFunctionParserSolverFSI1D.hpp>
namespace LifeV
{
// ===================================================
// Methods
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< OneDFSISolver >::updatePhysicalSolverVariables()
{
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<FSI>::updatePhysicalSolverVariables" << "\n";
#endif
// Create/Update variables
for ( std::set< physicalSolverList >::iterator j = M_list.begin(); j != M_list.end(); ++j )
switch ( *j )
{
// f_ -> FLUID
case f_timeStep:
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << " f_timeStep(): " << M_physicalSolver->physics()->data()->dataTime()->timeStep() << "\n";
#endif
setVariable ( "f_timeStep", M_physicalSolver->physics()->data()->dataTime()->timeStep() );
break;
case f_area:
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << " f_area(" << static_cast<Real> (M_side) << "): " << M_physicalSolver->boundaryValue ( *M_solution, OneDFSI::A, M_side ) << "\n";
#endif
setVariable ( "f_area", M_physicalSolver->boundaryValue ( *M_solution, OneDFSI::A, M_side ) );
break;
case f_density:
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << " f_density: " << M_physicalSolver->physics()->data()->densityRho() << "\n";
#endif
setVariable ( "f_density", M_physicalSolver->physics()->data()->densityRho() );
break;
case f_flux:
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << " f_flux(" << static_cast<Real> (M_side) << "): " << M_physicalSolver->boundaryValue ( *M_solution, OneDFSI::Q, M_side ) << "\n";
#endif
setVariable ( "f_flux", M_physicalSolver->boundaryValue ( *M_solution, OneDFSI::Q, M_side ) );
break;
case f_pressure:
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << " f_pressure(" << static_cast<Real> (M_side) << "): " << M_physicalSolver->boundaryValue ( *M_solution, OneDFSI::P, M_side ) << "\n";
#endif
setVariable ( "f_pressure", M_physicalSolver->boundaryValue ( *M_solution, OneDFSI::P, M_side ) );
break;
case f_viscosity:
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << " f_viscosity: " << M_physicalSolver->physics()->data()->viscosity() << "\n";
#endif
setVariable ( "f_viscosity", M_physicalSolver->physics()->data()->viscosity() );
break;
case f_venousPressure:
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << " f_venousPressure: " << M_physicalSolver->physics()->data()->venousPressure() << "\n";
#endif
setVariable ( "f_venousPressure", M_physicalSolver->physics()->data()->venousPressure() );
break;
// s_ -> SOLID
case s_density:
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << " s_density: " << M_physicalSolver->physics()->data()->densityWall() << "\n";
#endif
setVariable ( "s_density", M_physicalSolver->physics()->data()->densityWall() );
break;
case s_poisson:
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << " s_poisson: " << M_physicalSolver->physics()->data()->poisson() << "\n";
#endif
setVariable ( "s_poisson", M_physicalSolver->physics()->data()->poisson() );
break;
case s_thickness:
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << " s_thickness: " << M_physicalSolver->physics()->data()->thickness ( M_physicalSolver->boundaryDOF ( M_side ) ) << "\n";
#endif
setVariable ( "s_thickness", M_physicalSolver->physics()->data()->thickness ( M_physicalSolver->boundaryDOF ( M_side ) ) );
break;
case s_young:
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << " s_young: " << M_physicalSolver->physics()->data()->young() << "\n";
#endif
setVariable ( "s_young", M_physicalSolver->physics()->data()->young() );
break;
case s_externalPressure:
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << " s_externalPressure: " << M_physicalSolver->physics()->data()->externalPressure() << "\n";
#endif
setVariable ( "s_externalPressure", M_physicalSolver->physics()->data()->externalPressure() );
break;
default:
switchErrorMessage ( "OneDFSIModel_Solver" );
break;
}
}
// ===================================================
// Protected Methods
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< OneDFSISolver >::createAccessList ( const BCInterfaceData& data )
{
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<OneDimensionaSolver>::createAccessList( data )" << "\n";
#endif
std::map< std::string, physicalSolverList > mapList;
createFluidMap ( mapList );
createSolidMap ( mapList );
createList ( mapList, data );
if ( M_physicalSolver.get() )
{
updatePhysicalSolverVariables();
}
}
} // Namespace LifeV
//@HEADER
/*
*******************************************************************************
Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
This file is part of LifeV.
LifeV is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
LifeV is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with LifeV. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************
*/
//@HEADER
/*!
* @file
* @brief File containing the BCInterfaceFunctionParserSolver class
*
* @date 24-08-2009
* @author Cristiano Malossi <cristiano.malossi@epfl.ch>
*
* @maintainer Cristiano Malossi <cristiano.malossi@epfl.ch>
*/
#ifndef BCInterfaceFunctionParserSolverFSI1D_H
#define BCInterfaceFunctionParserSolverFSI1D_H 1
// OneDFSI includes
#include <lifev/one_d_fsi/solver/OneDFSISolver.hpp>
// BCInterface includes
#include <lifev/bc_interface/function/BCInterfaceFunctionParserSolver.hpp>
namespace LifeV
{
// ===================================================
// Methods
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< OneDFSISolver >::updatePhysicalSolverVariables();
// ===================================================
// Protected Methods
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< OneDFSISolver >::createAccessList ( const BCInterfaceData& data );
} // Namespace LifeV
#endif /* BCInterfaceFunctionParserSolverFSI1D_H */
//@HEADER
/*
*******************************************************************************
Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
This file is part of LifeV.
LifeV is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
LifeV is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with LifeV. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************
*/
//@HEADER
/*!
* @file
* @brief File containing the BCInterfaceFunctionParserSolver class
*
* @date 24-08-2009
* @author Cristiano Malossi <cristiano.malossi@epfl.ch>
*
* @maintainer Cristiano Malossi <cristiano.malossi@epfl.ch>
*/
// BCInterface includes
#include <lifev/bc_interface/function/BCInterfaceFunctionParserSolverFSI3D.hpp>
namespace LifeV
{
// ===================================================
// Methods
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< FSIOperator >::updatePhysicalSolverVariables()
{
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<FSIOperator>::updatePhysicalSolverVariables" << "\n";
#endif
// Create/Update variables
for ( std::set< physicalSolverList >::iterator j = M_list.begin(); j != M_list.end(); ++j )
switch ( *j )
{
// f_ -> FLUID
case f_timeStep:
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << " f_timeStep(): " << M_physicalSolver->data().dataFluid()->dataTime()->timeStep() << "\n";
#endif
setVariable ( "f_timeStep", M_physicalSolver->data().dataFluid()->dataTime()->timeStep() );