LifeV
ElectroETAMonodomainSolver< Mesh, IonicModel > Class Template Reference

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

#include <ElectroETAMonodomainSolver.hpp>

+ Collaboration diagram for ElectroETAMonodomainSolver< Mesh, IonicModel >:

Protected Attributes

Real M_surfaceVolumeRatio
 
ionicModelPtr_Type M_ionicModelPtr
 
commPtr_Type M_commPtr
 
meshPtr_Type M_localMeshPtr
 
meshPtr_Type M_fullMeshPtr
 
ETFESpacePtr_Type M_ETFESpacePtr
 
feSpacePtr_Type M_feSpacePtr
 
matrixPtr_Type M_massMatrixPtr
 
matrixPtr_Type M_fullMassMatrixPtr
 
matrixPtr_Type M_stiffnessMatrixPtr
 
matrixPtr_Type M_globalMatrixPtr
 
Real M_initialTime
 
Real M_endTime
 
Real M_timeStep
 
VectorSmall< 3 > M_diffusionTensor
 
vectorPtr_Type M_rhsPtr
 
vectorPtr_Type M_rhsPtrUnique
 
vectorPtr_Type M_potentialPtr
 
linearSolverPtr_Type M_linearSolverPtr
 
vectorOfPtr_Type M_globalSolution
 
vectorOfPtr_Type M_globalRhs
 
std::string M_elementsOrder
 
vectorPtr_Type M_fiberPtr
 
matrixSmall_Type M_identity
 
bool M_lumpedMassMatrix
 
bool M_verbose
 

Private Member Functions

void setParameters ()
 Set default parameters. More...
 
void init ()
 initialization in constructor More...
 
void init (commPtr_Type comm)
 initialization in constructor More...
 
void init (meshPtr_Type meshPtr)
 initialization in constructor More...
 
void init (ionicModelPtr_Type model)
 initialization in constructor More...
 

Type definitions

Monodomain Solver

The monodomain equation reads

typedef Mesh mesh_Type
 Mesh. More...
 
typedef std::shared_ptr< mesh_TypemeshPtr_Type
 
typedef VectorEpetra vector_Type
 Distributed vector // For parallel usage. More...
 
typedef std::shared_ptr< VectorEpetravectorPtr_Type
 
typedef vector_Type solution_Type
 
typedef vectorPtr_Type solutionPtr_Type
 
typedef std::vector< vectorPtr_TypevectorOfPtr_Type
 
typedef MatrixEpetra< Realmatrix_Type
 Distributed Matrix // For parallel usage. More...
 
typedef std::shared_ptr< matrix_TypematrixPtr_Type
 
typedef Epetra_Comm comm_Type
 Communicator to exchange informations among processes. More...
 
typedef std::shared_ptr< comm_TypecommPtr_Type
 
typedef ETFESpace< mesh_Type, MapEpetra, 3, 1 > ETFESpace_Type
 Expression template scalar finite element space To be used in the expression assembly namespace. More...
 
typedef std::shared_ptr< ETFESpace< mesh_Type, MapEpetra, 3, 1 > > ETFESpacePtr_Type
 
typedef ETFESpace< mesh_Type, MapEpetra, 3, 3 > ETFESpaceVectorial_Type
 Expression template vectorial finite element space To be used in the expression assembly namespace. More...
 
typedef std::shared_ptr< ETFESpaceVectorial_TypeETFESpaceVectorialPtr_Type
 
typedef FESpace< mesh_Type, MapEpetrafeSpace_Type
 Finite element space. More...
 
typedef std::shared_ptr< feSpace_TypefeSpacePtr_Type
 
typedef LinearSolver linearSolver_Type
 Linear Solver. More...
 
typedef std::shared_ptr< LinearSolverlinearSolverPtr_Type
 
typedef Exporter< mesh_TypeIOFile_Type
 Exporter to save the solution. More...
 
typedef std::shared_ptr< IOFile_TypeIOFilePtr_Type
 
typedef ExporterData< mesh_TypeIOData_Type
 Exporter data. More...
 
typedef ExporterEnsight< mesh_TypeensightIOFile_Type
 
typedef ExporterHDF5< mesh_Typehdf5IOFile_Type
 
typedef LifeV::Preconditioner basePrec_Type
 Preconditioner. More...
 
typedef std::shared_ptr< basePrec_TypebasePrecPtr_Type
 
typedef LifeV::PreconditionerML prec_Type
 MultiLevel Preconditioner. More...
 
typedef std::shared_ptr< prec_TypeprecPtr_Type
 
typedef IonicModel ionicModel_Type
 Ionic model. More...
 
typedef ElectroIonicModel superIonicModel
 Base class of the ionic model. More...
 
typedef std::shared_ptr< superIonicModelionicModelPtr_Type
 
typedef Teuchos::ParameterList list_Type
 xml list to read parameters More...
 
typedef std::function< Real(const Real &t, const Real &x, const Real &y, const Real &z, const ID &i) > function_Type
 boost function More...
 
typedef MatrixSmall< 3, 3 > matrixSmall_Type
 3x3 matrix More...
 

Constructors & Destructor

 ElectroETAMonodomainSolver ()
 Empty Constructor. More...
 
 ElectroETAMonodomainSolver (GetPot &dataFile, ionicModelPtr_Type model, meshPtr_Type meshPtr)
 Constructor. More...
 
 ElectroETAMonodomainSolver (std::string meshName, std::string meshPath, GetPot &dataFile, ionicModelPtr_Type model)
 Constructor. More...
 
 ElectroETAMonodomainSolver (std::string meshName, std::string meshPath, GetPot &dataFile, ionicModelPtr_Type model, commPtr_Type comm)
 Constructor. More...
 
 ElectroETAMonodomainSolver (const ElectroETAMonodomainSolver &solver)
 Copy Constructor. More...
 
ElectroETAMonodomainSolver< Mesh, IonicModel > & operator= (const ElectroETAMonodomainSolver &solver)
 Operator=() More...
 
virtual ~ElectroETAMonodomainSolver ()
 Destructor. More...
 

Get Methods

const RealsurfaceVolumeRatio () const
 get the surface to volume ratio More...
 
const RealinitialTime () const
 get the initial time (by default 0) More...
 
const RealtimeStep () const
 get the final time More...
 
const RealendTime () const
 get the time step More...
 
const VectorSmall< 3 > & diffusionTensor () const
 get the diagonal diffusion tensor More...
 
const std::string elementsOrder () const
 get the order of the elements More...
 
const ionicModelPtr_Type ionicModelPtr () const
 get the pointer to the ionic model More...
 
const commPtr_Type commPtr () const
 get the pointer to the Epetra communicator More...
 
const meshPtr_Type localMeshPtr () const
 get the pointer to the partitioned mesh More...
 
meshPtr_Type localMeshPtr ()
 get the pointer to the partitioned mesh More...
 
const meshPtr_Type fullMeshPtr () const
 get the pointer to the partitioned mesh More...
 
const ETFESpacePtr_Type ETFESpacePtr () const
 get the pointer to the ETA finite element space More...
 
const feSpacePtr_Type feSpacePtr () const
 get the pointer to the usual finite element space More...
 
const matrixPtr_Type massMatrixPtr () const
 get the pointer to the mass matrix More...
 
const matrixPtr_Type fullMassMatrixPtr () const
 get the pointer to the mass matrix More...
 
const matrixPtr_Type stiffnessMatrixPtr () const
 get the pointer to the stiffness matrix More...
 
const matrixPtr_Type globalMatrixPtr () const
 get the pointer to the global matrix More...
 
const vectorPtr_Type rhsPtr () const
 get the pointer to the right hand side More...
 
const vectorPtr_Type rhsPtrUnique () const
 get the pointer to the unique version of the right hand side More...
 
const vectorPtr_Type potentialPtr () const
 get the pointer to the transmembrane potential More...
 
const vectorPtr_Type fiberPtr () const
 get the pointer to the fiber vector More...
 
vectorPtr_Type fiberPtr ()
 get the pointer to the fiber vector More...
 
const vectorPtr_Type appliedCurrentPtr ()
 get the pointer to the applied current vector More...
 
const linearSolverPtr_Type linearSolverPtr () const
 get the pointer to the linear solver More...
 
const vectorOfPtr_TypeglobalSolution () const
 get the pointer to the vector of pointers containing the transmembrane potential (at 0) and the gating variables More...
 
const vectorOfPtr_TypeglobalRhs () const
 get the pointer to the vector of pointers containing the rhs for transmembrane potential (at 0) and the gating variables More...
 
bool lumpedMassMatrix () const
 getter for the boolean to know if we want a lumped matrix More...
 

Set Methods

void setSurfaceVolumeRatio (const Real &surfaceVolumeRatio)
 set the surface to volume ratio More...
 
void setInitialTime (const Real &initialTime)
 set the starting time More...
 
void setTimeStep (const Real &timeStep)
 set the ending time More...
 
