|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
FitzHugh-Nagumo excitable-media rule. More...
#include <tpl_ca_continuous_rules.H>
Public Types | |
| using | state_type = Reaction_Diffusion_Cell< Real > |
| Cell state consumed and produced by the rule. | |
| using | kernel_type = Kernel |
| Laplacian kernel type. | |
Public Member Functions | |
| FitzHugh_Nagumo_Rule (Real a, Real b, Real epsilon, Real du, Real dv, Real dt=Real{0.01}, Real stimulus=Real{}, Kernel laplacian=laplacian_5p_kernel< Real >()) | |
| Build a FitzHugh-Nagumo rule. | |
| Real | a () const noexcept |
| Real | b () const noexcept |
| Real | epsilon () const noexcept |
| Real | Du () const noexcept |
| Real | Dv () const noexcept |
| Real | dt () const noexcept |
| Real | stimulus () const noexcept |
| const Kernel & | laplacian () const noexcept |
| state_type | operator() (const state_type ¤t, Neighbor_View< state_type > neighbours) const |
| Compute the next FitzHugh-Nagumo state. | |
Private Member Functions | |
| Real | laplace_u (Neighbor_View< state_type > neighbours, const state_type ¤t) const |
| Real | laplace_v (Neighbor_View< state_type > neighbours, const state_type ¤t) const |
Private Attributes | |
| Real | a_ |
| Real | b_ |
| Real | epsilon_ |
| Real | du_ |
| Real | dv_ |
| Real | dt_ |
| Real | stimulus_ |
| Kernel | lap_ |
FitzHugh-Nagumo excitable-media rule.
Explicit Euler update:
The constructor enforces 0 < dt <= 0.25. This conservative bound keeps the explicit update stable for the usual tutorial parameters (a=0.7, b=0.8, epsilon=0.08, dt=0.01) and catches accidental blow-ups early.
| Real | floating-point field type. |
| Kernel | Laplacian kernel type. |
Definition at line 467 of file tpl_ca_continuous_rules.H.
| using Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::kernel_type = Kernel |
Laplacian kernel type.
Definition at line 473 of file tpl_ca_continuous_rules.H.
| using Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::state_type = Reaction_Diffusion_Cell<Real> |
Cell state consumed and produced by the rule.
Definition at line 471 of file tpl_ca_continuous_rules.H.
|
inline |
Build a FitzHugh-Nagumo rule.
| [in] | a | recovery nullcline offset. |
| [in] | b | recovery coupling coefficient; must be positive. |
| [in] | epsilon | recovery time-scale parameter; must be positive. |
| [in] | du | diffusion coefficient for u. |
| [in] | dv | diffusion coefficient for v. |
| [in] | dt | explicit Euler time step; stable contract: 0 < dt <= 0.25. |
| [in] | stimulus | constant external stimulus added to u. |
| [in] | laplacian | convolution kernel; defaults to 5-point Laplacian. |
| std::domain_error | if any parameter is outside its documented range. |
Definition at line 517 of file tpl_ca_continuous_rules.H.
|
inlinenoexcept |
a. Definition at line 544 of file tpl_ca_continuous_rules.H.
References Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::a_.
|
inlinenoexcept |
b. Definition at line 550 of file tpl_ca_continuous_rules.H.
References Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::b_.
|
inlinenoexcept |
Definition at line 574 of file tpl_ca_continuous_rules.H.
References Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::dt_.
|
inlinenoexcept |
u diffusion coefficient. Definition at line 562 of file tpl_ca_continuous_rules.H.
References Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::du_.
|
inlinenoexcept |
v diffusion coefficient. Definition at line 568 of file tpl_ca_continuous_rules.H.
References Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::dv_.
|
inlinenoexcept |
Definition at line 556 of file tpl_ca_continuous_rules.H.
References Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::epsilon_.
|
inlineprivate |
Definition at line 485 of file tpl_ca_continuous_rules.H.
References Aleph::blossom_maximum_cardinality_matching(), k, Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::lap_, and Aleph::CA::Reaction_Diffusion_Cell< Real >::u.
Referenced by Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::operator()().
|
inlineprivate |
Definition at line 493 of file tpl_ca_continuous_rules.H.
References Aleph::blossom_maximum_cardinality_matching(), k, Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::lap_, and Aleph::CA::Reaction_Diffusion_Cell< Real >::v.
Referenced by Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::operator()().
|
inlinenoexcept |
Definition at line 586 of file tpl_ca_continuous_rules.H.
References Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::lap_.
|
inline |
Compute the next FitzHugh-Nagumo state.
| [in] | current | current (u, v) fields. |
| [in] | neighbours | neighbour cells in Moore<2, Kernel::radius_v> order. |
| std::length_error | if neighbour count does not match the kernel. |
| std::runtime_error | if either field is non-finite or leaves [-100, 100], which signals numerical blow-up. |
Definition at line 601 of file tpl_ca_continuous_rules.H.
References Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::a_, ah_length_error_if, Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::b_, Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::ca_continuous_detail::checked_bounded(), Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::dt_, Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::du_, Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::dv_, Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::epsilon_, Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::laplace_u(), Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::laplace_v(), Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::stimulus_, Aleph::CA::Reaction_Diffusion_Cell< Real >::u, and Aleph::CA::Reaction_Diffusion_Cell< Real >::v.
|
inlinenoexcept |
Definition at line 580 of file tpl_ca_continuous_rules.H.
References Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::stimulus_.
|
private |
Definition at line 476 of file tpl_ca_continuous_rules.H.
Referenced by Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::a(), and Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::operator()().
|
private |
Definition at line 477 of file tpl_ca_continuous_rules.H.
Referenced by Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::b(), and Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::operator()().
|
private |
Definition at line 481 of file tpl_ca_continuous_rules.H.
Referenced by Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::dt(), and Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::operator()().
|
private |
Definition at line 479 of file tpl_ca_continuous_rules.H.
Referenced by Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::Du(), and Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::operator()().
|
private |
Definition at line 480 of file tpl_ca_continuous_rules.H.
Referenced by Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::Dv(), and Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::operator()().
|
private |
Definition at line 478 of file tpl_ca_continuous_rules.H.
Referenced by Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::epsilon(), and Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::operator()().
|
private |
Definition at line 483 of file tpl_ca_continuous_rules.H.
Referenced by Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::laplace_u(), Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::laplace_v(), and Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::laplacian().
|
private |
Definition at line 482 of file tpl_ca_continuous_rules.H.
Referenced by Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::operator()(), and Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::stimulus().