35 #ifndef INITPOLICYINTERPOLATION_HPP 36 #define INITPOLICYINTERPOLATION_HPP 40 #include <boost/shared_ptr.hpp> 44 #include <Epetra_MpiComm.h> 46 #include <Epetra_SerialComm.h> 49 #include <Teuchos_ParameterList.hpp> 50 #include <Teuchos_XMLParameterListHelpers.hpp> 51 #include <Teuchos_RCP.hpp> 54 #include <lifev/core/LifeV.hpp> 55 #include <lifev/core/util/LifeChrono.hpp> 56 #include <lifev/core/array/VectorEpetra.hpp> 57 #include <lifev/core/mesh/RegionMesh.hpp> 58 #include <lifev/core/fem/FESpace.hpp> 59 #include <lifev/core/fem/TimeAdvanceBDF.hpp> 60 #include <lifev/core/fem/BCHandler.hpp> 61 #include <lifev/navier_stokes/solver/NavierStokesSolver/NavierStokesProblem.hpp> 66 template<
class mesh_Type >
81 void setupInit ( Teuchos::ParameterList& list );
94 template<
class mesh_Type >
102 template<
class mesh_Type >
108 ASSERT ( problem()->hasExactSolution(),
"Error: You cannot use the interpolation method if the problem has not an analytical solution." );
114 velocity.reset (
new vector_Type ( uFESpace()->map(), Unique ) );
117 pressure.reset (
new vector_Type ( pFESpace()->map(), Unique ) );
120 uFESpace()->interpolate ( problem()->uexact(), *velocity, currentTime );
121 pFESpace()->interpolate ( problem()->pexact(), *pressure, currentTime );
122 solution->add ( *velocity );
123 solution->add ( *pressure, pressureOffset );
124 bdf()->setInitialCondition ( *solution );
133 uFESpace()->interpolate ( problem()->uexact(), *velocity, currentTime );
134 pFESpace()->interpolate ( problem()->pexact(), *pressure, currentTime );
135 solution->add ( *velocity );
136 solution->add ( *pressure, pressureOffset );
139 bdf()->shiftRight ( *solution );
void initSimulation(bcContainerPtr_Type bchandler, vectorPtr_Type solution)
VectorEpetra - The Epetra Vector format Wrapper.
virtual fespacePtr_Type uFESpace() const =0
std::shared_ptr< fespace_Type > fespacePtr_Type
std::shared_ptr< map_Type > mapPtr_Type
std::shared_ptr< VectorEpetra > vectorPtr_Type
BCHandler - class for handling boundary conditions.
std::shared_ptr< NavierStokesProblem< mesh_Type > > NSProblemPtr_Type
std::shared_ptr< bdf_Type > bdfPtr_Type
virtual Real initialTime() const =0
virtual fespacePtr_Type pFESpace() const =0
virtual Real timestep() const =0
void updateInverseJacobian(const UInt &iQuadPt)
FESpace< mesh_Type, map_Type > fespace_Type
virtual NSProblemPtr_Type problem() const =0
Epetra_Import const & importer()
Getter for the Epetra_Import.
BCHandler bcContainer_Type
double Real
Generic real data.
TimeAdvanceBDF< vector_Type > bdf_Type
void setupInit(Teuchos::ParameterList &list)
virtual bdfPtr_Type bdf() const =0
std::shared_ptr< bcContainer_Type > bcContainerPtr_Type
uint32_type UInt
generic unsigned integer (used mainly for addressing)