void setEndTime (const Real &endTime)
 set the time step More...
 
void setDiffusionTensor (const VectorSmall< 3 > &diffusionTensor)
 set the diagonal diffusion tensor More...
 
void setIonicModelPtr (const ionicModelPtr_Type ionicModelPtr)
 set the pointer to the ionic model More...
 
void setIonicModel (const ionicModel_Type &ionicModel)
 set ionic model More...
 
void setCommPtr (const commPtr_Type commPtr)
 set the pointer to the Epetra communicator More...
 
void setComm (const comm_Type &comm)
 set the Epetra communicator More...
 
void setLocalMeshPtr (const meshPtr_Type localMeshPtr)
 set the pointer to the partitioned mesh More...
 
void setLocalMesh (const mesh_Type &localMesh)
 set the partitioned mesh More...
 
void setFullMeshPtr (const meshPtr_Type fullMeshPtr)
 set the pointer to the non partitioned mesh More...
 
void setFullMesh (const mesh_Type &fullMesh)
 set the non partitioned mesh More...
 
void setETFESpacePtr (const ETFESpacePtr_Type ETFESpacePtr)
 set the pointer to the ETA fe space More...
 
void setETFESpace (const ETFESpace_Type &ETFESpace)
 set the scalar ETA fe space More...
 
void setFeSpacePtr (const feSpacePtr_Type feSpacePtr)
 set the pointer to the usual fe space More...
 
void setFeSpace (const feSpace_Type &feSpace)
 set the fe space More...
 
void setMassMatrixPtr (const matrixPtr_Type massMatrixPtr)
 set the pointer to the mass matrix More...
 
void setMassMatrix (const matrix_Type &massMatrix)
 set the mass matrix More...
 
void setFullMassMatrixPtr (const matrixPtr_Type fullMassMatrixPtr)
 set the pointer to the full mass matrix More...
 
void setFullMassMatrix (const matrix_Type &fullMassMatrix)
 set the full mass matrix More...
 
void setStiffnessMatrixPtr (const matrixPtr_Type stiffnessMatrixPtr)
 set the pointer to the stiffness matrix More...
 
void setStiffnessMatrix (const matrix_Type &stiffnessMatrix)
 set the stiffness matrix More...
 
void setGlobalMatrixPtr (const matrixPtr_Type globalMatrixPtr)
 set the pointer to the global matrix More...
 
void setGlobalMatrix (const matrix_Type &globalMatrix)
 set the global matrix More...
 
void setRhsPtr (const vectorPtr_Type rhsPtr)
 set the pointer to the right hand side More...
 
void setRhs (const vector_Type &rhs)
 set the right hand side More...
 
void setRhsPtrUnique (const vectorPtr_Type rhsPtrUnique)
 set the pointer to the unique version of the right hand side More...
 
void setRhsUnique (const vector_Type &rhsPtrUnique)
 set the unique version of the right hand side More...
 
void setPotentialPtr (const vectorPtr_Type potentialPtr)
 set the pointer to the potential More...
 
void setPotential (const vector_Type &potential)
 set the potential More...
 
void setAppliedCurrentPtr (const vectorPtr_Type appliedCurrentPtr)
 set the pointer to the applied current vector More...
 
void setAppliedCurrent (const vector_Type &appliedCurrent)
 set the applied current vector More...
 
void setLinearSolverPtr (const linearSolverPtr_Type linearSolverPtr)
 set the pointer to the linear solver More...
 
void setLinearSolver (const linearSolver_Type &linearSolver)
 set the linear solver More...
 
void setGlobalSolutionPtrs (const vectorOfPtr_Type &globalSolution)
 set the vector of pointers containing the transmembrane potential (at 0) and the gating variables More...
 
void setGlobalSolution (const vectorOfPtr_Type &globalSolution)
 set the vectors of unknowns: containing the transmembrane potential (at 0) and the gating variables More...
 
void setVariablePtr (const vectorPtr_Type gatingVariable, int j)
 set the pointer to the [j]-th gating variable More...
 
void setVariablePtr (const vector_Type &gatingVariable, int j)
 set the [j]-th gating variable More...
 
void setGlobalRhsPtrs (const vectorOfPtr_Type &globalRhs)
 set the vector of pointers containing the rhs for the transmembrane potential (at 0) and the gating variables More...
 
void setGlobalRhs (const vectorOfPtr_Type &globalRhs)
 set the vectors containing the rhs for the transmembrane potential (at 0) and the gating variables More...
 
void setFiberPtr (const vectorPtr_Type fiberPtr)
 set the pointer to the fiber direction vector More...
 
void setFiber (const vector_Type &fiber)
 set the fiber direction vector More...
 
void setLumpedMassMatrix (bool isLumped)
 set the the choice of lumping More...
 

Methods

virtual void setup (GetPot &dataFile, short int ionicSize)
 setup method used in the constructor More...
 
virtual void setup (std::string meshName, std::string meshPath, GetPot &dataFile, short int ionicSize)
 setup method used in the constructor More...
 
void setupMassMatrix ()
 create mass matrix More...
 
void setupLumpedMassMatrix ()
 create mass matrix More...
 
virtual void setupStiffnessMatrix ()
 create stiffness matrix More...
 
void setupStiffnessMatrix (VectorSmall< 3 > diffusion)
 create stiffness matrix given a diagonal diffusion tensor More...
 
void setupGlobalMatrix ()
 setup the total matrix More...
 
void setupLinearSolver (GetPot dataFile)
 setup the linear solver More...
 
void initializePotential (Real k=0.0)
 Initialize the potential to the value k. More...
 
void initializeAppliedCurrent (Real k=0.0)
 Initialize the applied current to the value k. More...
 
void setupGlobalSolution (short int ionicSize)
 creates a vector of pointers to store the solution More...
 
void setupGlobalRhs (short int ionicSize)
 creates a vector of pointers to store the rhs More...
 
void setParameters (list_Type list)
 Set parameters from an xml file. More...
 
void partitionMesh (std::string meshName, std::string meshPath)
 partition the mesh More...
 
void setPotentialFromFunction (function_Type &f, Real time=0.0)
 given a boost function initialize the potential More...
 
void setAppliedCurrentFromFunction (function_Type &f, Real time=0.0)
 given a boost function initialize the applied current More...
 
void setAppliedCurrentFromElectroStimulus (ElectroStimulus &stimulus, Real time=0.0)
 given a ElectroStimulus object initialize the applied current More...
 
void solveOneReactionStepFE (int subiterations=1)
 Solves one reaction step using the forward Euler scheme and N subiterations. More...
 
void solveOneReactionStepFE (matrix_Type &mass, int subiterations=1)
 Solves one reaction step using the forward Euler scheme. More...
 
void solveOneReactionStepRL (int subiterations=1)
 Solves one reaction step using the Rush-Larsen scheme. More...
 
void updateRhs ()
 Update the rhs. More...
 
void solveOneDiffusionStepBDF2 (vectorPtr_Type previousPotentialPtr)
 Solves one diffusion step using the BDF2 scheme. More...
 
void solveOneDiffusionStepBE ()
 Solves one diffusion step using the backward Euler scheme. More...
 
void solveOneSplittingStep ()
 Solve one full step with operator splitting. More...
 
void solveSplitting ()
 Solve the system with operator splitting from M_initialTime to the M_endTime with time step M_timeStep. More...
 
void solveOneSplittingStep (IOFile_Type &exporter, Real t)
 Solve one full step with operator splitting and export the solution. More...
 
void solveSplitting (IOFile_Type &exporter)
 Solve the system with operator splitting from M_initialTime to the M_endTime with time step M_timeStep and export the solution. More...
 
void solveSplitting (IOFile_Type &exporter, Real dt)
 Solve the system with operator splitting from M_initialTime to the M_endTime with time step M_timeStep and export the solution every dt. More...
 
void setupPotentialExporter (IOFile_Type &exporter, std::string fileName="Potential")
 add to a given exporter the pointer to the potential saved with name fileName More...
 
void setupExporter (IOFile_Type &exporter, std::string fileName="output", std::string folder="./")
 add to a given exporter the pointer to the potential and to the gating variables saved with name fileName More...
 
void setupFibers ()
 Generates a default fiber direction (0,1,0) More...
 
void setupFibers (VectorSmall< 3 > fibers)
 Generates the fiber direction given the three component of the vector (F_x,F_y,F_z) More...
 
void setupFibers (std::string fibersFile, const std::string &filePath="./")
 Imports the fiber direction from a hdf5 file. More...
 
void setupFibers (std::string fibersFile, std::string directory, int format=0)
 Imports the fiber direction from a vtk file ( format = 0), or text file. More...
 
void solveOneStepGatingVariablesFE ()
 Solves the gating variables with forward Euler. More...
 
void solveOneStepGatingVariablesRL ()
 Solves the gating variables with Rush-Larsen scheme. More...
 
void computeRhsSVI ()
 Compute the rhs using state variable interpolation. More...
 
