51 #ifndef OneDFSISolver_H 52 #define OneDFSISolver_H 54 #include <lifev/core/array/MatrixElemental.hpp> 55 #include <lifev/core/array/VectorElemental.hpp> 56 #include <lifev/core/fem/AssemblyElemental.hpp> 57 #include <lifev/core/fem/Assembly.hpp> 59 #include <lifev/core/algorithm/SolverAztecOO.hpp> 60 #include <lifev/core/algorithm/SolverAmesos.hpp> 62 #include <lifev/core/fem/FESpace.hpp> 64 #include <lifev/one_d_fsi/fem/OneDFSIBCHandler.hpp> 65 #include <lifev/one_d_fsi/solver/OneDFSIDefinitions.hpp> 227 setupSolution ( solution, M_feSpacePtr->map() );
443 container2D_Type& eigenvalues,
444 container2D_Type& leftEigenvector1,
445 container2D_Type& leftEigenvector2 );
sourcePtr_Type M_sourcePtr
void initialize(solution_Type &solution)
Initialize all the variables of the solution to a reference condition with , , and ...
RegionMesh< LinearLine > mesh_Type
void setLinearSolver(const linearSolverPtr_Type &linearSolverPtr)
Set the linear solver.
const vectorPtrContainer_Type & residual() const
Get the residual container.
void updatedSdU(const solution_Type &solution)
Call _updateSource and update the P0 derivative of source vector from U:
scalarVectorContainer_Type M_dFdUVector
diffFlux = dF(U)/dU (in P0)
matrixPtrContainer_Type M_dSdUMassMatrixPtr
tridiagonal mass matrices multiplied by diffSrcij
SolverAmesos linearSolver_Type
std::shared_ptr< MatrixElemental > M_elementalGradientMatrixPtr
element gradient matrix
linearSolverPtr_Type M_linearViscoelasticSolverPtr
OneDFSIPhysics - Base class providing physical operations for the 1D model data.
void updateRHS(const solution_Type &solution, const Real &timeStep)
Compute the right hand side.
virtual ~OneDFSISolver()
Destructor.
linearSolver_Type::matrix_type matrix_Type
std::shared_ptr< comm_Type > commPtr_Type
std::shared_ptr< solution_Type > solutionPtr_Type
std::array< matrixPtr_Type, 4 > matrixPtrContainer_Type
OneDFSIData - Class which read and holds all the data for the One Dimensional Model Solver...
vector_Type viscoelasticFlowRateCorrection(const vector_Type &newArea, const vector_Type &newElasticFlowRate, const vector_Type &oldViscoelasticFlowRate, const Real &timeStep, OneDFSIBCHandler &bcHandler, const bool &updateSystemMatrix=true)
Apply the viscoelastic flow rate correction.
std::shared_ptr< vector_Type > vectorPtr_Type
MatrixEpetra< Real > matrix_type
const fluxPtr_Type & flux() const
Get the flux class.
Real computeCFL(const solution_Type &solution, const Real &timeStep) const
CFL computation (correct for constant mesh)
std::array< scalarVector_Type, 4 > scalarVectorContainer_Type
solution_Type::const_iterator solutionConstIterator_Type
OneDFSIFlux - Base class for the flux term of the 1D hyperbolic problem.
std::shared_ptr< physics_Type > physicsPtr_Type
scalarVectorContainer_Type M_dSdUVector
diffSrc = dSource(U)/dU (in P0)
void buildConstantMatrices()
Build constant matrices (mass and grad)
linearSolverPtr_Type M_linearSolverPtr
The linear solver.
std::shared_ptr< MatrixElemental > M_elementalMassMatrixPtr
element mass matrix
OneDFSISource - Base class for the source term of the 1D hyperbolic problem.
std::shared_ptr< MatrixElemental > M_elementalStiffnessMatrixPtr
element stiffness matrix
void setCommunicator(const commPtr_Type &commPtr)
Set the communicator.
void setupSolution(solution_Type &solution)
Setup the solution using the default FESpace map.
OneDFSISolver()
Empty Constructor.
void updateInverseJacobian(const UInt &iQuadPt)
void setProblem(const physicsPtr_Type &physicsPtr, const fluxPtr_Type &fluxPtr, const sourcePtr_Type &sourcePtr)
Set problem classes.
void updateMatrices()
Update the matrices.
void computeAreaRatio(solution_Type &solution)
Update the ratio between and .
void computePressure(solution_Type &solution, const Real &timeStep)
Update the pressure.
OneDFSISolver & operator=(const OneDFSISolver &solver)
matrixPtrContainer_Type M_dSdUDivergenceMatrixPtr
tridiagonal divergence matrices multiplied by diffSrcij
UInt boundaryDOF(const bcSide_Type &bcSide) const
Return the ID of the boundary node given a side.
linearSolver_Type::vector_type vector_Type
Epetra_Import const & importer()
Getter for the Epetra_Import.
std::shared_ptr< matrix_Type > matrixPtr_Type
const matrixPtr_Type & massMatrix() const
Get the system matrix without BC.
void boundaryEigenValuesEigenVectors(const bcSide_Type &bcSide, const solution_Type &solution, container2D_Type &eigenvalues, container2D_Type &leftEigenvector1, container2D_Type &leftEigenvector2)
Return the value of the eigenvalues and eigenvectors on a specified boundary.
OneDFSISolver(const OneDFSISolver &solver)
std::array< vectorPtr_Type, 2 > vectorPtrContainer_Type
matrixPtrContainer_Type M_dFdUGradientMatrixPtr
tridiagonal gradient matrices multiplied by diffFluxij
const sourcePtr_Type & source() const
Get the source class.
void matrixAssemble(const UInt &ii, const UInt &jj)
Assemble the matrices.
vectorPtrContainer_Type M_residual
Residual of the linear system.
void setLinearViscoelasticSolver(const linearSolverPtr_Type &linearViscoelasticSolverPtr)
Set the viscoelastic linear solver.
void iterate(OneDFSIBCHandler &bcH, solution_Type &solution, const Real &time, const Real &timeStep)
Update convective term and BC. Then solve the linearized system.
Real boundaryValue(const solution_Type &solution, const bcType_Type &bcType, const bcSide_Type &bcSide) const
Return the value of a quantity ( , , , , ) on a specified boundary.
OneDFSIBCHandler - Class featuring methods to handle boundary conditions.
matrixPtr_Type M_homogeneousMassMatrixPtr
tridiagonal mass matrix
SolverAmesos - Class to wrap linear solver.
void updateSource(const solution_Type &solution)
Update the P1 source vector from U: M_sourcei = S_h(Un) i=1,2 (works only for P1Seg elements) ...
std::shared_ptr< flux_Type > fluxPtr_Type
ublas::vector< Real > scalarVector_Type
vector_Type longitudinalFlowRateCorrection()
Apply the longitudinal Flux correction:
std::shared_ptr< MatrixElemental > M_elementalDivergenceMatrixPtr
element divergence matrix
void applyDirichletBCToMatrix(matrix_Type &matrix)
Update the matrices to take into account Dirichlet BC.
matrixPtrContainer_Type M_dFdUStiffnessMatrixPtr
tridiagonal stiffness matrices multiplied by diffFluxij
double Real
Generic real data.
std::map< std::string, vectorPtr_Type > solution_Type
feSpacePtr_Type M_feSpacePtr
std::array< Real, 2 > container2D_Type
std::shared_ptr< source_Type > sourcePtr_Type
std::shared_ptr< linearSolver_Type > linearSolverPtr_Type
OneDFSISolver - Solver class for the 1D model.
vectorPtrContainer_Type M_fluxVector
Flux F(U) (in P1)
void resetOutput(const solution_Type &solution)
Reset the output files.
const physicsPtr_Type & physics() const
Get the physics class.
void setFESpace(const feSpacePtr_Type &feSpacePtr)
Set the FEspace.
vectorPtrContainer_Type M_rhs
Right hand sides of the linear system i: "mass * M_Ui = M_rhsi".
void updatedFdU(const solution_Type &solution)
Call _updateFlux and update the P0 derivative of flux vector from U:
OneDFSIPhysics physics_Type
void computeArea(solution_Type &solution)
Compute A from the area ratio: .
FESpace< mesh_Type, MapEpetra > feSpace_Type
void setupSolution(solution_Type &solution, const MapEpetra &map, const bool &onlyMainQuantities=false)
Setup the solution using user defined FESpace map.
void updateFlux(const solution_Type &solution)
Update the P1 flux vector from U: M_fluxi = F_h(Un) i=1,2 (works only for P1Seg elements) ...
std::shared_ptr< feSpace_Type > feSpacePtr_Type
void postProcess(const solution_Type &solution, const Real &time)
Save results on output files.
matrixPtr_Type M_homogeneousGradientMatrixPtr
tridiagonal gradient matrix
physicsPtr_Type M_physicsPtr
L2 Projection of the second derivative of Q over P1 space.
void computeW1W2(solution_Type &solution)
Update the Riemann variables.
OneDFSISource source_Type
vectorPtrContainer_Type M_sourceVector
Source term S (in P1)
Displayer - This class is used to display messages in parallel simulations.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
void updateElementalMatrices(const Real &dFdU, const Real &dSdU)
Update the element matrices with the current element.
vector_Type inertialFlowRateCorrection(const vector_Type &)
Apply the inertial Flux correction: