Commit 03c43f22 authored by Cristiano Malossi's avatar Cristiano Malossi
Browse files

Further splitting dependencies of BCInterface.

parent 74732d87
......@@ -39,9 +39,12 @@
// BCInterface includes
#include <lifev/bc_interface/core/bc/BCInterface.hpp>
#include <lifev/bc_interface/0D/bc/BCInterfaceData0D.hpp>
// Template specializations
#include <lifev/bc_interface/0D/function/BCInterfaceFunctionParser0D.hpp>
#include <lifev/bc_interface/0D/function/BCInterfaceFunctionParserSolver0D.hpp>
#include <lifev/bc_interface/0D/function/BCInterfaceFunctionUserDefined0D.hpp>
namespace LifeV
{
......@@ -179,7 +182,8 @@ private:
//! @name Private Methods
//@{
void addBcToHandler();
template< class BCBaseType >
void addBcToHandler( BCBaseType& base );
//@}
......@@ -199,6 +203,8 @@ BCInterface0D< BcHandler, PhysicalSolverType >::insertBC()
debugStream ( 5020 ) << "BCInterface0D::insertBC\n";
#endif
ZeroDimensionalFunction base;
switch ( M_data.base().second )
{
case BCIFunctionParser:
......@@ -209,8 +215,9 @@ BCInterface0D< BcHandler, PhysicalSolverType >::insertBC()
{
factory_Type factory;
this->M_vectorFunction.push_back ( factory.createFunctionParser ( M_data ) );
this->M_vectorFunction.back()->assignFunction ( base );
addBcToHandler();
addBcToHandler( base );
return;
}
......@@ -227,16 +234,16 @@ BCInterface0D< BcHandler, PhysicalSolverType >::insertBC()
// ===================================================
// Private Methods
// ===================================================
template< class BcHandler, class PhysicalSolverType >
template< class BcHandler, class PhysicalSolverType > template< class BCBaseType >
inline void
BCInterface0D< BcHandler, PhysicalSolverType >::addBcToHandler()
BCInterface0D< BcHandler, PhysicalSolverType >::addBcToHandler( BCBaseType& base )
{
if ( !this->M_handler.get() ) // If BCHandler has not been created yet, we do it now
{
this->createHandler();
}
this->M_handler->setBC ( M_data.flag(), M_data.type(), boost::bind ( &BCInterfaceFunction<BcHandler, PhysicalSolverType>::functionTime, this->M_vectorFunction.back(), _1 ) );
//boost::bind ( &BCInterfaceFunction<BcHandler, PhysicalSolverType>::functionTime, this->M_vectorFunction.back(), _1 )
this->M_handler->setBC ( M_data.flag(), M_data.type(), base );
}
} // 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>
*/
// BCInterface includes
#include <lifev/bc_interface/0D/function/BCInterfaceFunctionParser0D.hpp>
namespace LifeV
{
// ===================================================
// Methods
// ===================================================
template< >
void
BCInterfaceFunctionParser< ZeroDimensionalBCHandler, ZeroDimensionalData >::assignFunction ( bcBase_Type& base )
{
base.setFunction ( functionSelectorTime() );
}
} // 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 BCInterfaceFunctionParser0D_H
#define BCInterfaceFunctionParser0D_H 1
// Multiscale includes
#include <lifev/zero_dimensional/solver/ZeroDimensionalData.hpp>
// BCInterface includes
#include <lifev/bc_interface/core/function/BCInterfaceFunctionParser.hpp>
namespace LifeV
{
// ===================================================
// Methods
// ===================================================
template< >
void
BCInterfaceFunctionParser< ZeroDimensionalBCHandler, ZeroDimensionalData >::assignFunction ( bcBase_Type& base );
} // Namespace LifeV
#endif /* BCInterfaceFunctionParser0D_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 BCInterfaceFunctionUserDefinedSolver 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/0D/function/BCInterfaceFunctionUserDefined0D.hpp>
namespace LifeV
{
// ===================================================
// Methods
// ===================================================
template< >
void
BCInterfaceFunctionUserDefined< ZeroDimensionalBCHandler, ZeroDimensionalData >::assignFunction ( bcBase_Type& base )
{
base.setFunction ( functionSelectorTime() );
}
} // 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 BCInterfaceFunctionUserDefinedSolver class
*
* @date 24-08-2009
* @author Cristiano Malossi <cristiano.malossi@epfl.ch>
*
* @maintainer Cristiano Malossi <cristiano.malossi@epfl.ch>
*/
#ifndef BCInterfaceFunctionUserDefined0D_H
#define BCInterfaceFunctionUserDefined0D_H 1
// Multiscale includes
#include <lifev/zero_dimensional/solver/ZeroDimensionalData.hpp>
// BCInterface includes
#include <lifev/bc_interface/core/function/BCInterfaceFunctionUserDefined.hpp>
namespace LifeV
{
// ===================================================
// Methods
// ===================================================
template< >
void
BCInterfaceFunctionUserDefined< ZeroDimensionalBCHandler, ZeroDimensionalData >::assignFunction ( bcBase_Type& base );
} // Namespace LifeV
#endif /* BCInterfaceFunctionUserDefined0D_H */
SET(function_HEADERS
function/BCInterfaceFunctionParser0D.hpp
function/BCInterfaceFunctionParserSolver0D.hpp
function/BCInterfaceFunctionUserDefined0D.hpp
CACHE INTERNAL "")
SET(function_SOURCES
function/BCInterfaceFunctionParser0D.cpp
function/BCInterfaceFunctionParserSolver0D.cpp
function/BCInterfaceFunctionUserDefined0D.cpp
CACHE INTERNAL "")
......
......@@ -39,10 +39,13 @@
// BCInterface includes
#include <lifev/bc_interface/core/bc/BCInterface.hpp>
#include <lifev/bc_interface/1D/bc/BCInterfaceData1D.hpp>
// Template specializations
#include <lifev/bc_interface/1D/function/BCInterfaceFunctionParser1D.hpp>
#include <lifev/bc_interface/1D/function/BCInterfaceFunctionParserSolver1D.hpp>
#include <lifev/bc_interface/1D/function/BCInterfaceFunctionSolverDefined1D.hpp>
#include <lifev/bc_interface/1D/function/BCInterfaceFunctionUserDefined1D.hpp>
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>
*/
// BCInterface includes
#include <lifev/bc_interface/1D/function/BCInterfaceFunctionParser1D.hpp>
namespace LifeV
{
// ===================================================
// Methods
// ===================================================
template< >
void
BCInterfaceFunctionParser< OneDFSIBCHandler, OneDFSISolver >::assignFunction ( bcBase_Type& base )
{
base.setFunction ( functionSelectorTimeTimeStep() );
}
} // 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 BCInterfaceFunctionParser1D_H
#define BCInterfaceFunctionParser1D_H 1
// OneDFSI includes
#include <lifev/one_d_fsi/solver/OneDFSISolver.hpp>
// BCInterface includes
#include <lifev/bc_interface/core/function/BCInterfaceFunctionParser.hpp>
namespace LifeV
{
// ===================================================
// Methods
// ===================================================
template< >
void
BCInterfaceFunctionParser< OneDFSIBCHandler, OneDFSISolver >::assignFunction ( bcBase_Type& base );
} // Namespace LifeV
#endif /* BCInterfaceFunctionParser1D_H */
......@@ -34,8 +34,8 @@
* @maintainer Cristiano Malossi <cristiano.malossi@epfl.ch>
*/
#ifndef BCInterfaceFunctionParserSolverFSI1D_H
#define BCInterfaceFunctionParserSolverFSI1D_H 1
#ifndef BCInterfaceFunctionParserSolver1D_H
#define BCInterfaceFunctionParserSolver1D_H 1
// OneDFSI includes
#include <lifev/one_d_fsi/solver/OneDFSISolver.hpp>
......@@ -62,4 +62,4 @@ BCInterfaceFunctionParserSolver< OneDFSIBCHandler, OneDFSISolver >::createAccess
} // Namespace LifeV
#endif /* BCInterfaceFunctionParserSolverFSI1D_H */
#endif /* BCInterfaceFunctionParserSolver1D_H */
......@@ -34,8 +34,8 @@
* @maintainer Cristiano Malossi <cristiano.malossi@epfl.ch>
*/
#ifndef BCInterfaceFunctionSolverDefinedFSI1D_H
#define BCInterfaceFunctionSolverDefinedFSI1D_H 1
#ifndef BCInterfaceFunctionSolverDefined1D_H
#define BCInterfaceFunctionSolverDefined1D_H 1
// OneDFSI includes
#include <lifev/one_d_fsi/solver/OneDFSISolver.hpp>
......@@ -191,4 +191,4 @@ private:
} // Namespace LifeV
#endif /* BCInterfaceFunctionSolverDefinedFSI1D_H */
#endif /* BCInterfaceFunctionSolverDefined1D_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 BCInterfaceFunctionUserDefinedSolver 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/1D/function/BCInterfaceFunctionUserDefined1D.hpp>
namespace LifeV
{
// ===================================================
// Methods
// ===================================================
template< >
void
BCInterfaceFunctionUserDefined< OneDFSIBCHandler, OneDFSISolver >::assignFunction ( bcBase_Type& base )
{
base.setFunction ( functionSelectorTimeTimeStep() );
}
} // 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 BCInterfaceFunctionUserDefinedSolver class
*
* @date 24-08-2009
* @author Cristiano Malossi <cristiano.malossi@epfl.ch>
*
* @maintainer Cristiano Malossi <cristiano.malossi@epfl.ch>
*/
#ifndef BCInterfaceFunctionUserDefined1D_H
#define BCInterfaceFunctionUserDefined1D_H 1
// OneDFSI includes
#include <lifev/one_d_fsi/solver/OneDFSISolver.hpp>
// BCInterface includes
#include <lifev/bc_interface/core/function/BCInterfaceFunctionUserDefined.hpp>
namespace LifeV
{
// ===================================================
// Methods
// ===================================================
template< >
void
BCInterfaceFunctionUserDefined< OneDFSIBCHandler, OneDFSISolver >::assignFunction ( bcBase_Type& base );
} // Namespace LifeV
#endif /* BCInterfaceFunctionUserDefined1D_H */
SET(function_HEADERS
function/BCInterfaceFunctionParser1D.hpp
function/BCInterfaceFunctionParserSolver1D.hpp
function/BCInterfaceFunctionSolverDefined1D.hpp
function/BCInterfaceFunctionUserDefined1D.hpp
CACHE INTERNAL "")
SET(function_SOURCES
function/BCInterfaceFunctionParser1D.cpp
function/BCInterfaceFunctionParserSolver1D.cpp
function/BCInterfaceFunctionSolverDefined1D.cpp
function/BCInterfaceFunctionUserDefined1D.cpp
CACHE INTERNAL "")
......
......@@ -37,16 +37,19 @@
#ifndef BCInterface3D_H
#define BCInterface3D_H 1
// Data interpolator include
#include <lifev/core/fem/BCDataInterpolator.hpp>
// BCInterface includes
#include <lifev/bc_interface/core/bc/BCInterface.hpp>