void computeRhsICI ()
 Compute the rhs using ionic current interpolation. More...
 
void computeRhsICIWithFullMass ()
 Compute the rhs using ionic current interpolation. More...
 
virtual void solveOneICIStep ()
 Solve one full step with ionic current interpolation. More...
 
void solveOneICIStepWithFullMass ()
 solves using ionic current interpolation More...
 
void solveOneSVIStep ()
 Solve one full step with state variable interpolation. More...
 
void solveICI ()
 solve system using ICI from M_initialTime to the M_endTime with time step M_timeStep More...
 
void solveSVI ()
 solve system using SVI from M_initialTime to the M_endTime with time step M_timeStep More...
 
void solveOneICIStep (IOFile_Type &exporter, Real t)
 Solve one full step with ionic current interpolation and export the solution. More...
 
void solveOneICIStepWithFullMass (IOFile_Type &exporter, Real t)
 Solve one full step with ionic current interpolation and export the solution. More...
 
void solveOneSVIStep (IOFile_Type &exporter, Real t)
 Solve one full step with ionic current interpolation and export the solution. More...
 
void solveICI (IOFile_Type &exporter)
 solve system using ICI from M_initialTime to the M_endTime with time step M_timeStep and export the solution More...
 
void solveSVI (IOFile_Type &exporter)
 solve system using SVI from M_initialTime to the M_endTime with time step M_timeStep and export the solution More...
 
void solveICI (IOFile_Type &exporter, Real dt)
 Solve the system using ICI from M_initialTime to the M_endTime with time step M_timeStep and export the solution every dt. More...
 
void solveICIWithFullMass (IOFile_Type &exporter, Real dt)
 Solve the system using ICI from M_initialTime to the M_endTime with time step M_timeStep and export the solution every dt. More...
 
void solveSVI (IOFile_Type &exporter, Real dt)
 Solve the using SVI from M_initialTime to the M_endTime with time step M_timeStep and export the solution every dt. More...
 
void exportFiberDirection (std::string postDir="./")
 Generates a file where the fiber direction is saved. More...
 
void exportFiberDirection (IOFile_Type &exporter)
 save the fiber direction into the given exporter More...
 
void exportSolution (IOFile_Type &exporter, Real t)
 Save the solution in the exporter. More...
 
void importSolution (std::string prefix, std::string postDir, Real time=0.0)
 Importer: lead a solution from an hdf5 file. More...
 
void setInitialConditions ()
 Initialize the solution with resting values of the ionic model. More...
 
void registerActivationTime (vector_Type &activationTimeVector, Real time, Real threshold=0.0)
 save the fiber direction into the given exporter More...
 
void setVerbosity (bool verbose)
 set the verbosity More...
 

Detailed Description

template<typename Mesh, typename IonicModel>
class LifeV::ElectroETAMonodomainSolver< Mesh, IonicModel >

monodomainSolver - Class featuring the solver for monodomain equations

Definition at line 87 of file ElectroETAMonodomainSolver.hpp.

Member Typedef Documentation

◆ mesh_Type

typedef Mesh mesh_Type

Mesh.

Definition at line 103 of file ElectroETAMonodomainSolver.hpp.

◆ meshPtr_Type

typedef std::shared_ptr<mesh_Type> meshPtr_Type

Definition at line 105 of file ElectroETAMonodomainSolver.hpp.

◆ vector_Type

Distributed vector // For parallel usage.

Definition at line 108 of file ElectroETAMonodomainSolver.hpp.

◆ vectorPtr_Type

typedef std::shared_ptr<VectorEpetra> vectorPtr_Type

Definition at line 110 of file ElectroETAMonodomainSolver.hpp.

◆ solution_Type

Definition at line 112 of file ElectroETAMonodomainSolver.hpp.

◆ solutionPtr_Type

◆ vectorOfPtr_Type

typedef std::vector<vectorPtr_Type> vectorOfPtr_Type

Definition at line 116 of file ElectroETAMonodomainSolver.hpp.

◆ matrix_Type

Distributed Matrix // For parallel usage.

Definition at line 119 of file ElectroETAMonodomainSolver.hpp.

◆ matrixPtr_Type

typedef std::shared_ptr<matrix_Type> matrixPtr_Type

Definition at line 121 of file ElectroETAMonodomainSolver.hpp.

◆ comm_Type

typedef Epetra_Comm comm_Type

Communicator to exchange informations among processes.

Definition at line 124 of file ElectroETAMonodomainSolver.hpp.

◆ commPtr_Type

typedef std::shared_ptr<comm_Type> commPtr_Type

Definition at line 126 of file ElectroETAMonodomainSolver.hpp.

◆ ETFESpace_Type

Expression template scalar finite element space To be used in the expression assembly namespace.

Definition at line 130 of file ElectroETAMonodomainSolver.hpp.

◆ ETFESpacePtr_Type

typedef std::shared_ptr<ETFESpace<mesh_Type, MapEpetra, 3, 1> > ETFESpacePtr_Type

Definition at line 132 of file ElectroETAMonodomainSolver.hpp.

◆ ETFESpaceVectorial_Type

Expression template vectorial finite element space To be used in the expression assembly namespace.

Definition at line 136 of file ElectroETAMonodomainSolver.hpp.

◆ ETFESpaceVectorialPtr_Type

Definition at line 138 of file ElectroETAMonodomainSolver.hpp.

◆ feSpace_Type

Finite element space.

Definition at line 141 of file ElectroETAMonodomainSolver.hpp.

◆ feSpacePtr_Type

typedef std::shared_ptr<feSpace_Type> feSpacePtr_Type

Definition at line 143 of file ElectroETAMonodomainSolver.hpp.

◆ linearSolver_Type

Linear Solver.

Definition at line 146 of file ElectroETAMonodomainSolver.hpp.

◆ linearSolverPtr_Type

typedef std::shared_ptr<LinearSolver> linearSolverPtr_Type

Definition at line 148 of file ElectroETAMonodomainSolver.hpp.

◆ IOFile_Type

Exporter to save the solution.

Definition at line 151 of file ElectroETAMonodomainSolver.hpp.

◆ IOFilePtr_Type

typedef std::shared_ptr<IOFile_Type> IOFilePtr_Type

Definition at line 153 of file ElectroETAMonodomainSolver.hpp.

◆ IOData_Type

Exporter data.

Definition at line 156 of file ElectroETAMonodomainSolver.hpp.

◆ ensightIOFile_Type

◆ hdf5IOFile_Type

◆ basePrec_Type

◆ basePrecPtr_Type

typedef std::shared_ptr<basePrec_Type> basePrecPtr_Type

Definition at line 167 of file ElectroETAMonodomainSolver.hpp.

◆ prec_Type

MultiLevel Preconditioner.

Definition at line 170 of file ElectroETAMonodomainSolver.hpp.

◆ precPtr_Type

typedef std::shared_ptr<prec_Type> precPtr_Type

Definition at line 172 of file ElectroETAMonodomainSolver.hpp.

◆ ionicModel_Type

typedef IonicModel ionicModel_Type

Ionic model.

Definition at line 175 of file ElectroETAMonodomainSolver.hpp.

◆ superIonicModel

Base class of the ionic model.

Definition at line 178 of file ElectroETAMonodomainSolver.hpp.

◆ ionicModelPtr_Type

typedef std::shared_ptr<superIonicModel> ionicModelPtr_Type

Definition at line 180 of file ElectroETAMonodomainSolver.hpp.

◆ list_Type

typedef Teuchos::ParameterList list_Type

xml list to read parameters

Definition at line 183 of file ElectroETAMonodomainSolver.hpp.

◆ function_Type

typedef std::function< Real (const Real& t, const Real& x, const Real& y, const Real& z, const ID& i) > function_Type

boost function

Definition at line 190 of file ElectroETAMonodomainSolver.hpp.

◆ matrixSmall_Type

3x3 matrix

Definition at line 193 of file ElectroETAMonodomainSolver.hpp.

Constructor & Destructor Documentation

◆ ElectroETAMonodomainSolver() [1/5]

Empty Constructor.

Constructors.

Empty constructor

Definition at line 1419 of file ElectroETAMonodomainSolver.hpp.

◆ ElectroETAMonodomainSolver() [2/5]

ElectroETAMonodomainSolver ( GetPot dataFile,
ionicModelPtr_Type  model,
meshPtr_Type  meshPtr 
)

Constructor.

Parameters
GetPotdatafile (for preconditioner)
std::shared_ptr<IonicModel>chosen ionic model pointer
std::shared_ptr<Mesh>Pointer to the partitioned mesh

Definition at line 1451 of file ElectroETAMonodomainSolver.hpp.

◆ ElectroETAMonodomainSolver() [3/5]

ElectroETAMonodomainSolver ( std::string  meshName,
std::string  meshPath,
GetPot dataFile,
ionicModelPtr_Type  model 
)

Constructor.

constructor

