37 m_couplingAttrNeg(
false),
38 m_sigmaIOptions2 (
"CONSTANT 1. 1. 1."),
39 m_sigmaEOptions2 (
"CONSTANT 1. 1. 1."),
40 m_fibersOptions2 (
""),
44 setProblemName(
"Bilayer Monodomain");
50 "Bilayer model: elements " << (m_couplingAttrNeg ?
"without":
"with") <<
51 " attribute " << m_couplingAttrs <<
" will be coupled,\n" <<
52 "adding the equality " << m_couplingStr <<
"(u1-u2) = 0 to the original equation."
103 getProfiler()->
start(
"whole",
"performing whole simulation (BilayerMonodomainProblem)");
171 if (params->
hasKey(
"sigma i layer "+v[2]))
175 if (params->
hasKey(
"sigma e layer "+v[2]))
192 "BilayerParameters: could not read attribute of non-coupled elements"
208 "Any of the given coupling attributes can not be found in the tissue attributes"
#define CEPS_SAYS(message)
Writes a message in the debug log and in the terminal (stdio).
#define CEPS_ABORT_IF(condition, message)
Stops the execution with a message if condition is true. If testing is enabled, only throws a runtime...
std::set< _Type, _Compare, _Alloc > CepsSet
C++ set.
std::vector< _Type, _Alloc > CepsVector
C++ vector.
CepsInt CepsAttribute
Used to define regions.
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
float CepsReal
Need single precision floating point.
CepsBool hasAnalyticSolution() const
Tells if there is an analytic or reference solution.
void addUnknown(const CepsString &label, CepsSet< CepsAttribute > attrs={}, CepsLocationFlag flag=CepsLocationFlag::Point, const CepsString &unit="")
Register a new unknown.
Unknown * getUnknown(const CepsString &label) const
Get an unknown by its name.
CepsArray2< CepsArray3< CepsArray3< CepsReal > > > m_errors
Will store Linf, L1 and L2 relative errors.
CepsArray2< CepsArray3< CepsArray3< CepsReal > > > getErrors() const
Gets the currently computed errors. First index selects absolute(0) or relative(1) second index selec...
TensorField< GeomCell > * m_sigmaI2
Intracellular conductivity, defined on cells.
TensorField< GeomCell > * getSigmaE2() const
Link to extracellular conductivity.
BilayerMonodomainProblem(Geometry *g, InputParameters *=nullptr)
Constructor with input strings and geometry.
CepsBool m_couplingAttrNeg
true if given attribute is for UNcoupled elements
CepsVector< Unknown * > getTMVUnknowns() const override
Returns a vector containing all unknowns that are a TMV (especially useful for bilayer)
CepsString m_sigmaEOptions2
Extracellular conductivity parameters string for layer 2.
Unknown * getTMVUnknown1() const
Link to the single unknown of the problem.
CepsReal getCouplingStrength() const
coefficient that forces u1=u2 on coupled elements
void setupWithParameters(InputParameters *p) override
Initializes the problem from text input file.
CepsReal m_couplingStr
adds s*(u1-u2) on coupled elements
CepsString m_fibersOptions2
Text input description.
TensorField< GeomCell > * m_sigmaE2
Extracellulat conductivity, defined on cells.
TensorField< GeomCell > * getSigmaI2() const
Link to intracellular conductivity.
Unknown * getTMVUnknown2() const
Link to the single unknown of the problem.
CepsVector< Unknown * > getCardiacUnknowns() const override
Returns a vector containing all unknowns that are cardiac unknowns (eg. vm, ui or ue)
CepsSet< CepsAttribute > getCouplingAttributes() const
where to apply coupling
void defineUnknowns() override
A single unknown for transmembrane voltage.
CepsSet< CepsAttribute > m_couplingAttrs
where to apply coupling
CepsString m_sigmaIOptions2
Intracellular conductivity parameters string for layer 2.
void run() override
Run the simulation.
void initializeConductivities() override
Sets the myocardium with physical properties for both layers.
CepsBool getCouplingAttrNeg() const
true if given attribute if for UNcoupled elements
Monodomain solver on two atrial layers.
A abstract class that regroups common parameters of cardiac problems.
CepsString m_fibersOptions
Options for fiber orientation.
virtual void initializeConductivities()
Generates the functors that compute conductivity either from inputs or volume fraction.
CepsString m_sigmaIOptions
Options for intracellular conductivity.
TensorField< GeomCell > * m_sigmaI
Intracellular conductivity, defined on cells.
CepsString m_sigmaEOptions
Options for extracellulat conductivity.
CepsSet< CepsAttribute > m_tissueAttributes
Identifier for the tissue region, default {-1}.
TensorField< GeomCell > * m_sigmaE
Extracellulat conductivity, defined on cells.
void initializeEquation() override
Initializes all the elements of the PDE from options.
void solve() override
Performs all iterations of the PDE solver.
Profiler * getProfiler() const
Access to profiler.
A Field is an object wrapped around a SAFunc functor, defined on at least one domain.
Encapsulates all the geometrical data.
void stop(CepsString lbl)
Stops the measure of a labeled chronometer.
void start(CepsString lbl, CepsString dspl="")
Creates or continue a labeled chronometer.
A class used to defined an unknown of a PDE problem The unknown can be defined on a specific region,...
CepsBool isValidPtr(_Type *ptr)
Tells if pointer is not null.
CepsVector< CepsString > split(const CepsString &s, const CepsString &delimiters=CepsString(" \t"))
Splits a string using mulitple delimiters in a single string.
CepsInt toInt(const CepsString &s)
Cast CepsString to CepsInt.
CepsString toUpper(const CepsString &s)
Switches all characters to upper case.
CepsBool isProfiling()
Check if we are currently profiling on the master proc (always false on slave procs).
static constexpr const char * vm1
Transmembrane voltage layer 1.
static constexpr const char * vm2
Transmembrane voltage layer 2.