LifeV
HeartMonodomainSolver< Mesh, SolverType > Class Template Reference

monodomainSolver - Class featuring the usual solver for monodomain equations More...

#include <HeartMonodomainSolver.hpp>

+ Collaboration diagram for HeartMonodomainSolver< Mesh, SolverType >:

Protected Member Functions

void solveSystem (matrixPtr_Type matrFull, vector_Type &rhsFull)
 Solves PDE system. More...
 
void applyBoundaryConditions (matrix_Type &matrix, vector_Type &rhs, bcHandlerRaw_Type &BCh)
 Apply BC. More...
 

Protected Attributes

const data_typeM_data
 Data. More...
 
FESpace< Mesh, MapEpetra > & M_uFESpace
 u FE space More...
 
const std::shared_ptr< Epetra_Comm > M_comm
 MPI communicator. More...
 
Int M_me
 
BCHandlerM_BChandlerElectric
 Monodomain BC. More...
 
bool M_setBC
 
MapEpetra M_localMap
 Map. More...
 
MapEpetra M_localMapVector
 
matrixPtr_Type M_massMatrix
 mass matrix More...
 
matrixPtr_Type M_stiffnessMatrix
 Stiff matrix: D*stiff. More...
 
matrixPtr_Type M_matrNoBC
 
vector_Type M_rhsNoBC
 Right hand side for the PDE. More...
 
vector_Type M_solutionTransmembranePotential
 Global solution _u. More...
 
vector_Type M_fiberVector
 Local fibers vector. More...
 
vector_Type M_residual
 residual More...
 
SolverType M_linearSolver
 Solver. More...
 
preconditioner_Type M_preconditioner
 
Real M_diagonalize
 
bool M_verbose
 Boolean that indicates if output is sent to cout. More...
 
bool M_updated
 Boolean that indicates if the matrix is updated for the current iteration. More...
 
bool M_reusePreconditioner
 Boolean that indicates if the precond has to be recomputed. More...
 
bool M_resetPreconditioner
 
Int M_maxIteration
 Integer storing the max number of solver iteration with prec recomputing. More...
 
bool M_recomputeMatrix
 Boolean that indicates if the matrix has to be recomputed. More...
 

Private Member Functions

UInt dim_u () const
 

Private Attributes

MatrixElemental M_stiffnessElementaryMatrix
 Elementary matrices. More...
 
MatrixElemental M_massElementaryMatrix
 
Real massCoefficient
 

Type definitions

typedef HeartMonodomainData data_type
 
typedef Real(* Function) (const Real &t, const Real &x, const Real &y, const Real &z, const ID &id)
 
typedef std::function< Real(Real const &, Real const &, Real const &, Real const &, ID const &) > source_Type
 
typedef Mesh mesh_Type
 
typedef BCHandler bcHandlerRaw_Type
 
typedef std::shared_ptr< bcHandlerRaw_TypebcHandler_Type
 
typedef SolverType::matrix_type matrix_Type
 
typedef std::shared_ptr< matrix_TypematrixPtr_Type
 
typedef SolverType::vector_type vector_Type
 
typedef SolverType::prec_raw_type preconditionerRaw_Type
 
typedef SolverType::prec_type preconditioner_Type
 

Constructors & Destructor

 HeartMonodomainSolver (const data_type &dataType, FESpace< Mesh, MapEpetra > &uFESpace, BCHandler &bcHandler, std::shared_ptr< Epetra_Comm > &comm)
 Constructor. More...
 
virtual ~HeartMonodomainSolver ()
 Destructor. More...
 

Methods

virtual void PDEiterate (bcHandlerRaw_Type &bch)
 Updates sources, bc treatment and solve the monodomain system. More...
 
virtual void setup (const GetPot &dataFile)
 Sets up the system solver. More...
 
virtual void buildSystem ()
 Builds time independent parts of PDE system. More...
 
virtual void updatePDESystem (Real alpha, vector_Type &sourceVec)
 Updates time dependent parts of PDE system. More...
 