Parameters
meshNamefile name of the mesh
meshPathpath to the mesh
datafileGetPot file to setup the preconditioner
modelshared pointer to the chosen ionic model

Definition at line 1428 of file ElectroETAMonodomainSolver.hpp.

◆ ElectroETAMonodomainSolver() [4/5]

ElectroETAMonodomainSolver ( std::string  meshName,
std::string  meshPath,
GetPot dataFile,
ionicModelPtr_Type  model,
commPtr_Type  comm 
)

Constructor.

constructor with communicator

Parameters
stringfile name of the mesh
stringpath to the mesh
GetPotdatafile (for preconditioner)
std::shared_ptr<IonicModel>chosen ionic model pointer
std::shared_ptr<Epetra_Comm>Epetra communicator

Definition at line 1440 of file ElectroETAMonodomainSolver.hpp.

◆ ElectroETAMonodomainSolver() [5/5]

ElectroETAMonodomainSolver ( const ElectroETAMonodomainSolver< Mesh, IonicModel > &  solver)

Copy Constructor.

Copy constructor.

Parameters
ElectroETAmonodomainSolverobject

Definition at line 1462 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ ~ElectroETAMonodomainSolver()

virtual ~ElectroETAMonodomainSolver ( )
inlinevirtual

Destructor.

Definition at line 249 of file ElectroETAMonodomainSolver.hpp.

Member Function Documentation

◆ operator=()

ElectroETAMonodomainSolver< Mesh, IonicModel > & operator= ( const ElectroETAMonodomainSolver< Mesh, IonicModel > &  solver)

Operator=()

Assignment operator.

Parameters
ElectroETAmonodomainSolverobject

Definition at line 1497 of file ElectroETAMonodomainSolver.hpp.

◆ surfaceVolumeRatio()

const Real& surfaceVolumeRatio ( ) const
inline

get the surface to volume ratio

Not used in the code ( implicit definition inside the diffusion tensor)

Definition at line 262 of file ElectroETAMonodomainSolver.hpp.

◆ initialTime()

const Real& initialTime ( ) const
inline

get the initial time (by default 0)

Definition at line 268 of file ElectroETAMonodomainSolver.hpp.

◆ timeStep()

const Real& timeStep ( ) const
inline

get the final time

Definition at line 274 of file ElectroETAMonodomainSolver.hpp.

◆ endTime()

const Real& endTime ( ) const
inline

get the time step

Definition at line 280 of file ElectroETAMonodomainSolver.hpp.

◆ diffusionTensor()

const VectorSmall<3>& diffusionTensor ( ) const
inline

get the diagonal diffusion tensor

Definition at line 286 of file ElectroETAMonodomainSolver.hpp.

◆ elementsOrder()

const std::string elementsOrder ( ) const
inline

get the order of the elements

Definition at line 292 of file ElectroETAMonodomainSolver.hpp.

◆ ionicModelPtr()

const ionicModelPtr_Type ionicModelPtr ( ) const
inline

get the pointer to the ionic model

Definition at line 298 of file ElectroETAMonodomainSolver.hpp.

◆ commPtr()

const commPtr_Type commPtr ( ) const
inline

get the pointer to the Epetra communicator

Definition at line 304 of file ElectroETAMonodomainSolver.hpp.

◆ localMeshPtr() [1/2]

const meshPtr_Type localMeshPtr ( ) const
inline

get the pointer to the partitioned mesh

Definition at line 310 of file ElectroETAMonodomainSolver.hpp.

◆ localMeshPtr() [2/2]

meshPtr_Type localMeshPtr ( )
inline

get the pointer to the partitioned mesh

Definition at line 316 of file ElectroETAMonodomainSolver.hpp.

◆ fullMeshPtr()

const meshPtr_Type fullMeshPtr ( ) const
inline

get the pointer to the partitioned mesh

Definition at line 322 of file ElectroETAMonodomainSolver.hpp.

◆ ETFESpacePtr()

const ETFESpacePtr_Type ETFESpacePtr ( ) const
inline

get the pointer to the ETA finite element space

Definition at line 328 of file ElectroETAMonodomainSolver.hpp.

◆ feSpacePtr()

const feSpacePtr_Type feSpacePtr ( ) const
inline

get the pointer to the usual finite element space

Definition at line 334 of file ElectroETAMonodomainSolver.hpp.

◆ massMatrixPtr()

const matrixPtr_Type massMatrixPtr ( ) const
inline

get the pointer to the mass matrix

Definition at line 340 of file ElectroETAMonodomainSolver.hpp.

◆ fullMassMatrixPtr()

const matrixPtr_Type fullMassMatrixPtr ( ) const
inline

get the pointer to the mass matrix

Definition at line 346 of file ElectroETAMonodomainSolver.hpp.

◆ stiffnessMatrixPtr()

const matrixPtr_Type stiffnessMatrixPtr ( ) const
inline

get the pointer to the stiffness matrix

Definition at line 352 of file ElectroETAMonodomainSolver.hpp.

◆ globalMatrixPtr()

const matrixPtr_Type globalMatrixPtr ( ) const
inline

get the pointer to the global matrix

\[ A = \frac{M}{\Delta t} + K(\mathbf{f}) \]

Definition at line 363 of file ElectroETAMonodomainSolver.hpp.

◆ rhsPtr()

const vectorPtr_Type rhsPtr ( ) const
inline

get the pointer to the right hand side

Definition at line 369 of file ElectroETAMonodomainSolver.hpp.

◆ rhsPtrUnique()

const vectorPtr_Type rhsPtrUnique ( ) const
inline

get the pointer to the unique version of the right hand side

Definition at line 375 of file ElectroETAMonodomainSolver.hpp.

◆ potentialPtr()

const vectorPtr_Type potentialPtr ( ) const
inline

get the pointer to the transmembrane potential

Definition at line 381 of file ElectroETAMonodomainSolver.hpp.

◆ fiberPtr() [1/2]

const vectorPtr_Type fiberPtr ( ) const
inline

get the pointer to the fiber vector

Definition at line 387 of file ElectroETAMonodomainSolver.hpp.

◆ fiberPtr() [2/2]

vectorPtr_Type fiberPtr ( )
inline

get the pointer to the fiber vector

Definition at line 393 of file ElectroETAMonodomainSolver.hpp.

◆ appliedCurrentPtr()

const vectorPtr_Type appliedCurrentPtr ( )
inline

get the pointer to the applied current vector

Definition at line 399 of file ElectroETAMonodomainSolver.hpp.

◆ linearSolverPtr()

const linearSolverPtr_Type linearSolverPtr ( ) const
inline

get the pointer to the linear solver

Definition at line 405 of file ElectroETAMonodomainSolver.hpp.

◆ globalSolution()

const vectorOfPtr_Type& globalSolution ( ) const
inline

get the pointer to the vector of pointers containing the transmembrane potential (at 0) and the gating variables

Definition at line 411 of file ElectroETAMonodomainSolver.hpp.

◆ globalRhs()

const vectorOfPtr_Type& globalRhs ( ) const
inline

get the pointer to the vector of pointers containing the rhs for transmembrane potential (at 0) and the gating variables

Definition at line 417 of file ElectroETAMonodomainSolver.hpp.

◆ lumpedMassMatrix()

bool lumpedMassMatrix ( ) const
inline

getter for the boolean to know if we want a lumped matrix

Definition at line 423 of file ElectroETAMonodomainSolver.hpp.

◆ setSurfaceVolumeRatio()

void setSurfaceVolumeRatio ( const Real surfaceVolumeRatio)
inline

set the surface to volume ratio

Parameters
surfaceVolumeRatiosurface to volume ratio

Definition at line 436 of file ElectroETAMonodomainSolver.hpp.

◆ setInitialTime()

void setInitialTime ( const Real initialTime)
inline

set the starting time

Parameters
initialTimeinitial time

Definition at line 445 of file ElectroETAMonodomainSolver.hpp.

◆ setTimeStep()

void setTimeStep ( const Real timeStep)
inline

set the ending time

Parameters
timeStepending time

Definition at line 454 of file ElectroETAMonodomainSolver.hpp.

◆ setEndTime()

void setEndTime ( const Real endTime)
inline

set the time step

Parameters
endTimetime step

Definition at line 463 of file ElectroETAMonodomainSolver.hpp.

◆ setDiffusionTensor()

void setDiffusionTensor ( const VectorSmall< 3 > &  diffusionTensor)
inline

set the diagonal diffusion tensor

Parameters
diffusionTensordiagonal diffusion tensor

Definition at line 472 of file ElectroETAMonodomainSolver.hpp.

◆ setIonicModelPtr()

void setIonicModelPtr ( const ionicModelPtr_Type  ionicModelPtr)
inline

set the pointer to the ionic model

Parameters
ionicModelPtrpointer to the ionic model

Definition at line 481 of file ElectroETAMonodomainSolver.hpp.

◆ setIonicModel()

