CEPS  24.01
Cardiac ElectroPhysiology Simulator
FluxAnodeCathodeProblem Class Reference

Detailed Description

Poisson equation with Neumann 1 on anode, -1 on cathode. Neumann 0 elsewhere. Functional tensorial conductivity.

Definition at line 38 of file FluxAnodeCathodeProblem.hpp.

#include <FluxAnodeCathodeProblem.hpp>

Inheritance diagram for FluxAnodeCathodeProblem:
[legend]

Public Member Functions

 FluxAnodeCathodeProblem (Geometry *g, InputParameters *p=nullptr)
 Constructor from geometry and optional input file. More...
 
 ~FluxAnodeCathodeProblem () override
 Destructor. More...
 
void setupWithParameters (InputParameters *p) override
 Sets the parameters. More...
 
void defineUnknowns () override
 Lists the unknowns of the problem (one here) More...
 
void defineSourceTerms () override
 No source term. More...
 
void defineBoundaryConditions () override
 Neumann -1/1 and 0 elsewhere. More...
 
void defineAnalyticSolution () override
 No analytic solution. More...
 
void run () override
 Run does nothing. The tests call directly a LaplacianSolver solve method. More...
 
CepsBool requireNullMean () const
 Tells if this problem requires a null mean constraint. More...
 
- Public Member Functions inherited from DirichletAnodeCathodeProblem
 DirichletAnodeCathodeProblem (Geometry *g, InputParameters *p=nullptr)
 Constructor from geometry and optional input file. More...
 
 ~DirichletAnodeCathodeProblem () override
 Destructor. More...
 
TensorSAFuncgetDiffusionTensor () const
 Diffusion tensor. More...
 
- Public Member Functions inherited from LaplacianProblem
 LaplacianProblem (Geometry *g, InputParameters *p=nullptr, const CepsMathTensor &k=CepsMathTensor::Identity())
 Constructor from geometry and optional input file. More...
 
 ~LaplacianProblem () override
 Destructor. More...
 
void setupWithParameters (InputParameters *p) override
 Sets the diffusion tensor. More...
 
void defineUnknowns () override
 Lists the unknowns of the problem (one here) More...
 
CepsMathTensor getDiffusionTensor (Unknown *u=nullptr) const
 Diffusion tensor. More...
 
void run () override
 Run does nothing. The tests call directly a LaplacianSolver solve method. More...
 
- Public Member Functions inherited from AbstractStaticPdeProblem
 AbstractStaticPdeProblem (Geometry *geom, InputParameters *params=nullptr)
 Constructor with geometry and optional parameters. More...
 
void getInitialGuess (DHVecPtr v)
 Returns a zero vector. Can be overriden ! More...
 
CepsArray2< CepsArray3< CepsReal > > getErrors () const
 Get the errors. More...
 
virtual void defineInitialGuess ()
 Sets the pointer on function for initial guess. Here it is set to nullptr, so it will be 0. More...
 
void initializeEquation () override
 Initializes equations (unknowns, bc, source term) and creates the spatial discretization This method should be called at the start of run() methods. More...
 
- Public Member Functions inherited from AbstractPdeProblem
 AbstractPdeProblem (Geometry *geom, InputParameters *params=nullptr)
 Constructor with geometry and optional parameters. More...
 
virtual ~AbstractPdeProblem ()
 destructor More...
 
 AbstractPdeProblem (const AbstractPdeProblem &that)=delete
 No copy constructor. More...
 
AbstractPdeProblemoperator= (const AbstractPdeProblem &that)=delete
 No assignment operator. More...
 
InputParametersgetParameters () const
 Text parameters. More...
 
void setProblemName (const CepsString &name)
 Set the name of the problem. More...
 
CepsString getProblemName () const
 Get the name of the problem. More...
 
GeometrygetGeometry () const
 Link to geometry on which the pb is defined. More...
 
AbstractDiscretizationgetSpatialDiscretization () const
 Link to the spatial discretization (FE, FV, etc) More...
 
void setSpatialDiscretization (AbstractDiscretization *discr)
 Link to the spatial discretization (FE, FV, etc) More...
 
void createSpatialDiscretization ()
 Compute the discretization structure. More...
 
const CepsVector< Unknown * > & getUnknowns () const
 List of unknowns of the pb. More...
 
UnknowngetUnknown (const CepsString &label) const
 Get an unknown by its name. More...
 
UnknowngetUnknown (CepsUnknownIndex uid) const
 Get an unknown by its id. More...
 
CepsVector< Unknown * > getSpatialUnknowns () const
 A vector of all unknowns of pb defined on cells or points. More...
 
CepsVector< Unknown * > getZeroDUnknowns () const
 A vector of all zeroD unknowns of the pb. More...
 
const CepsVector< UnknownInteraction * > & getUnknownsInteractions () const
 All the interactions between unknowns. More...
 
CepsBool unknownsInteract (Unknown *u1, Unknown *u2, const CepsSet< CepsAttribute > &attrs={CepsUniversal}) const
 Tells if unknowns interact on an entity with attributes. More...
 
CepsBool ignoreZeroDUnknownsForError () const
 Tells if 0D must not be taken into account in error computation. More...
 
CepsBool hasAnalyticSolution () const
 Tells if there is an analytic or reference solution. More...
 
ScalarFunctiongetAnalyticSolution () const
 Pointer on analytic or refScalarFunction solution. More...
 
void setReferenceSolution (const CepsString &baseFiles, CepsReal snapDt)
 Externally define the referece solution from files. Can be used for convergence tests. More...
 
CepsBool usesReferenceSolution () const
 Tells if analytic solution and if it is loaded from files. More...
 
CepsReal getReferenceSolutionOutputPeriod () const
 Output dt of reference. More...
 
FunctionDictionarygetFunctionDictionary () const
 Get functions manager. More...
 
void setFunctionDictionary (FunctionDictionary *)
 Set functions manager. More...
 
BoundaryConditionManagergetBoundaryConditionManager () const
 Get boundary condition manager. More...
 
void setBoundaryConditionManager (BoundaryConditionManager *bcm)
 Set boundary condition manager. More...
 
SourceTermManagergetSourceTermManager () const
 Get boundary condition manager. More...
 
void setSourceTermManager (SourceTermManager *stm)
 Set boundary condition manager. More...
 
CepsString getOutputFileBase () const
 Output file name includes the directory. More...
 
void setOutputFileBase (CepsString fileName)
 Output file name includes the directory. More...
 
CepsOutputFormat getOutputFormat () const
 Tells if output is binary or ascii. More...
 
void setOutputFormat (CepsOutputFormat opt)
 Enable/disable binary output. More...
 
CepsBool writesGlobalIndices () const
 Tells if global indices are written on top of solution. More...
 
void writeGlobalIndices (CepsBool opt)
 Activate/deactivate global indices writing. More...
 
CepsVector< CepsReal3DgetProbePoints () const
 Returns points where single data output should be written. More...
 
virtual CepsReal getStartTime () const
 Returns 0. Here for compatibility. More...
 
virtual CepsReal getEndTime () const
 Returns 0. Here for compatibility. More...
 
virtual CepsReal getSnapshotTime () const
 Returns 0. Here for compatibility. More...
 
- Public Member Functions inherited from CepsObject
 CepsObject ()=default
 default constructor More...
 
 CepsObject (const CepsObject &)=default
 Copy constructor. More...
 
virtual ~CepsObject ()=default
 Destructor. More...
 
CepsObjectoperator= (const CepsObject &)=default
 Assignment operator. More...
 
CepsObjecttoBaseObject ()
 Returns a pointer to CepsObject class. More...
 
const CepsObjecttoBaseObject () const
 Returns a pointer to CepsObject class, const version. More...
 
ProfilergetProfiler () const
 Access to profiler. More...
 
- Public Member Functions inherited from HoldsAnodeCathode< ElectrodeBase >
 HoldsAnodeCathode ()
 Default constructor. More...
 
 HoldsAnodeCathode (InputParameters *params, Geometry *geom=nullptr)
 Constructor with parameters, pass geometry to compute measures. More...
 
 HoldsAnodeCathode (const CepsSet< CepsAttribute > &anodeAttrs, const CepsSet< CepsAttribute > &cathodeAttrs, Geometry *geom=nullptr)
 Constructor with sets of attributes, pass geometry to compute measures. More...
 
virtual ~HoldsAnodeCathode ()
 Destructor. More...
 
CepsSet< CepsAttribute > & getAnodeAttributes () const
 Anode attributes. More...
 
CepsSet< CepsAttribute > & getCathodeAttributes () const
 Cathode attributes. More...
 
void setElectrodesAttributes (const CepsSet< CepsAttribute > &anodeAttrs, const CepsSet< CepsAttribute > &cathodeAttrs, Geometry *geom=nullptr)
 Sets the attributes. More...
 
ElectrodeBasegetAnode () const
 Ptr to anode object. More...
 
ElectrodeBasegetCathode () const
 Ptr to cathode object. More...
 

Protected Attributes

CepsString m_robinCoeffs
 Robin coefficients. More...
 
CepsReal m_totalIntensityApplied
 Intensity of delivered current. More...
 
- Protected Attributes inherited from DirichletAnodeCathodeProblem
CepsString m_sigmaOpts
 Text input for conductivity. More...
 
- Protected Attributes inherited from LaplacianProblem
CepsMathTensor m_k
 Diffusion tensor. More...
 
- Protected Attributes inherited from AbstractStaticPdeProblem
CepsArray2< CepsArray3< CepsReal > > m_errors
 Will store Linf, L1 and L2 relative errors. More...
 
ScalarFunctionm_initialGuess
 Function defining the initial condition, which is 0 if pointer is null. More...
 
- Protected Attributes inherited from AbstractPdeProblem
CepsString m_name
 Name of the problem. More...
 
Geometrym_geom
 Link to geometry on which the pb is defined. More...
 
InputParametersm_parameters
 Input file data. More...
 
AbstractDiscretizationm_discr
 Discretization method (eg FE for now) More...
 
CepsBool m_ownedDiscr
 True if instance used new to create discretization. More...
 
CepsVector< Unknown * > m_unknowns
 All maths unknowns of the problem. More...
 
CepsVector< UnknownInteraction * > m_unknownsInteractions
 Describes how unknowns interact. More...
 
ScalarFunctionm_analyticSolution
 analytic or reference solution More...
 
CepsBool m_ownedRefSol
 Flag for reference ownership. More...
 
CepsString m_refSolFiles
 base name of reference solution file, if any More...
 
CepsReal m_refSolSnapDt
 reference solution output period More...
 
FunctionDictionarym_functions
 Collection of custom functions. More...
 
BoundaryConditionManagerm_boundaryConditions
 All BCs should be there. More...
 
SourceTermManagerm_sourceTerms
 All source terms. More...
 
CepsBool m_ownedFunctions
 True if instance used new to create dictionary. More...
 
CepsBool m_ownedBCs
 True if instance used new to create BC manager. More...
 
CepsBool m_ownedSrcs
 True if instance used new to create src term manager. More...
 
CepsString m_outputFileBase
 File names prefix. More...
 
CepsOutputFormat m_outputFormat
 Output format selector. More...
 
CepsBool m_writeGlobalIDs
 Writes CEPS indices as well. More...
 
CepsVector< CepsReal3Dm_probePoints
 Single point data outputs. More...
 
CepsBool m_ignoreZeroDError
 Ignore 0D unknowns when computing errors. More...
 
- Protected Attributes inherited from HoldsAnodeCathode< ElectrodeBase >
ElectrodeBasem_anode
 Electrode object. More...
 
ElectrodeBasem_cathode
 Electrode object. More...
 

Additional Inherited Members

- Public Types inherited from AbstractPdeProblem
using ScalarFunction = ceps::Function< CepsReal(CepsStandardArgs)>
 Typedef for analytic solution. More...
 