virtual void updatePDESystem (vector_Type &sourceVec)
 Updates time dependent parts of PDE system. More...
 
void initialize (const source_Type &)
 Initialize. More...
 
void initialize (const Function &)
 
void initialize (const vector_Type &)
 
const vector_TypesolutionTransmembranePotential () const
 Returns the local solution vector. More...
 
const vector_TypefiberVector () const
 
const vector_Typeresidual () const
 Returns the local residual vector. More...
 
FESpace< Mesh, MapEpetra > & potentialFESpace ()
 Returns u FE space. More...
 
void setBC (BCHandler &BCh_u)
 Setting of the boundary conditions. More...
 
void postProcessing (bool _writeMesh=false)
 Postprocessing. More...
 
void resetPreconditioner ()
 
Epetra_Map const & getRepeatedMapEpetra () const
 Return maps. More...
 
Epetra_Map const & getRepeatedMapEpetraVec () const
 
MapEpetra const & getMap () const
 
void recomputeMatrix (bool const recomp)
 
matrix_TypemassMatrix ()
 

Detailed Description

template<typename Mesh, typename SolverType = LifeV::SolverAztecOO>
class LifeV::HeartMonodomainSolver< Mesh, SolverType >

monodomainSolver - Class featuring the usual solver for monodomain equations

Definition at line 67 of file HeartMonodomainSolver.hpp.

Member Typedef Documentation

◆ data_type

Definition at line 75 of file HeartMonodomainSolver.hpp.

◆ Function

typedef Real( * Function) (const Real &t, const Real &x, const Real &y, const Real &z, const ID &id)

Definition at line 76 of file HeartMonodomainSolver.hpp.

◆ source_Type

typedef std::function< Real ( Real const&, Real const&, Real const&, Real const&, ID const& ) > source_Type

Definition at line 82 of file HeartMonodomainSolver.hpp.

◆ mesh_Type

typedef Mesh mesh_Type

Definition at line 84 of file HeartMonodomainSolver.hpp.

◆ bcHandlerRaw_Type

Definition at line 85 of file HeartMonodomainSolver.hpp.

◆ bcHandler_Type

typedef std::shared_ptr<bcHandlerRaw_Type> bcHandler_Type

Definition at line 86 of file HeartMonodomainSolver.hpp.

◆ matrix_Type

Definition at line 88 of file HeartMonodomainSolver.hpp.

◆ matrixPtr_Type

typedef std::shared_ptr<matrix_Type> matrixPtr_Type

Definition at line 89 of file HeartMonodomainSolver.hpp.

◆ vector_Type

Definition at line 90 of file HeartMonodomainSolver.hpp.

◆ preconditionerRaw_Type

typedef SolverType::prec_raw_type preconditionerRaw_Type

Definition at line 92 of file HeartMonodomainSolver.hpp.

◆ preconditioner_Type

typedef SolverType::prec_type preconditioner_Type

Definition at line 93 of file HeartMonodomainSolver.hpp.

Constructor & Destructor Documentation

◆ HeartMonodomainSolver()

HeartMonodomainSolver ( const data_type dataType,
FESpace< Mesh, MapEpetra > &  uFESpace,
BCHandler bcHandler,
std::shared_ptr< Epetra_Comm > &  comm 
)

Constructor.

Constructors.

Parameters
dataType
potentialFE space
bcHandlerboundary conditions for potential
Epetracommunicator

Definition at line 301 of file HeartMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ ~HeartMonodomainSolver()

virtual ~HeartMonodomainSolver ( )
inlinevirtual

Destructor.

Definition at line 117 of file HeartMonodomainSolver.hpp.

Member Function Documentation

◆ PDEiterate()

void PDEiterate ( bcHandlerRaw_Type bch)
virtual

Updates sources, bc treatment and solve the monodomain system.

Solving the system

Definition at line 713 of file HeartMonodomainSolver.hpp.

◆ setup()

void setup ( const GetPot dataFile)
virtual

Sets up the system solver.

Definition at line 358 of file HeartMonodomainSolver.hpp.

