LifeV
HeartBidomainSolver< Mesh, SolverType > Class Template Reference

#include <HeartBidomainSolver.hpp>

+ Collaboration diagram for HeartBidomainSolver< 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...
 
Real computeMean (vector_Type &x)
 compute mean of vector x More...
 
void removeValue (vector_Type &x, Real &value)
 removes a scalar from each entry of vector x More...
 

Protected Attributes

const data_typeM_data
 Data. More...
 
FESpace< Mesh, MapEpetra > & M_pFESpace
 u FE space More...
 
FESpace< Mesh, MapEpetra > & M_uFESpace
 
const std::shared_ptr< Epetra_Comm > M_comm
 MPI communicator. More...
 
Int M_me
 
BCHandlerM_BCh_electric
 Bidomain BC. More...
 
bool M_setBC
 
MapEpetra M_localMap
 Map. More...
 
MapEpetra M_localMap_u
 
MapEpetra M_localMapVec
 
matrixPtr_Type M_matrMass
 mass matrix More...
 
matrixPtr_Type M_matrStiff
 Stiff matrix: D*stiff. More...
 
matrixPtr_Type M_matrNoBC
 
vector_Type M_rhsNoBC
 Right hand side for the PDE. More...
 
vector_Type M_solutionIntraExtraPotential
 Global solution _u. More...
 
vector_Type M_solutionTransmembranePotential
 
vector_Type M_solutionExtraPotential
 
vector_Type M_solutionIntraExtraPotentialExtrapolated
 
vector_Type M_solutionTransmembranePotentialExtrapolated
 
vector_Type M_fiberVector
 Local fibers vector. More...
 
vector_Type M_residual
 residual More...
 
SolverType M_linearSolver
 Solver. More...
 
prec_Type M_prec
 
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_reusePrec
 Boolean that indicates if the precond has to be recomputed. More...
 
bool M_resetPreconditioner
 
Int M_maxIterSolver
 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...
 
TimeAdvanceBDF< vector_TypeM_BDFIntraExtraPotential
 

Private Member Functions

UInt potentialFESpaceDimension () const
 

Private Attributes

MatrixElemental M_elmatStiff
 Elementary matrices. More...
 
MatrixElemental M_elmatMass
 
Real massCoeff
 

Type definitions

typedef HeartBidomainData data_type
 
typedef Real(* Function) (const Real &, const Real &, const Real &, const Real &, const ID &)
 
typedef std::function< Real(const Real &, const Real &, const Real &, const Real &, const ID &) > source_Type
 
typedef Mesh mesh_Type
 
typedef BCHandler bchandlerRaw_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 precRaw_Type
 
typedef SolverType::prec_type prec_Type
 

Constructors & Destructor

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

Methods

virtual void PDEiterate (bchandlerRaw_Type &bch)
 Updates sources, bc treatment and solve the bidomain 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 &, const source_Type &)
 Initialize. More...
 
void initialize (const Function &, const Function &)
 
void initialize (const vector_Type &, const vector_Type &)
 
const vector_TypesolutionTransmembranePotential () const
 Returns the local solution vector. More...
 
const vector_TypesolutionExtraPotential () const
 
const vector_TypesolutionIntraExtraPotential () const
 
const vector_TypesolutionTransmembranePotentialExtrapolated () const
 
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)
 Sets Bidomain BCs. More...
 
void resetPreconditioner ()
 
Epetra_Map const & getRepeatedMapEpetra () const
 Return maps getMap. More...
 
Epetra_Map const & getRepeatedMapEpetraVec () const
 
MapEpetra const & getMap () const
 
void recomputeMatrix (bool const recomp)
 
matrix_TypematrMass ()
 
TimeAdvanceBDF< vector_Type > & BDFIntraExtraPotential ()
 

Detailed Description

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

Definition at line 67 of file HeartBidomainSolver.hpp.

Member Typedef Documentation

◆ data_type