void setIonicModel ( const ionicModel_Type ionicModel)
inline

set ionic model

Parameters
ionicModelionic model

Definition at line 490 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ setCommPtr()

void setCommPtr ( const commPtr_Type  commPtr)
inline

set the pointer to the Epetra communicator

Parameters
commPtrpointer to the Epetra communicator

Definition at line 500 of file ElectroETAMonodomainSolver.hpp.

◆ setComm()

void setComm ( const comm_Type comm)
inline

set the Epetra communicator

Parameters
commEpetra communicator

Definition at line 508 of file ElectroETAMonodomainSolver.hpp.

◆ setLocalMeshPtr()

void setLocalMeshPtr ( const meshPtr_Type  localMeshPtr)
inline

set the pointer to the partitioned mesh

Parameters
localMeshPtrpointer to the partitioned mesh

Definition at line 517 of file ElectroETAMonodomainSolver.hpp.

◆ setLocalMesh()

void setLocalMesh ( const mesh_Type localMesh)
inline

set the partitioned mesh

Parameters
localMeshpartitioned mesh

Definition at line 526 of file ElectroETAMonodomainSolver.hpp.

◆ setFullMeshPtr()

void setFullMeshPtr ( const meshPtr_Type  fullMeshPtr)
inline

set the pointer to the non partitioned mesh

Parameters
fullMeshPtrpointer to the partitioned mesh

Definition at line 536 of file ElectroETAMonodomainSolver.hpp.

◆ setFullMesh()

void setFullMesh ( const mesh_Type fullMesh)
inline

set the non partitioned mesh

Parameters
fullMeshpointer to the partitioned mesh

Definition at line 544 of file ElectroETAMonodomainSolver.hpp.

◆ setETFESpacePtr()

void setETFESpacePtr ( const ETFESpacePtr_Type  ETFESpacePtr)
inline

set the pointer to the ETA fe space

Parameters
ETFESpacePtrpointer to the ETA fe space

Definition at line 554 of file ElectroETAMonodomainSolver.hpp.

◆ setETFESpace()

void setETFESpace ( const ETFESpace_Type ETFESpace)
inline

set the scalar ETA fe space

Parameters
ETFESpacescalar ETA fe space

Definition at line 563 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ setFeSpacePtr()

void setFeSpacePtr ( const feSpacePtr_Type  feSpacePtr)
inline

set the pointer to the usual fe space

Parameters
feSpacePtrpointer to the usual fe space

Definition at line 572 of file ElectroETAMonodomainSolver.hpp.

◆ setFeSpace()

void setFeSpace ( const feSpace_Type feSpace)
inline

set the fe space

Parameters
feSpacethe fe space

Definition at line 581 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ setMassMatrixPtr()

void setMassMatrixPtr ( const matrixPtr_Type  massMatrixPtr)
inline

set the pointer to the mass matrix

Parameters
massMatrixPtrpointer to the mass matrix

Definition at line 591 of file ElectroETAMonodomainSolver.hpp.

◆ setMassMatrix()

void setMassMatrix ( const matrix_Type massMatrix)
inline

set the mass matrix

Parameters
massMatrixthe mass matrix

Definition at line 600 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ setFullMassMatrixPtr()

void setFullMassMatrixPtr ( const matrixPtr_Type  fullMassMatrixPtr)
inline

set the pointer to the full mass matrix

Parameters
massMatrixPtrpointer to the mass matrix

Definition at line 609 of file ElectroETAMonodomainSolver.hpp.

◆ setFullMassMatrix()

void setFullMassMatrix ( const matrix_Type fullMassMatrix)
inline

set the full mass matrix

Parameters
massMatrixthe mass matrix

Definition at line 618 of file ElectroETAMonodomainSolver.hpp.

◆ setStiffnessMatrixPtr()

void setStiffnessMatrixPtr ( const matrixPtr_Type  stiffnessMatrixPtr)
inline

set the pointer to the stiffness matrix

Parameters
stiffnessMatrixPtrpointer to the stiffness matrix

Definition at line 627 of file ElectroETAMonodomainSolver.hpp.

◆ setStiffnessMatrix()

void setStiffnessMatrix ( const matrix_Type stiffnessMatrix)
inline

set the stiffness matrix

Parameters
stiffnessMatrixthe stiffness matrix

Definition at line 636 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ setGlobalMatrixPtr()

void setGlobalMatrixPtr ( const matrixPtr_Type  globalMatrixPtr)
inline

set the pointer to the global matrix

Parameters
globalMatrixpointer to the global matrix

Definition at line 646 of file ElectroETAMonodomainSolver.hpp.

◆ setGlobalMatrix()

void setGlobalMatrix ( const matrix_Type globalMatrix)
inline

set the global matrix

Parameters
globalMatrixthe global matrix

Definition at line 655 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ setRhsPtr()

void setRhsPtr ( const vectorPtr_Type  rhsPtr)
inline

set the pointer to the right hand side

Parameters
rhsPtrpointer to the right hand side

Definition at line 665 of file ElectroETAMonodomainSolver.hpp.

◆ setRhs()

void setRhs ( const vector_Type rhs)
inline

set the right hand side

Parameters
rhsthe right hand side

Definition at line 674 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ setRhsPtrUnique()

void setRhsPtrUnique ( const vectorPtr_Type  rhsPtrUnique)
inline

set the pointer to the unique version of the right hand side

Parameters
rhsPtrUniquepointer to the unique version of the right hand side

Definition at line 684 of file ElectroETAMonodomainSolver.hpp.

◆ setRhsUnique()

void setRhsUnique ( const vector_Type rhsPtrUnique)
inline

set the unique version of the right hand side

Parameters
rhsPtrUniquethe unique version of the right hand side

Definition at line 694 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ setPotentialPtr()

void setPotentialPtr ( const vectorPtr_Type  potentialPtr)
inline

set the pointer to the potential

Parameters
potentialPtrpointer to the potential

Definition at line 703 of file ElectroETAMonodomainSolver.hpp.

◆ setPotential()

void setPotential ( const vector_Type potential)
inline

set the potential

Parameters
potentialthe potential

Definition at line 713 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ setAppliedCurrentPtr()

void setAppliedCurrentPtr ( const vectorPtr_Type  appliedCurrentPtr)
inline

set the pointer to the applied current vector

Parameters
appliedCurrentPtrpointer to the applied current vector

Definition at line 722 of file ElectroETAMonodomainSolver.hpp.

◆ setAppliedCurrent()

void setAppliedCurrent ( const vector_Type appliedCurrent)
inline

set the applied current vector

Parameters
appliedCurrentthe applied current vector

Definition at line 731 of file ElectroETAMonodomainSolver.hpp.

◆ setLinearSolverPtr()

void setLinearSolverPtr ( const linearSolverPtr_Type  linearSolverPtr)
inline

set the pointer to the linear solver

Parameters
linearSolverPtrpointer to the linear solver

Definition at line 740 of file ElectroETAMonodomainSolver.hpp.

◆ setLinearSolver()

void setLinearSolver ( const linearSolver_Type linearSolver)
inline

set the linear solver

Parameters
linearSolverthe linear solver

Definition at line 749 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ setGlobalSolutionPtrs()

void setGlobalSolutionPtrs ( const vectorOfPtr_Type globalSolution)
inline

set the vector of pointers containing the transmembrane potential (at 0) and the gating variables

Parameters
globalSolutionvector of pointers containing the transmembrane potential (at 0) and the gating variables

Definition at line 758 of file ElectroETAMonodomainSolver.hpp.

◆ setGlobalSolution()

void setGlobalSolution ( const vectorOfPtr_Type globalSolution)
inline

set the vectors of unknowns: containing the transmembrane potential (at 0) and the gating variables

Parameters
pvector of pointers containing the transmembrane potential (at 0) and the gating variables

Definition at line 767 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ setVariablePtr() [1/2]

void setVariablePtr ( const vectorPtr_Type  gatingVariable,
int  j 
)
inline

set the pointer to the [j]-th gating variable

Parameters
gatingVariablepointer to the gating variable
jindex of the gating variable

Definition at line 780 of file ElectroETAMonodomainSolver.hpp.

◆ setVariablePtr() [2/2]

void setVariablePtr ( const vector_Type gatingVariable,
int  j 
)
inline

set the [j]-th gating variable

Parameters
gatingVariablethe gating variable
jindex of the gating variable

Definition at line 790 of file ElectroETAMonodomainSolver.hpp.

◆ setGlobalRhsPtrs()

void setGlobalRhsPtrs ( const vectorOfPtr_Type globalRhs)
inline

set the vector of pointers containing the rhs for the transmembrane potential (at 0) and the gating variables

Parameters
globalRhsvector of pointers containing the rhs for the transmembrane potential (at 0) and the gating variables

Definition at line 799 of file ElectroETAMonodomainSolver.hpp.

◆ setGlobalRhs()

void setGlobalRhs ( const vectorOfPtr_Type globalRhs)
inline

set the vectors containing the rhs for the transmembrane potential (at 0) and the gating variables

Parameters
globalRhsvector of pointers containing the rhs for the transmembrane potential (at 0) and the gating variables

Definition at line 808 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ setFiberPtr()

void setFiberPtr ( const vectorPtr_Type  fiberPtr)
inline

set the pointer to the fiber direction vector

Parameters
fiberPtrpointer to the fiber direction vector

Definition at line 820 of file ElectroETAMonodomainSolver.hpp.

◆ setFiber()

void setFiber ( const vector_Type fiber)
inline

set the fiber direction vector

Parameters
fiberthe fiber direction vector

Definition at line 829 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ setLumpedMassMatrix()

void setLumpedMassMatrix ( bool  isLumped)
inline

set the the choice of lumping

Parameters
isLumpedtrue if you want to lump the mass matrix

Definition at line 838 of file ElectroETAMonodomainSolver.hpp.

◆ setup() [1/2]

void setup ( GetPot dataFile,
short int  ionicSize 
)
virtual

setup method used in the constructor

Parameters
dataFileneeded to set up the preconditioner
ionicSizenumber of equation in the ionic model

Definition at line 1619 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ setup() [2/2]

void setup ( std::string  meshName,
std::string  meshPath,
GetPot dataFile,
short int  ionicSize 
)
virtual

setup method used in the constructor

Parameters
meshFilefilename of the mesh
meshPathdirectory where we have the mesh
dataFileneeded to set up the preconditioner
ionicSizenumber of equation in the ionic model

Definition at line 1659 of file ElectroETAMonodomainSolver.hpp.

◆ setupMassMatrix()

void setupMassMatrix ( )

create mass matrix

Computes the mass matrix calling different methods if the mass should be lumped

Definition at line 1670 of file ElectroETAMonodomainSolver.hpp.

◆ setupLumpedMassMatrix()

void setupLumpedMassMatrix ( )

create mass matrix

create mass matrix

Computes the lumped mass matrix by nodal integration.

Definition at line 1697 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ setupStiffnessMatrix() [1/2]

void setupStiffnessMatrix ( )
virtual

create stiffness matrix

Computes the stiffness matrix calling different methods

Definition at line 1719 of file ElectroETAMonodomainSolver.hpp.

◆ setupStiffnessMatrix() [2/2]

void setupStiffnessMatrix ( VectorSmall< 3 >  diffusion)

create stiffness matrix given a diagonal diffusion tensor

Parameters
diffusionvector defining the conductivities

Definition at line 1725 of file ElectroETAMonodomainSolver.hpp.

◆ setupGlobalMatrix()

void setupGlobalMatrix ( )

setup the total matrix

\[ A = C_m\frac{M}{\Delta t} + K(\mathbf{f}) \]

where is the membrane capacitance, t the timestep, M is the mass matrix and K is the stiffness matrix which depends on the fiber direction.

Definition at line 1759 of file ElectroETAMonodomainSolver.hpp.

◆ setupLinearSolver()

void setupLinearSolver ( GetPot  dataFile)

setup the linear solver

A file named MonodomainSolverParamList.xml must be in the execution folder with the parameters to set the linear solver

Parameters
dataFileGetPot to setup the preconditioners

Definition at line 1768 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ initializePotential()

void initializePotential ( Real  k = 0.0)
inline

Initialize the potential to the value k.

Parameters
kvalue to intialize the potential

Definition at line 913 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ initializeAppliedCurrent()

void initializeAppliedCurrent ( Real  k = 0.0)
inline

Initialize the applied current to the value k.

Parameters
kvalue to intialize the applied current

Definition at line 922 of file ElectroETAMonodomainSolver.hpp.

◆ setupGlobalSolution()

void setupGlobalSolution ( short int  ionicSize)

creates a vector of pointers to store the solution

The first pointer points to the vector of the transmembrane potential, while the others point to the gating variables

Parameters
ionicSizenumber of unknowns in the ionic model

Definition at line 1791 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ setupGlobalRhs()

void setupGlobalRhs ( short int  ionicSize)

creates a vector of pointers to store the rhs

The first pointer points to the rhs of the transmembrane potential, while the others point to the rhs of the gating variables

Parameters
ionicSizenumber of unknowns in the ionic model

Definition at line 1803 of file ElectroETAMonodomainSolver.hpp.

+ Here is the caller graph for this function:

◆ setParameters() [1/2]

void setParameters ( list_Type  list)

Set parameters from an xml file.

Parameters
listTeuchos parameter list with the monodomain parameters

Definition at line 2356 of file ElectroETAMonodomainSolver.hpp.

◆ partitionMesh()

void partitionMesh ( std::string  meshName,
std::string  meshPath 
)
inline

partition the mesh

Parameters
meshNamefilename of the mesh
meshPathpath to the folder where you have the mesh

Definition at line 954 of file ElectroETAMonodomainSolver.hpp.

◆ setPotentialFromFunction()

void setPotentialFromFunction ( function_Type f,
Real  time = 0.0 
)
inline

given a boost function initialize the potential

Parameters
ffunction defining the potential
timetime at which we want to evaluate the function

Definition at line 964 of file ElectroETAMonodomainSolver.hpp.

◆ setAppliedCurrentFromFunction()

void setAppliedCurrentFromFunction ( function_Type f,
Real  time = 0.0 
)
inline

given a boost function initialize the applied current

Parameters
ffunction defining the applied current
timetime at which we want to evaluate the function

Definition at line 976 of file ElectroETAMonodomainSolver.hpp.

◆ setAppliedCurrentFromElectroStimulus()

void setAppliedCurrentFromElectroStimulus ( ElectroStimulus stimulus,
Real  time = 0.0 
)
inline

given a ElectroStimulus object initialize the applied current

Parameters
stimuluspacing protocol
timetime at which we want to evaluate the stimulus

Definition at line 987 of file ElectroETAMonodomainSolver.hpp.

◆ solveOneReactionStepFE() [1/2]

void solveOneReactionStepFE ( int  subiterations = 1)

Solves one reaction step using the forward Euler scheme and N subiterations.

\[ \mathbf{V}^* = \mathbf{V}^{n+k/N} + \frac{\Delta t}{N} I_{ion}(\mathbf{V}^{n+k/N}), \quad k=0,\dots,N-1. \]

Parameters
intnumber of subiterations

Definition at line 1845 of file ElectroETAMonodomainSolver.hpp.

◆ solveOneReactionStepFE() [2/2]

void solveOneReactionStepFE ( matrix_Type mass,
int  subiterations = 1 
)

Solves one reaction step using the forward Euler scheme.

\[ \mathbf{V}^* = \mathbf{V}^{n+k/N} + \frac{\Delta t}{N} M I_{ion}(\mathbf{V}^{n+k/N}), \quad k=0,\dots,N-1. \]

Parameters
matrix_Typefull mass matrix
intnumber of subiterations

Definition at line 1863 of file ElectroETAMonodomainSolver.hpp.

◆ solveOneReactionStepRL()

void solveOneReactionStepRL ( int  subiterations = 1)

Solves one reaction step using the Rush-Larsen scheme.

Parameters
intnumber of subiterations

Definition at line 1886 of file ElectroETAMonodomainSolver.hpp.

◆ updateRhs()

void updateRhs ( )
inline

Update the rhs.

\[ rhs \leftarrow C_m \frac{M}{\Delta t} \mathbf{V}^n \]

Definition at line 1029 of file ElectroETAMonodomainSolver.hpp.

◆ solveOneDiffusionStepBDF2()

void solveOneDiffusionStepBDF2 ( vectorPtr_Type  previousPotentialPtr)

Solves one diffusion step using the BDF2 scheme.

\[ ( \frac{3}{\Delta t}M + A ) V^{n+1} = \frac{1}{\Delta t}M(4 V^n -V^{n-1}) \]

Parameters
previousPotentialPtrpotential at n-1

Definition at line 1906 of file ElectroETAMonodomainSolver.hpp.

◆ solveOneDiffusionStepBE()

void solveOneDiffusionStepBE ( )

Solves one diffusion step using the backward Euler scheme.

\[ A\mathbf{V}^{n+1} = \left( C_m \frac{M}{\Delta t} + K(\mathbf{f}) \right)\mathbf{V}^{n+1} =\frac{M}{\Delta t} \mathbf{V}^*. \]

Definition at line 1925 of file ElectroETAMonodomainSolver.hpp.

◆ solveOneSplittingStep() [1/2]

void solveOneSplittingStep ( )

Solve one full step with operator splitting.

\[ \mathbf{V}^* = \mathbf{V}^n + \Delta t I_{ion}(\mathbf{V}^n). \]

\[ A\mathbf{V}^{n+1} = \left( \frac{M}{\Delta t} + K(\mathbf{f}) \right)\mathbf{V}^{n+1} =\frac{M}{\Delta t} \mathbf{V}^*. \]