◆ buildSystem()

void buildSystem ( )
virtual

Builds time independent parts of PDE system.

Elementary computation and matrix assembling Loop on elements

Computing 1/dt * M + K

Definition at line 381 of file HeartMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ updatePDESystem() [1/2]

void updatePDESystem ( Real  alpha,
vector_Type sourceVec 
)
virtual

Updates time dependent parts of PDE system.

Definition at line 632 of file HeartMonodomainSolver.hpp.

◆ updatePDESystem() [2/2]

void updatePDESystem ( vector_Type sourceVec)
virtual

Updates time dependent parts of PDE system.

Definition at line 687 of file HeartMonodomainSolver.hpp.

◆ initialize() [1/3]

void initialize ( const source_Type u0)

Initialize.

Definition at line 596 of file HeartMonodomainSolver.hpp.

◆ initialize() [2/3]

void initialize ( const Function u0)

Definition at line 610 of file HeartMonodomainSolver.hpp.

◆ initialize() [3/3]

void initialize ( const vector_Type u0)

Definition at line 622 of file HeartMonodomainSolver.hpp.

◆ solutionTransmembranePotential()

const vector_Type& solutionTransmembranePotential ( ) const
inline

Returns the local solution vector.

Definition at line 145 of file HeartMonodomainSolver.hpp.

◆ fiberVector()

const vector_Type& fiberVector ( ) const
inline

Definition at line 150 of file HeartMonodomainSolver.hpp.

◆ residual()

const vector_Type& residual ( ) const
inline

Returns the local residual vector.

Definition at line 156 of file HeartMonodomainSolver.hpp.

◆ potentialFESpace()

FESpace<Mesh, MapEpetra>& potentialFESpace ( )
inline

Returns u FE space.

Definition at line 162 of file HeartMonodomainSolver.hpp.

◆ setBC()

void setBC ( BCHandler BCh_u)
inline

Setting of the boundary conditions.

Definition at line 168 of file HeartMonodomainSolver.hpp.

◆ postProcessing()

void postProcessing ( bool  _writeMesh = false)

Postprocessing.

◆ resetPreconditioner()

void resetPreconditioner ( )
inline

Definition at line 177 of file HeartMonodomainSolver.hpp.

◆ getRepeatedMapEpetra()

Epetra_Map const& getRepeatedMapEpetra ( ) const
inline

Return maps.

Definition at line 183 of file HeartMonodomainSolver.hpp.

◆ getRepeatedMapEpetraVec()

Epetra_Map const& getRepeatedMapEpetraVec ( ) const
inline

Definition at line 188 of file HeartMonodomainSolver.hpp.

◆ getMap()

MapEpetra const& getMap ( ) const
inline

Definition at line 193 of file HeartMonodomainSolver.hpp.

◆ recomputeMatrix()

void recomputeMatrix ( bool const  recomp)
inline

Definition at line 198 of file HeartMonodomainSolver.hpp.

◆ massMatrix()

matrix_Type& massMatrix ( )
inline

Definition at line 203 of file HeartMonodomainSolver.hpp.

◆ solveSystem()

void solveSystem ( matrixPtr_Type  matrFull,
vector_Type rhsFull 
)
protected

Solves PDE system.

Definition at line 757 of file HeartMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ applyBoundaryConditions()

void applyBoundaryConditions ( matrix_Type matrix,
vector_Type rhs,
bcHandlerRaw_Type BCh 
)
protected

Apply BC.

Definition at line 839 of file HeartMonodomainSolver.hpp.

◆ dim_u()

UInt dim_u ( ) const
inlineprivate

Definition at line 285 of file HeartMonodomainSolver.hpp.

+ Here is the caller graph for this function:

Field Documentation

◆ M_data

const data_type& M_data
protected

Data.

Definition at line 218 of file HeartMonodomainSolver.hpp.

◆ M_uFESpace

FESpace<Mesh, MapEpetra>& M_uFESpace
protected

u FE space

Definition at line 221 of file HeartMonodomainSolver.hpp.

