Commit e6d2241b authored by Antonio Cervone's avatar Antonio Cervone
Browse files

Merge remote-tracking branch 'epfl/master' into 201204_CMakeIncludeDirFix

Conflicts:
    lifev/bc_interface/CMakeLists.txt
    lifev/multiscale/CMakeLists.txt
parents a214e943 73a3f562
......@@ -12,13 +12,13 @@ git remote add github git@github.com:lifev/lifev.git
1- update Version.cmake
2- update NEWS
2- update NEWS.md
3- commit Version.cmake and NEWS
3- commit Version.cmake and NEWS.md
X_Y_Z=3.4.2
git commit -m"Releasing ${X_Y_Z}" Version.cmake NEWS.md
git commit -m"Releasing ${X_Y_Z}" Version.cmake NEWS.md
4- tag master with the tag LifeV-X.Y.Z
......
#cmakedefine LIFEV_HAS_CORE
#cmakedefine LIFEV_HAS_BCINTERFACE
#cmakedefine LIFEV_HAS_ONEDFSI
#cmakedefine LIFEV_HAS_ZERODIMENSIONAL
#cmakedefine LIFEV_HAS_LEVELSET
#cmakedefine LIFEV_HAS_DARCY
#cmakedefine LIFEV_HAS_NAVIERSTOKES
#cmakedefine LIFEV_HAS_STRUCTURE
#cmakedefine LIFEV_HAS_HEART
#cmakedefine LIFEV_HAS_FSI
#cmakedefine LIFEV_HAS_ONEDFSI
#cmakedefine LIFEV_HAS_ZERODIMENSIONAL
#cmakedefine LIFEV_HAS_DUMMY
#cmakedefine LIFEV_HAS_MULTISCALE
#cmakedefine LIFEV_HAS_DUMMY
#cmakedefine H5_USE_16_API
LifeV 3.6.2:
============
Merged the following branches:
* 201211_ETA_OtherDimensions https://cmcsforge.epfl.ch/issues/75
* 201303_MultiscaleDependenciesFix https://cmcsforge.epfl.ch/issues/79
* 20121114_HDF5IO https://cmcsforge.epfl.ch/issues/16
* 201209_CurrentBoundaryFE https://cmcsforge.epfl.ch/issues/15
* 20130213_InstallScriptsUpdate https://cmcsforge.epfl.ch/issues/41
LifeV 3.6.1:
============
......
......@@ -74,15 +74,15 @@ INCLUDE(TribitsListHelpers)
SET( LifeV_PACKAGES_AND_DIRS_AND_CLASSIFICATIONS
Core lifev/core PS
BCInterface lifev/bc_interface PS
OneDFSI lifev/one_d_fsi PS
ZeroDimensional lifev/zero_dimensional PS
LevelSet lifev/level_set PS
Darcy lifev/darcy PS
NavierStokes lifev/navier_stokes PS
Structure lifev/structure PS
Heart lifev/heart PS
FSI lifev/fsi PS
BCInterface lifev/bc_interface PS
OneDFSI lifev/one_d_fsi PS
ZeroDimensional lifev/zero_dimensional PS
Multiscale lifev/multiscale PS
Dummy lifev/dummy EX
ETA lifev/eta EX
......
......@@ -82,6 +82,7 @@ SET( LifeV_TPLS_FINDMODS_CLASSIFICATIONS
LAPACK "cmake/TPLs/" PS
Boost "cmake/TPLs/" PS
ParMETIS "cmake/TPLs/" PS
HDF5 "cmake/TPLs/" PS
QHull "cmake/TPLs/" SS
Trilinos "cmake/TPLs/" PS
)
......
......@@ -28,12 +28,12 @@
# for release mode and set the version.
#
SET(LifeV_VERSION 3.6.1)
SET(LifeV_VERSION 3.6.2)
SET(LifeV_MAJOR_VERSION 3)
SET(LifeV_MINOR_VERSION 6)
SET(LifeV_MICRO_VERSION 1)
SET(LifeV_MAJOR_MINOR_VERSION 030601)
SET(LifeV_VERSION_STRING "3.6.1")
SET(LifeV_MICRO_VERSION 2)
SET(LifeV_MAJOR_MINOR_VERSION 030602)
SET(LifeV_VERSION_STRING "3.6.2")
SET(LifeV_ENABLE_DEVELOPMENT_MODE_DEFAULT ON) # Change to 'OFF' for a release
# Used by testing scripts and should not be used elsewhere
......
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
SET(HEADERS "")
SET(SOURCES "")
ADD_SUBDIRECTORY(bc)
SET(HEADERS ${HEADERS} ${bc_HEADERS})
SET(SOURCES ${SOURCES} ${bc_SOURCES})
ADD_SUBDIRECTORY(function)
SET(HEADERS ${HEADERS} ${function_HEADERS})
SET(SOURCES ${SOURCES} ${function_SOURCES})
TRIBITS_EXCLUDE_AUTOTOOLS_FILES()
# This is the list of files excluded from the tarball
TRIBITS_EXCLUDE_FILES()
# Add library target
TRIBITS_ADD_LIBRARY(
lifevbcinterface0D
HEADERS ${HEADERS}
SOURCES ${SOURCES}
DEPLIBS lifevbcinterfacecore
)
......@@ -38,7 +38,13 @@
#define BCInterface0D_H 1
// BCInterface includes
#include <lifev/bc_interface/fem/BCInterface.hpp>
#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
{
......@@ -111,6 +117,7 @@ public:
typedef typename bcInterface_Type::vectorFunctionSolverDefined_Type vectorFunctionSolverDefined_Type;
typedef BCInterfaceData0D data_Type;
typedef boost::shared_ptr< data_Type > dataPtr_Type;
//@}
......@@ -119,7 +126,7 @@ public:
//@{
//! Constructor
explicit BCInterface0D() : bcInterface_Type(), M_data() {}
explicit BCInterface0D() : bcInterface_Type(), M_data ( new data_Type() ) {}
//! Destructor
virtual ~BCInterface0D() {}
......@@ -138,7 +145,7 @@ public:
*/
void readBC ( const std::string& fileName, const std::string& dataSection, const std::string& name )
{
M_data.readBC ( fileName, dataSection, name );
M_data->readBC ( fileName, dataSection, name );
}
//! Insert the current boundary condition in the BChandler
......@@ -156,7 +163,7 @@ public:
*/
data_Type& dataContainer()
{
return M_data;
return *M_data;
}
//@}
......@@ -176,12 +183,13 @@ private:
//! @name Private Methods
//@{
void addBcToHandler();
template< class BCBaseType >
void addBcToHandler ( BCBaseType& base );
//@}
// Data
data_Type M_data;
dataPtr_Type M_data;
};
// ===================================================
......@@ -196,7 +204,9 @@ BCInterface0D< BcHandler, PhysicalSolverType >::insertBC()
debugStream ( 5020 ) << "BCInterface0D::insertBC\n";
#endif
switch ( M_data.base().second )
ZeroDimensionalFunction base;
switch ( M_data->base().second )
{
case BCIFunctionParser:
case BCIFunctionParserFile:
......@@ -206,15 +216,16 @@ 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;
}
default:
std::cout << " !!! Error: " << M_data.base().first << " is not valid in BCInterface0D !!!" << std::endl;
std::cout << " !!! Error: " << M_data->base().first << " is not valid in BCInterface0D !!!" << std::endl;
break;
}
}
......@@ -224,16 +235,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<PhysicalSolverType>::functionTime, this->M_vectorFunction.back(), _1 ) );
this->M_handler->setBC ( M_data->flag(), M_data->type(), base );
}
} // Namespace LifeV
......
......@@ -34,7 +34,7 @@
* @maintainer Cristiano Malossi <cristiano.malossi@epfl.ch>
*/
#include <lifev/bc_interface/fem/BCInterfaceData0D.hpp>
#include <lifev/bc_interface/0D/bc/BCInterfaceData0D.hpp>
namespace LifeV
{
......@@ -44,7 +44,6 @@ namespace LifeV
// ===================================================
BCInterfaceData0D::BCInterfaceData0D() :
BCInterfaceData (),
M_flag (),
M_type (),
M_mapType ()
{
......@@ -55,7 +54,6 @@ BCInterfaceData0D::BCInterfaceData0D() :
BCInterfaceData0D::BCInterfaceData0D ( const BCInterfaceData0D& data ) :
BCInterfaceData ( data ),
M_flag ( data.M_flag ),
M_type ( data.M_type ),
M_mapType ( data.M_mapType )
{
......@@ -70,7 +68,6 @@ BCInterfaceData0D::operator= ( const BCInterfaceData0D& data )
if ( this != &data )
{
BCInterfaceData::operator= ( data );
M_flag = data.M_flag;
M_type = data.M_type;
M_mapType = data.M_mapType;
}
......@@ -101,7 +98,6 @@ BCInterfaceData0D::showMe ( std::ostream& output ) const
dataContainer_Type::showMe ( output );
// Show 0D data
output << "Flag = " << static_cast< Real > ( M_flag ) << std::endl;
output << "Type = " << M_type << std::endl;
}
......
......@@ -37,11 +37,11 @@
#ifndef BCInterfaceData0D_H
#define BCInterfaceData0D_H 1
// 1D BCHandler include
// 0D BCHandler include
#include <lifev/zero_dimensional/fem/ZeroDimensionalBCHandler.hpp>
// BCInterface includes
#include <lifev/bc_interface/fem/BCInterfaceData.hpp>
#include <lifev/bc_interface/core/bc/BCInterfaceData.hpp>
namespace LifeV
{
......@@ -126,7 +126,7 @@ public:
*/
void setFlag ( const bcFlag_Type& flag )
{
M_flag = flag;
M_boundaryID = flag;
}
//! Set the type of the boundary condition
......@@ -150,7 +150,7 @@ public:
*/
const bcFlag_Type& flag() const
{
return M_flag;
return M_boundaryID;
}
//! Get the type of the boundary condition
......@@ -171,7 +171,7 @@ private:
void readFlag ( const GetPot& dataFile, const char* flag )
{
M_flag = dataFile ( flag, 0 );
M_boundaryID = dataFile ( flag, 0 );
}
void readType ( const GetPot& dataFile, const char* type )
......@@ -186,7 +186,6 @@ private:
//@{
bcFlag_Type M_flag;
bcType_Type M_type;
......
SET(fem_HEADERS
fem/BCInterfaceData0D.hpp
fem/BCInterface3D.hpp
fem/BCInterface.hpp
fem/BCInterfaceData.hpp
fem/BCInterface0D.hpp
fem/BCInterfaceDefinitions.hpp
fem/BCInterfaceData1D.hpp
fem/BCInterfaceData3D.hpp
fem/BCInterface1D.hpp
SET(bc_HEADERS
bc/BCInterface0D.hpp
bc/BCInterfaceData0D.hpp
CACHE INTERNAL "")
SET(fem_SOURCES
fem/BCInterfaceData3D.cpp
fem/BCInterfaceData.cpp
fem/BCInterfaceData1D.cpp
fem/BCInterfaceData0D.cpp
SET(bc_SOURCES
bc/BCInterfaceData0D.cpp
CACHE INTERNAL "")
SET(LOCAL_HEADERS)
FOREACH(INC ${fem_HEADERS})
STRING(REPLACE "fem/" "" LOCAL_INC ${INC})
FOREACH(INC ${bc_HEADERS})
STRING(REPLACE "bc/" "" LOCAL_INC ${INC})
SET(LOCAL_HEADERS ${LOCAL_HEADERS} ${LOCAL_INC})
ENDFOREACH()
INSTALL(
FILES ${LOCAL_HEADERS}
DESTINATION "${${PROJECT_NAME}_INSTALL_INCLUDE_DIR}/lifev/bc_interface/fem"
DESTINATION "${${PROJECT_NAME}_INSTALL_INCLUDE_DIR}/lifev/bc_interface/0D/bc"
COMPONENT ${PACKAGE_NAME}
)
//@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() );
}
// ===================================================
// Set Methods
// ===================================================
template< >
void
BCInterfaceFunctionParser< ZeroDimensionalBCHandler, ZeroDimensionalData >::setData ( const boost::shared_ptr< BCInterfaceData >& data )
{
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5022 ) << "BCInterfaceFunction::setData" << "\n";
#endif
setupParser ( data );
}
} // 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/0D/bc/BCInterfaceData0D.hpp>
#include <lifev/bc_interface/core/function/BCInterfaceFunctionParser.hpp>
namespace LifeV
{
// ===================================================
// Methods
// ===================================================
template< >
void
BCInterfaceFunctionParser< ZeroDimensionalBCHandler, ZeroDimensionalData >::assignFunction ( bcBase_Type& base );
// ===================================================
// Set Methods
// ===================================================
template< >
void
BCInterfaceFunctionParser< ZeroDimensionalBCHandler, ZeroDimensionalData >::setData ( const boost::shared_ptr< BCInterfaceData >& data );
} // 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 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/BCInterfaceFunctionParserSolver0D.hpp>
namespace LifeV
{
// ===================================================
// Methods
// ===================================================
template< >
void
BCInterfaceFunctionParserSolver< ZeroDimensionalBCHandler, ZeroDimensionalData >::updatePhysicalSolverVariables()
{
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<ZeroDimensionalBCHandler, 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< ZeroDimensionalBCHandler, ZeroDimensionalData >::createAccessList ( const boost::shared_ptr< BCInterfaceData >& data )
{
#ifdef HAVE_LIFEV_DEBUG
debugStream ( 5023 ) << "BCInterfaceFunctionSolver<ZeroDimensionalBCHandler, ZeroDimensionalData>::createAccessList( data )" << "\n";
#endif
std::map< std::string, physicalSolverList > mapList;
createFluidMap ( mapList );
createList ( mapList, data );
if ( M_physicalSolver.get() )
{
updatePhysicalSolverVariables();
}
}