Definition at line 1932 of file ElectroETAMonodomainSolver.hpp.

◆ solveSplitting() [1/3]

void solveSplitting ( )

Solve the system with operator splitting from M_initialTime to the M_endTime with time step M_timeStep.

Definition at line 1949 of file ElectroETAMonodomainSolver.hpp.

◆ solveOneSplittingStep() [2/2]

void solveOneSplittingStep ( IOFile_Type exporter,
Real  t 
)

Solve one full step with operator splitting and export the solution.

\[ \mathbf{V}^* = \mathbf{V}^n + \Delta t I_{ion}(\mathbf{V}^n). \]

\[ A\mathbf{V}^{n+1} = \left( \frac{M}{\Delta t} + K(\mathbf{f}) \right)\mathbf{V}^{n+1} =\frac{M}{\Delta t} \mathbf{V}^*. \]

Parameters
exporterwhere you want to save the solution
ttime at which we save the solution

Definition at line 1941 of file ElectroETAMonodomainSolver.hpp.

◆ solveSplitting() [2/3]

void solveSplitting ( IOFile_Type exporter)

Solve the system with operator splitting from M_initialTime to the M_endTime with time step M_timeStep and export the solution.

Parameters
exporterwhere you want to save the solution

Definition at line 1959 of file ElectroETAMonodomainSolver.hpp.

◆ solveSplitting() [3/3]

void solveSplitting ( IOFile_Type exporter,
Real  dt 
)

Solve the system with operator splitting from M_initialTime to the M_endTime with time step M_timeStep and export the solution every dt.

Parameters
exporterwhere you want to save the solution
ttime at which we save the solution

Definition at line 1973 of file ElectroETAMonodomainSolver.hpp.

◆ setupPotentialExporter()

void setupPotentialExporter ( IOFile_Type exporter,
std::string  fileName = "Potential" 
)

add to a given exporter the pointer to the potential saved with name fileName

Parameters
exporterwhere you want to save the solution
ttime at which we save the solution

Definition at line 1816 of file ElectroETAMonodomainSolver.hpp.

◆ setupExporter()

void setupExporter ( IOFile_Type exporter,
std::string  fileName = "output",
std::string  folder = "./" 
)

add to a given exporter the pointer to the potential and to the gating variables saved with name fileName

Parameters
exporterwhere you want to save the solution
fileNamename of the file we wish to export
folderdirectory where to save the solution

Definition at line 1827 of file ElectroETAMonodomainSolver.hpp.

◆ setupFibers() [1/4]

void setupFibers ( )

Generates a default fiber direction (0,1,0)

Definition at line 1535 of file ElectroETAMonodomainSolver.hpp.

◆ setupFibers() [2/4]

void setupFibers ( VectorSmall< 3 >  fibers)

Generates the fiber direction given the three component of the vector (F_x,F_y,F_z)

Parameters
fibersvector with the fiber direction

Definition at line 1555 of file ElectroETAMonodomainSolver.hpp.

◆ setupFibers() [3/4]

void setupFibers ( std::string  fibersFile,
const std::string &  filePath = "./" 
)
inline

Imports the fiber direction from a hdf5 file.

Parameters
fibersFilename of the hdf5 file with the fibers

Definition at line 1125 of file ElectroETAMonodomainSolver.hpp.

◆ setupFibers() [4/4]

void setupFibers ( std::string  fibersFile,
std::string  directory,
int  format = 0 
)
inline

Imports the fiber direction from a vtk file ( format = 0), or text file.

Parameters
fibersFilename of the file with the fibers
directoryfolder in which we have the file for the fibers
formatformat in which fibers are saved

format 0 = fibers saved as (fx, fy, fz) in each row

format 1 = fibers saved as fx in each row for all the mesh fy in each row for all the mesh fz in each row for all the mesh

Definition at line 1142 of file ElectroETAMonodomainSolver.hpp.

◆ solveOneStepGatingVariablesFE()

void solveOneStepGatingVariablesFE ( )

Solves the gating variables with forward Euler.

Definition at line 2002 of file ElectroETAMonodomainSolver.hpp.

◆ solveOneStepGatingVariablesRL()

void solveOneStepGatingVariablesRL ( )

Solves the gating variables with Rush-Larsen scheme.

Definition at line 2014 of file ElectroETAMonodomainSolver.hpp.

◆ computeRhsSVI()

void computeRhsSVI ( )

Compute the rhs using state variable interpolation.

Definition at line 2053 of file ElectroETAMonodomainSolver.hpp.

◆ computeRhsICI()

void computeRhsICI ( )

Compute the rhs using ionic current interpolation.

Definition at line 2030 of file ElectroETAMonodomainSolver.hpp.

◆ computeRhsICIWithFullMass()

void computeRhsICIWithFullMass ( )

Compute the rhs using ionic current interpolation.

This method is useful to solve ICI without lumping the mass matrix in fron of the reaction term. Lump the mass matrix, and pass as argument a full mass matrix

Definition at line 2038 of file ElectroETAMonodomainSolver.hpp.

◆ solveOneICIStep() [1/2]

void solveOneICIStep ( )
virtual

Solve one full step with ionic current interpolation.

\[ A\mathbf{V}^{n+1} = \left( \frac{M}{\Delta t} + K(\mathbf{f}) \right)\mathbf{V}^{n+1} =\frac{M}{\Delta t} \mathbf{V}^n+M\mathbf{I}, \]

where ${I}$ is the vector of the ionic currents $I_j = I_{ion}(V_j^n)$

Definition at line 2065 of file ElectroETAMonodomainSolver.hpp.

◆ solveOneICIStepWithFullMass() [1/2]

void solveOneICIStepWithFullMass ( )

solves using ionic current interpolation

This method is useful to solve ICI without lumping the mass matrix in front of the reaction term. Lump the mass matrix, and pass as argument a full mass matrix

Definition at line 2073 of file ElectroETAMonodomainSolver.hpp.

◆ solveOneSVIStep() [1/2]

void solveOneSVIStep ( )

Solve one full step with state variable interpolation.

\[ A\mathbf{V}^{n+1} = \left( \frac{M}{\Delta t} + K(\mathbf{f}) \right)\mathbf{V}^{n+1} =\frac{M}{\Delta t} \mathbf{V}^n+\mathbf{I}_{ion}(\mathbf{V}^n). \]

Definition at line 2081 of file ElectroETAMonodomainSolver.hpp.

◆ solveICI() [1/3]

void solveICI ( )

solve system using ICI from M_initialTime to the M_endTime with time step M_timeStep

Definition at line 2089 of file ElectroETAMonodomainSolver.hpp.

◆ solveSVI() [1/3]

void solveSVI ( )

solve system using SVI from M_initialTime to the M_endTime with time step M_timeStep

Definition at line 2100 of file ElectroETAMonodomainSolver.hpp.

◆ solveOneICIStep() [2/2]

void solveOneICIStep ( IOFile_Type exporter,
Real  t 
)

Solve one full step with ionic current interpolation and export the solution.

\[ A\mathbf{V}^{n+1} = \left( \frac{M}{\Delta t} + K(\mathbf{f}) \right)\mathbf{V}^{n+1} =\frac{M}{\Delta t} \mathbf{V}^n+M\mathbf{I}, \]

where ${I}$ is the vector of the ionic currents $I_j = I_{ion}(V_j^n)$

Parameters
exporterwhere we want to save the solution
ttime at wich we save the solution

Definition at line 2111 of file ElectroETAMonodomainSolver.hpp.

◆ solveOneICIStepWithFullMass() [2/2]

void solveOneICIStepWithFullMass ( IOFile_Type exporter,
Real  t 
)

Solve one full step with ionic current interpolation and export the solution.

\[ A\mathbf{V}^{n+1} = \left( \frac{M}{\Delta t} + K(\mathbf{f}) \right)\mathbf{V}^{n+1} =\frac{M}{\Delta t} \mathbf{V}^n+M\mathbf{I}, \]

where ${I}$ is the vector of the ionic currents $I_j = I_{ion}(V_j^n)$ This method is useful to solve ICI without lumping the mass matrix in front of the reaction term. Lump the mass matrix, and pass as argument a full mass matrix

Parameters
exporterwhere we want to save the solution
ttime at wich we save the solution

Definition at line 2119 of file ElectroETAMonodomainSolver.hpp.

◆ solveOneSVIStep() [2/2]

void solveOneSVIStep ( IOFile_Type exporter,
Real  t 
)

Solve one full step with ionic current interpolation and export the solution.

\[ A\mathbf{V}^{n+1} = \left( \frac{M}{\Delta t} + K(\mathbf{f}) \right)\mathbf{V}^{n+1} =\frac{M}{\Delta t} \mathbf{V}^n+\mathbf{I}_{ion}(\mathbf{V}^n). \]

Parameters
exporterwhere we want to save the solution
ttime at wich we save the solution

Definition at line 2127 of file ElectroETAMonodomainSolver.hpp.