◆ M_comm

const std::shared_ptr<Epetra_Comm> M_comm
protected

MPI communicator.

Definition at line 225 of file HeartMonodomainSolver.hpp.

◆ M_me

Int M_me
protected

Definition at line 226 of file HeartMonodomainSolver.hpp.

◆ M_BChandlerElectric

BCHandler* M_BChandlerElectric
protected

Monodomain BC.

Definition at line 229 of file HeartMonodomainSolver.hpp.

◆ M_setBC

bool M_setBC
protected

Definition at line 230 of file HeartMonodomainSolver.hpp.

◆ M_localMap

MapEpetra M_localMap
protected

Map.

Definition at line 233 of file HeartMonodomainSolver.hpp.

◆ M_localMapVector

MapEpetra M_localMapVector
protected

Definition at line 234 of file HeartMonodomainSolver.hpp.

◆ M_massMatrix

matrixPtr_Type M_massMatrix
protected

mass matrix

Definition at line 237 of file HeartMonodomainSolver.hpp.

◆ M_stiffnessMatrix

matrixPtr_Type M_stiffnessMatrix
protected

Stiff matrix: D*stiff.

Definition at line 240 of file HeartMonodomainSolver.hpp.

◆ M_matrNoBC

matrixPtr_Type M_matrNoBC
protected

Definition at line 242 of file HeartMonodomainSolver.hpp.

◆ M_rhsNoBC

vector_Type M_rhsNoBC
protected

Right hand side for the PDE.

Definition at line 245 of file HeartMonodomainSolver.hpp.

◆ M_solutionTransmembranePotential

vector_Type M_solutionTransmembranePotential
protected

Global solution _u.

Definition at line 248 of file HeartMonodomainSolver.hpp.

◆ M_fiberVector

vector_Type M_fiberVector
protected

Local fibers vector.

Definition at line 251 of file HeartMonodomainSolver.hpp.

◆ M_residual

vector_Type M_residual
protected

residual

Definition at line 254 of file HeartMonodomainSolver.hpp.

◆ M_linearSolver

SolverType M_linearSolver
protected

Solver.

Definition at line 257 of file HeartMonodomainSolver.hpp.

◆ M_preconditioner

preconditioner_Type M_preconditioner
protected

Definition at line 259 of file HeartMonodomainSolver.hpp.

◆ M_diagonalize

Real M_diagonalize
protected

Definition at line 261 of file HeartMonodomainSolver.hpp.

◆ M_verbose

bool M_verbose
protected

Boolean that indicates if output is sent to cout.

Definition at line 264 of file HeartMonodomainSolver.hpp.

◆ M_updated

bool M_updated
protected

Boolean that indicates if the matrix is updated for the current iteration.

Definition at line 267 of file HeartMonodomainSolver.hpp.

◆ M_reusePreconditioner

bool M_reusePreconditioner
protected

Boolean that indicates if the precond has to be recomputed.

Definition at line 270 of file HeartMonodomainSolver.hpp.

◆ M_resetPreconditioner

bool M_resetPreconditioner
protected

Definition at line 271 of file HeartMonodomainSolver.hpp.

◆ M_maxIteration

Int M_maxIteration
protected

Integer storing the max number of solver iteration with prec recomputing.

Definition at line 274 of file HeartMonodomainSolver.hpp.

◆ M_recomputeMatrix

bool M_recomputeMatrix
protected

Boolean that indicates if the matrix has to be recomputed.

Definition at line 277 of file HeartMonodomainSolver.hpp.

◆ M_stiffnessElementaryMatrix

MatrixElemental M_stiffnessElementaryMatrix
private

Elementary matrices.

Definition at line 282 of file HeartMonodomainSolver.hpp.

◆ M_massElementaryMatrix

MatrixElemental M_massElementaryMatrix
private

Definition at line 283 of file HeartMonodomainSolver.hpp.

◆ massCoefficient

Real massCoefficient
private

Definition at line 284 of file HeartMonodomainSolver.hpp.


The documentation for this class was generated from the following file: