Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel > Class Template Reference

FitzHugh-Nagumo excitable-media rule. More...

#include <tpl_ca_continuous_rules.H>

Collaboration diagram for Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >:
[legend]

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 &current, 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 &current) const
 
Real laplace_v (Neighbor_View< state_type > neighbours, const state_type &current) const
 

Private Attributes

Real a_
 
Real b_
 
Real epsilon_
 
Real du_
 
Real dv_
 
Real dt_
 
Real stimulus_
 
Kernel lap_
 

Detailed Description

template<typename Real = double, typename Kernel = Kernel2D<Real, 3, 3>>
class Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >

FitzHugh-Nagumo excitable-media rule.

Explicit Euler update:

du/dt = Du * Lap(u) + u - u^3 / 3 - v + stimulus
dv/dt = Dv * Lap(v) + epsilon * (u + a - b*v)
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
Definition Blossom.H:466

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.

Template Parameters
Realfloating-point field type.
KernelLaplacian kernel type.

Definition at line 467 of file tpl_ca_continuous_rules.H.

Member Typedef Documentation

◆ kernel_type

template<typename Real = double, typename Kernel = Kernel2D<Real, 3, 3>>
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.

◆ state_type

template<typename Real = double, typename Kernel = Kernel2D<Real, 3, 3>>
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.

Constructor & Destructor Documentation

◆ FitzHugh_Nagumo_Rule()

template<typename Real = double, typename Kernel = Kernel2D<Real, 3, 3>>
Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::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>() 
)
inline

Build a FitzHugh-Nagumo rule.

Parameters
[in]arecovery nullcline offset.
[in]brecovery coupling coefficient; must be positive.
[in]epsilonrecovery time-scale parameter; must be positive.
[in]dudiffusion coefficient for u.
[in]dvdiffusion coefficient for v.
[in]dtexplicit Euler time step; stable contract: 0 < dt <= 0.25.
[in]stimulusconstant external stimulus added to u.
[in]laplacianconvolution kernel; defaults to 5-point Laplacian.
Exceptions
std::domain_errorif any parameter is outside its documented range.

Definition at line 517 of file tpl_ca_continuous_rules.H.

Member Function Documentation

◆ a()

template<typename Real = double, typename Kernel = Kernel2D<Real, 3, 3>>
Real Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::a ( ) const
inlinenoexcept
Returns
parameter a.

Definition at line 544 of file tpl_ca_continuous_rules.H.

References Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::a_.

◆ b()

template<typename Real = double, typename Kernel = Kernel2D<Real, 3, 3>>
Real Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::b ( ) const
inlinenoexcept
Returns
parameter b.

Definition at line 550 of file tpl_ca_continuous_rules.H.

References Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::b_.

◆ dt()

template<typename Real = double, typename Kernel = Kernel2D<Real, 3, 3>>
Real Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::dt ( ) const
inlinenoexcept
Returns
explicit Euler time step.

Definition at line 574 of file tpl_ca_continuous_rules.H.

References Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::dt_.

◆ Du()

template<typename Real = double, typename Kernel = Kernel2D<Real, 3, 3>>
Real Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::Du ( ) const
inlinenoexcept
Returns
u diffusion coefficient.

Definition at line 562 of file tpl_ca_continuous_rules.H.

References Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::du_.

◆ Dv()

template<typename Real = double, typename Kernel = Kernel2D<Real, 3, 3>>
Real Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::Dv ( ) const
inlinenoexcept
Returns
v diffusion coefficient.

Definition at line 568 of file tpl_ca_continuous_rules.H.

References Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::dv_.

◆ epsilon()

template<typename Real = double, typename Kernel = Kernel2D<Real, 3, 3>>
Real Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::epsilon ( ) const
inlinenoexcept
Returns
recovery time-scale parameter.

Definition at line 556 of file tpl_ca_continuous_rules.H.

References Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::epsilon_.

◆ laplace_u()

◆ laplace_v()

◆ laplacian()

template<typename Real = double, typename Kernel = Kernel2D<Real, 3, 3>>
const Kernel & Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::laplacian ( ) const
inlinenoexcept
Returns
Laplacian kernel.

Definition at line 586 of file tpl_ca_continuous_rules.H.

References Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::lap_.

◆ operator()()

◆ stimulus()

template<typename Real = double, typename Kernel = Kernel2D<Real, 3, 3>>
Real Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::stimulus ( ) const
inlinenoexcept
Returns
constant external stimulus.

Definition at line 580 of file tpl_ca_continuous_rules.H.

References Aleph::CA::FitzHugh_Nagumo_Rule< Real, Kernel >::stimulus_.

Member Data Documentation

◆ a_

◆ b_

◆ dt_

◆ du_

◆ dv_

◆ epsilon_

◆ lap_

◆ stimulus_


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