◆ solveICI() [2/3]

void solveICI ( IOFile_Type exporter)

solve system using ICI from M_initialTime to the M_endTime with time step M_timeStep and export the solution

Parameters
exporterwhere we want to save the solution

Definition at line 2135 of file ElectroETAMonodomainSolver.hpp.

◆ solveSVI() [2/3]

void solveSVI ( IOFile_Type exporter)

solve system using SVI from M_initialTime to the M_endTime with time step M_timeStep and export the solution

Parameters
exporterwhere we want to save the solution

Definition at line 2153 of file ElectroETAMonodomainSolver.hpp.

◆ solveICI() [3/3]

void solveICI ( IOFile_Type exporter,
Real  dt 
)

Solve the system using ICI from M_initialTime to the M_endTime with time step M_timeStep and export the solution every dt.

Parameters
exporterwhere we want to save the solution
ttime at wich we save the solution

Definition at line 2165 of file ElectroETAMonodomainSolver.hpp.

◆ solveICIWithFullMass()

void solveICIWithFullMass ( IOFile_Type exporter,
Real  dt 
)

Solve the system using ICI from M_initialTime to the M_endTime with time step M_timeStep and export the solution every dt.

This method is useful to solve ICI without lumping the mass matrix in front of the reaction term. Lump the mass matrix, and pass as argument a full mass matrix

Parameters
exporterwhere we want to save the solution
ttime at wich we save the solution

Definition at line 2201 of file ElectroETAMonodomainSolver.hpp.

◆ solveSVI() [3/3]

void solveSVI ( IOFile_Type exporter,
Real  dt 
)

Solve the using SVI from M_initialTime to the M_endTime with time step M_timeStep and export the solution every dt.

Parameters
exporterwhere we want to save the solution
ttime at wich we save the solution

Definition at line 2243 of file ElectroETAMonodomainSolver.hpp.

◆ exportFiberDirection() [1/2]

void exportFiberDirection ( std::string  postDir = "./")

Generates a file where the fiber direction is saved.

Parameters
postDirdirectory in which we save the fibers

Definition at line 1568 of file ElectroETAMonodomainSolver.hpp.

◆ exportFiberDirection() [2/2]

void exportFiberDirection ( IOFile_Type exporter)

save the fiber direction into the given exporter

Parameters
exporterwhere we want to save the solution

Definition at line 1586 of file ElectroETAMonodomainSolver.hpp.

◆ exportSolution()

void exportSolution ( IOFile_Type exporter,
Real  t 
)
inline

Save the solution in the exporter.

Parameters
exporterwhere we want to save the solution
ttime at wich we save the solution

Definition at line 1288 of file ElectroETAMonodomainSolver.hpp.

◆ importSolution()

void importSolution ( std::string  prefix,
std::string  postDir,
Real  time = 0.0 
)

Importer: lead a solution from an hdf5 file.

Parameters
prefixname of the hdf5 file to import
postDirfolder where the file to import is
timetime at wich we want to import the solution

Definition at line 1599 of file ElectroETAMonodomainSolver.hpp.

◆ setInitialConditions()

void setInitialConditions ( )
inline

Initialize the solution with resting values of the ionic model.

Definition at line 1302 of file ElectroETAMonodomainSolver.hpp.

◆ registerActivationTime()

void registerActivationTime ( vector_Type activationTimeVector,
Real  time,
Real  threshold = 0.0 
)

save the fiber direction into the given exporter

The activationTimeVector is required to be initialized with negative values

Parameters
activationTimeVectorvector where we register the activation time
timetime at which we are
thresholdvalue for which we consider activation

Definition at line 2273 of file ElectroETAMonodomainSolver.hpp.

◆ setVerbosity()

void setVerbosity ( bool  verbose)

set the verbosity

Parameters
verboseshow additional output

Definition at line 2372 of file ElectroETAMonodomainSolver.hpp.

◆ setParameters() [2/2]

void setParameters ( )
private

Set default parameters.

Definition at line 2341 of file ElectroETAMonodomainSolver.hpp.

◆ init() [1/4]

void init ( )
private

initialization in constructor

Definition at line 2291 of file ElectroETAMonodomainSolver.hpp.

◆ init() [2/4]

void init ( commPtr_Type  comm)
private

initialization in constructor

Parameters
commepetra communicator

Definition at line 2321 of file ElectroETAMonodomainSolver.hpp.

◆ init() [3/4]

void init ( meshPtr_Type  meshPtr)
private

initialization in constructor

Parameters
meshPtrpointer to the mesh

Definition at line 2330 of file ElectroETAMonodomainSolver.hpp.

◆ init() [4/4]

void init ( ionicModelPtr_Type  model)
private

initialization in constructor

Parameters
modelpointer to the ionic model

Definition at line 2313 of file ElectroETAMonodomainSolver.hpp.

Field Documentation

◆ M_surfaceVolumeRatio

Real M_surfaceVolumeRatio
protected

Definition at line 1354 of file ElectroETAMonodomainSolver.hpp.

◆ M_ionicModelPtr

ionicModelPtr_Type M_ionicModelPtr
protected

Definition at line 1356 of file ElectroETAMonodomainSolver.hpp.

◆ M_commPtr

commPtr_Type M_commPtr
protected

Definition at line 1358 of file ElectroETAMonodomainSolver.hpp.

◆ M_localMeshPtr

meshPtr_Type M_localMeshPtr
protected

Definition at line 1360 of file ElectroETAMonodomainSolver.hpp.

◆ M_fullMeshPtr

meshPtr_Type M_fullMeshPtr
protected

Definition at line 1362 of file ElectroETAMonodomainSolver.hpp.

◆ M_ETFESpacePtr

ETFESpacePtr_Type M_ETFESpacePtr
protected

Definition at line 1364 of file ElectroETAMonodomainSolver.hpp.

◆ M_feSpacePtr

feSpacePtr_Type M_feSpacePtr
protected

Definition at line 1366 of file ElectroETAMonodomainSolver.hpp.

◆ M_massMatrixPtr

matrixPtr_Type M_massMatrixPtr
protected

Definition at line 1368 of file ElectroETAMonodomainSolver.hpp.

◆ M_fullMassMatrixPtr

matrixPtr_Type M_fullMassMatrixPtr
protected

Definition at line 1370 of file ElectroETAMonodomainSolver.hpp.

◆ M_stiffnessMatrixPtr

matrixPtr_Type M_stiffnessMatrixPtr
protected

Definition at line 1372 of file ElectroETAMonodomainSolver.hpp.

◆ M_globalMatrixPtr

matrixPtr_Type M_globalMatrixPtr
protected

Definition at line 1374 of file ElectroETAMonodomainSolver.hpp.

◆ M_initialTime

Real M_initialTime
protected

Definition at line 1376 of file ElectroETAMonodomainSolver.hpp.

◆ M_endTime

Real M_endTime
protected

Definition at line 1378 of file ElectroETAMonodomainSolver.hpp.

◆ M_timeStep

Real M_timeStep
protected

Definition at line 1380 of file ElectroETAMonodomainSolver.hpp.

◆ M_diffusionTensor

VectorSmall<3> M_diffusionTensor
protected

Definition at line 1382 of file ElectroETAMonodomainSolver.hpp.

◆ M_rhsPtr

vectorPtr_Type M_rhsPtr
protected

Definition at line 1384 of file ElectroETAMonodomainSolver.hpp.

◆ M_rhsPtrUnique

vectorPtr_Type M_rhsPtrUnique
protected

Definition at line 1386 of file ElectroETAMonodomainSolver.hpp.

◆ M_potentialPtr

vectorPtr_Type M_potentialPtr
protected

Definition at line 1388 of file ElectroETAMonodomainSolver.hpp.

◆ M_linearSolverPtr

linearSolverPtr_Type M_linearSolverPtr
protected

Definition at line 1390 of file ElectroETAMonodomainSolver.hpp.

◆ M_globalSolution

vectorOfPtr_Type M_globalSolution
protected

Definition at line 1393 of file ElectroETAMonodomainSolver.hpp.

◆ M_globalRhs

vectorOfPtr_Type M_globalRhs
protected

Definition at line 1396 of file ElectroETAMonodomainSolver.hpp.

◆ M_elementsOrder

std::string M_elementsOrder
protected

Definition at line 1398 of file ElectroETAMonodomainSolver.hpp.

◆ M_fiberPtr

vectorPtr_Type M_fiberPtr
protected

Definition at line 1400 of file ElectroETAMonodomainSolver.hpp.

◆ M_identity

matrixSmall_Type M_identity
protected

Definition at line 1402 of file ElectroETAMonodomainSolver.hpp.

◆ M_lumpedMassMatrix

bool M_lumpedMassMatrix
protected

Definition at line 1404 of file ElectroETAMonodomainSolver.hpp.

◆ M_verbose

bool M_verbose
protected

Definition at line 1406 of file ElectroETAMonodomainSolver.hpp.


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