Definition at line 74 of file HeartBidomainSolver.hpp.

◆ Function

typedef Real( * Function) (const Real &, const Real &, const Real &, const Real &, const ID &)

Definition at line 76 of file HeartBidomainSolver.hpp.

◆ source_Type

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

Definition at line 79 of file HeartBidomainSolver.hpp.

◆ mesh_Type

typedef Mesh mesh_Type

Definition at line 81 of file HeartBidomainSolver.hpp.

◆ bchandlerRaw_Type

Definition at line 83 of file HeartBidomainSolver.hpp.

◆ matrix_Type

Definition at line 86 of file HeartBidomainSolver.hpp.

◆ matrixPtr_Type

typedef std::shared_ptr<matrix_Type> matrixPtr_Type

Definition at line 87 of file HeartBidomainSolver.hpp.

◆ vector_Type

Definition at line 88 of file HeartBidomainSolver.hpp.

◆ precRaw_Type

typedef SolverType::prec_raw_type precRaw_Type

Definition at line 90 of file HeartBidomainSolver.hpp.

◆ prec_Type

typedef SolverType::prec_type prec_Type

Definition at line 91 of file HeartBidomainSolver.hpp.

Constructor & Destructor Documentation

◆ HeartBidomainSolver()

HeartBidomainSolver ( const data_type dataType,
FESpace< Mesh, MapEpetra > &  pFESpace,
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 332 of file HeartBidomainSolver.hpp.

+ Here is the caller graph for this function:

◆ ~HeartBidomainSolver()

~HeartBidomainSolver ( )
virtual

Destructor.

Definition at line 407 of file HeartBidomainSolver.hpp.

Member Function Documentation

◆ PDEiterate()

void PDEiterate ( bchandlerRaw_Type bch)
virtual

Updates sources, bc treatment and solve the bidomain system.

Solving the system

Definition at line 750 of file HeartBidomainSolver.hpp.

◆ setup()

void setup ( const GetPot dataFile)
virtual

Sets up the system solver.

Definition at line 412 of file HeartBidomainSolver.hpp.

◆ buildSystem()

void buildSystem ( )
virtual

Builds time independent parts of PDE system.

Elementary computation and matrix assembling Loop on elements

Computing 1.0/dt * M + K

Definition at line 426 of file HeartBidomainSolver.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 680 of file HeartBidomainSolver.hpp.

◆ updatePDESystem() [2/2]

void updatePDESystem ( vector_Type sourceVec)
virtual

Updates time dependent parts of PDE system.

Definition at line 729 of file HeartBidomainSolver.hpp.

◆ initialize() [1/3]

void initialize ( const source_Type ui0,
const source_Type ue0 
)

Initialize.

Definition at line 634 of file HeartBidomainSolver.hpp.

◆ initialize() [2/3]

void initialize ( const Function ui0,
const Function ue0 
)

Definition at line 647 of file HeartBidomainSolver.hpp.

◆ initialize() [3/3]

void initialize ( const vector_Type ui0,
const vector_Type ue0 
)

Definition at line 659 of file HeartBidomainSolver.hpp.

◆ solutionTransmembranePotential()

const vector_Type& solutionTransmembranePotential ( ) const
inline

Returns the local solution vector.

Definition at line 144 of file HeartBidomainSolver.hpp.

◆ solutionExtraPotential()

const vector_Type& solutionExtraPotential ( ) const
inline

Definition at line 148 of file HeartBidomainSolver.hpp.

◆ solutionIntraExtraPotential()

const vector_Type& solutionIntraExtraPotential ( ) const
inline

Definition at line 152 of file HeartBidomainSolver.hpp.

◆ solutionTransmembranePotentialExtrapolated()

const vector_Type& solutionTransmembranePotentialExtrapolated ( ) const
inline

Definition at line 156 of file HeartBidomainSolver.hpp.

◆ fiberVector()

const vector_Type& fiberVector ( ) const
inline

Definition at line 160 of file HeartBidomainSolver.hpp.

◆ residual()

const vector_Type& residual ( ) const
inline

Returns the local residual vector.

Definition at line 166 of file HeartBidomainSolver.hpp.

◆ potentialFESpace()

FESpace<Mesh, MapEpetra>& potentialFESpace ( )
inline

Returns u FE space.

Definition at line 172 of file HeartBidomainSolver.hpp.

◆ setBC()

void setBC ( BCHandler BCh_u)
inline

Sets Bidomain BCs.

Definition at line 178 of file HeartBidomainSolver.hpp.

◆ resetPreconditioner()

void resetPreconditioner ( )
inline

Definition at line 184 of file HeartBidomainSolver.hpp.

◆ getRepeatedMapEpetra()

Epetra_Map const& getRepeatedMapEpetra ( ) const
inline

Return maps getMap.

Definition at line 190 of file HeartBidomainSolver.hpp.

◆ getRepeatedMapEpetraVec()

Epetra_Map const& getRepeatedMapEpetraVec ( ) const
inline

Definition at line 195 of file HeartBidomainSolver.hpp.

◆ getMap()

MapEpetra const& getMap ( ) const
inline

Definition at line 200 of file HeartBidomainSolver.hpp.

◆ recomputeMatrix()

void recomputeMatrix ( bool const  recomp)
inline

Definition at line 205 of file HeartBidomainSolver.hpp.

◆ matrMass()

matrix_Type& matrMass ( )
inline

Definition at line 210 of file HeartBidomainSolver.hpp.

◆ BDFIntraExtraPotential()

TimeAdvanceBDF<vector_Type>& BDFIntraExtraPotential ( )
inline

Definition at line 215 of file HeartBidomainSolver.hpp.

◆ solveSystem()

void solveSystem ( matrixPtr_Type  matrFull,
vector_Type rhsFull 
)
protected

Solves PDE system.

Definition at line 792 of file HeartBidomainSolver.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 890 of file HeartBidomainSolver.hpp.

◆ computeMean()

Real computeMean ( vector_Type x)
protected

compute mean of vector x

Definition at line 919 of file HeartBidomainSolver.hpp.

+ Here is the caller graph for this function:

◆ removeValue()

void removeValue ( vector_Type x,
Real value 
)
protected

removes a scalar from each entry of vector x

Definition at line 927 of file HeartBidomainSolver.hpp.

+ Here is the caller graph for this function:

◆ potentialFESpaceDimension()

UInt potentialFESpaceDimension ( ) const
inlineprivate

Definition at line 317 of file HeartBidomainSolver.hpp.

+ Here is the caller graph for this function:

Field Documentation

◆ M_data

const data_type& M_data
protected

Data.

Definition at line 240 of file HeartBidomainSolver.hpp.

◆ M_pFESpace

FESpace<Mesh, MapEpetra>& M_pFESpace
protected

u FE space

Definition at line 243 of file HeartBidomainSolver.hpp.

◆ M_uFESpace

FESpace<Mesh, MapEpetra>& M_uFESpace
protected

Definition at line 244 of file HeartBidomainSolver.hpp.

◆ M_comm

const std::shared_ptr<Epetra_Comm> M_comm
protected

MPI communicator.

Definition at line 247 of file HeartBidomainSolver.hpp.

◆ M_me

Int M_me
protected

Definition at line 248 of file HeartBidomainSolver.hpp.

◆ M_BCh_electric

BCHandler* M_BCh_electric
protected

Bidomain BC.

Definition at line 251 of file HeartBidomainSolver.hpp.

◆ M_setBC

bool M_setBC
protected

Definition at line 252 of file HeartBidomainSolver.hpp.

◆ M_localMap

MapEpetra M_localMap
protected

Map.

Definition at line 255 of file HeartBidomainSolver.hpp.

◆ M_localMap_u

MapEpetra M_localMap_u
protected

Definition at line 256 of file HeartBidomainSolver.hpp.

◆ M_localMapVec

MapEpetra M_localMapVec
protected

Definition at line 257 of file HeartBidomainSolver.hpp.

◆ M_matrMass

matrixPtr_Type M_matrMass
protected

mass matrix

Definition at line 260 of file HeartBidomainSolver.hpp.

◆ M_matrStiff

matrixPtr_Type M_matrStiff
protected

Stiff matrix: D*stiff.

Definition at line 263 of file HeartBidomainSolver.hpp.

◆ M_matrNoBC

matrixPtr_Type M_matrNoBC
protected

Definition at line 265 of file HeartBidomainSolver.hpp.

◆ M_rhsNoBC

vector_Type M_rhsNoBC
protected

Right hand side for the PDE.

Definition at line 268 of file HeartBidomainSolver.hpp.

◆ M_solutionIntraExtraPotential

vector_Type M_solutionIntraExtraPotential
protected

Global solution _u.

Definition at line 271 of file HeartBidomainSolver.hpp.

◆ M_solutionTransmembranePotential

vector_Type M_solutionTransmembranePotential
protected

Definition at line 273 of file HeartBidomainSolver.hpp.

◆ M_solutionExtraPotential

vector_Type M_solutionExtraPotential
protected

Definition at line 275 of file HeartBidomainSolver.hpp.

◆ M_solutionIntraExtraPotentialExtrapolated

vector_Type M_solutionIntraExtraPotentialExtrapolated
protected

Definition at line 277 of file HeartBidomainSolver.hpp.

◆ M_solutionTransmembranePotentialExtrapolated

vector_Type M_solutionTransmembranePotentialExtrapolated
protected

Definition at line 279 of file HeartBidomainSolver.hpp.

◆ M_fiberVector

vector_Type M_fiberVector
protected

Local fibers vector.

Definition at line 282 of file HeartBidomainSolver.hpp.

◆ M_residual

vector_Type M_residual
protected

residual

Definition at line 285 of file HeartBidomainSolver.hpp.

◆ M_linearSolver

SolverType M_linearSolver
protected

Solver.

Definition at line 288 of file HeartBidomainSolver.hpp.

◆ M_prec

prec_Type M_prec
protected

Definition at line 290 of file HeartBidomainSolver.hpp.

◆ M_diagonalize

Real M_diagonalize
protected

Definition at line 292 of file HeartBidomainSolver.hpp.

◆ M_verbose

bool M_verbose
protected

Boolean that indicates if output is sent to cout.

Definition at line 295 of file HeartBidomainSolver.hpp.

◆ M_updated

bool M_updated
protected

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

Definition at line 298 of file HeartBidomainSolver.hpp.

◆ M_reusePrec

bool M_reusePrec
protected

Boolean that indicates if the precond has to be recomputed.

Definition at line 301 of file HeartBidomainSolver.hpp.

◆ M_resetPreconditioner

bool M_resetPreconditioner
protected

Definition at line 302 of file HeartBidomainSolver.hpp.

◆ M_maxIterSolver

Int M_maxIterSolver
protected

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

Definition at line 305 of file HeartBidomainSolver.hpp.

◆ M_recomputeMatrix

bool M_recomputeMatrix
protected

Boolean that indicates if the matrix has to be recomputed.

Definition at line 308 of file HeartBidomainSolver.hpp.

◆ M_BDFIntraExtraPotential

TimeAdvanceBDF<vector_Type> M_BDFIntraExtraPotential
protected

Definition at line 310 of file HeartBidomainSolver.hpp.

◆ M_elmatStiff

MatrixElemental M_elmatStiff
private

Elementary matrices.

Definition at line 314 of file HeartBidomainSolver.hpp.

◆ M_elmatMass

MatrixElemental M_elmatMass
private

Definition at line 315 of file HeartBidomainSolver.hpp.

◆ massCoeff

Real massCoeff
private

Definition at line 316 of file HeartBidomainSolver.hpp.


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