- Static Public Attributes inherited from AbstractStaticPdeProblem
static constexpr CepsBool isStatic = true
 Flag for static/timed. More...
 
- Protected Member Functions inherited from AbstractPdeProblem
void addUnknown (const CepsString &label, CepsSet< CepsAttribute > attrs={}, CepsLocationFlag flag=CepsLocationFlag::Point, const CepsString &unit="")
 Register a new unknown. More...
 
void addZeroDUnknown (CepsString label, const CepsString &unit="")
 Register a new unknown, defined outside of geometry. More...
 
void addUnknownInteraction (CepsString label1, CepsString label2, CepsSet< CepsAttribute > attrs={})
 Register interaction between unknowns. Also sets the interaction within Unknown instances label1 and label2. More...
 
- Protected Member Functions inherited from HoldsAnodeCathode< ElectrodeBase >
void checkCommonAttributes ()
 Check that anode and cathode do not share attributes. More...
 
- Static Protected Attributes inherited from CepsObject
static Profiler m_profiler
 The same profiler for each big object. More...
 

Constructor & Destructor Documentation

◆ FluxAnodeCathodeProblem()

FluxAnodeCathodeProblem::FluxAnodeCathodeProblem ( Geometry g,
InputParameters p = nullptr 
)
explicit

Constructor from geometry and optional input file.

Definition at line 35 of file FluxAnodeCathodeProblem.cpp.

◆ ~FluxAnodeCathodeProblem()

FluxAnodeCathodeProblem::~FluxAnodeCathodeProblem ( )
override

Destructor.

Definition at line 43 of file FluxAnodeCathodeProblem.cpp.

Member Function Documentation

◆ defineAnalyticSolution()

void FluxAnodeCathodeProblem::defineAnalyticSolution ( )
overridevirtual

No analytic solution.

Reimplemented from DirichletAnodeCathodeProblem.

Definition at line 97 of file FluxAnodeCathodeProblem.cpp.

◆ defineBoundaryConditions()

void FluxAnodeCathodeProblem::defineBoundaryConditions ( )
overridevirtual

Neumann -1/1 and 0 elsewhere.

Reimplemented from DirichletAnodeCathodeProblem.

Definition at line 77 of file FluxAnodeCathodeProblem.cpp.

◆ defineSourceTerms()

void FluxAnodeCathodeProblem::defineSourceTerms ( )
overridevirtual

No source term.

Reimplemented from DirichletAnodeCathodeProblem.

Definition at line 72 of file FluxAnodeCathodeProblem.cpp.

◆ defineUnknowns()

void FluxAnodeCathodeProblem::defineUnknowns ( )
overridevirtual

Lists the unknowns of the problem (one here)

Reimplemented from DirichletAnodeCathodeProblem.

Definition at line 57 of file FluxAnodeCathodeProblem.cpp.

◆ requireNullMean()

CepsBool FluxAnodeCathodeProblem::requireNullMean ( ) const

Tells if this problem requires a null mean constraint.

Definition at line 122 of file FluxAnodeCathodeProblem.cpp.

◆ run()

void FluxAnodeCathodeProblem::run ( )
overridevirtual

Run does nothing. The tests call directly a LaplacianSolver solve method.

Reimplemented from DirichletAnodeCathodeProblem.

Definition at line 102 of file FluxAnodeCathodeProblem.cpp.

◆ setupWithParameters()

void FluxAnodeCathodeProblem::setupWithParameters ( InputParameters p)
overridevirtual

Sets the parameters.

Reimplemented from DirichletAnodeCathodeProblem.

Definition at line 48 of file FluxAnodeCathodeProblem.cpp.

Field Documentation

◆ m_robinCoeffs

CepsString FluxAnodeCathodeProblem::m_robinCoeffs
protected

Robin coefficients.

Definition at line 81 of file FluxAnodeCathodeProblem.hpp.

◆ m_totalIntensityApplied

CepsReal FluxAnodeCathodeProblem::m_totalIntensityApplied
protected

Intensity of delivered current.

Definition at line 82 of file FluxAnodeCathodeProblem.hpp.


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