Choral
All Classes Namespaces Files Functions Variables Modules
Data Types | Functions/Subroutines
ode_output_mod Module Reference

DERIVED TYPE ode_output: handles output for PDE/ODE simulations More...

Data Types

interface  assemble
 assemble the output (finalise construction) More...
 
interface  clear
 
interface  ode_output
 The type ode_output handles output for ODE simulations. More...
 
interface  print
 print a short description More...
 
interface  set
 set the output parameters More...
 

Functions/Subroutines

subroutine ode_output_clear (out)
 destructor for ode_output More...
 
type(ode_output) function ode_output_create (t0, T, N)
  Constructor for the type ode_output More...
 
subroutine ode_output_set (out, verb, Ytn_period, Vtn_period, Vtn_rec_prd, Vtn_plot, act_type, act_rec, act_plot, stop_if_dep, act_Vth, Vtn_file, act_file, outDir, pos, xn_list, Vxn_period, Vxn_plot, Vxn_file)
 set the following parameters = optional see ode_output_mod::ode_output for the default values More...
 
subroutine ode_output_assemble (out, dt, X_h)
 assemble the output, follows set(out, ...) More...
 
integer function def_nv (method)
 size of V required to compute act More...
 
subroutine ode_output_print (out)
 print ode_output More...
 
subroutine, public output_proc (out, time, s, final)
  Pre-defined output for ODE resolution More...
 
subroutine ode_output_last_output (out)
 ends computation output More...
 
subroutine plot_vtn (out)
 Plot V(x, tn) "co$outDir/vn.dat", n=1..Ytn_cpt. More...
 
subroutine plot_vtn_gnuplot (out)
 plot ../temp/vn.dat More...
 
subroutine plot_vtn_gmsh (out)
 
subroutine plot_vxn_gnuplot (out)
 
subroutine plot_act (out)
 plot activation times More...
 
subroutine plot_act_gnuplot (out)
 
subroutine plot_act_gmsh (out)
 
subroutine comp_act_0 (act, V, time, Vth)
 Computation of activation times : cut off. More...
 
subroutine comp_act_1 (act, V, time, dt, Vth)
 Computation of activation times : linear interp. More...
 
subroutine comp_act_2 (act, V, time, dt, Vth)
 Computation of activation times : quadradic interp. More...
 
subroutine comp_act_4 (act, V, time, dt, Vth)
 Computation of activation times : bi-quadradic interp. More...
 
real(rp) function, public celerity_l2_dist (u1, u2, X_h, qdm, weight)
 returns || (c(u1) - c(u2)) * weight(x) ||_L2() More...
 
real(rp) function, public celerity_l2_norm (u1, X_h, qdm, weight)
 returns || c(u1) * weight(x) ||_L2 More...
 

Detailed Description

DERIVED TYPE ode_output: handles output for PDE/ODE simulations

The type ode_output conatins a procedural element

that can be passed as an argument to an ode_solver.

It is constructed in 3 steps

  1. Creation:
    out = ode_output(t0, t, n)
    for an ODE on the tiem interval (t0,T) and with 'n' unknowns per node ( \( Y(x,t)\in\R^n\)), documentation.
  2. Settings:
    call set(out, args)
    see ode_output_set documentation.
  3. Assembling:
    call assemble(out, dt, ...)

    ends up the construction before to solve see ode_output_assemble documentation.

Tutorial examples:

In these examples, see the subroutine 'output_proc' or 'cardio_output'.

Author
Charles Pierre

Function/Subroutine Documentation

◆ celerity_l2_dist()

real(rp) function, public ode_output_mod::celerity_l2_dist ( real(rp), dimension(:), intent(in)  u1,
real(rp), dimension(:), intent(in)  u2,
type(fespace), intent(in)  X_h,
type(quadmesh), intent(in)  qdm,
procedure(r3tor)  weight 
)

returns || (c(u1) - c(u2)) * weight(x) ||_L2()

c = wafe front celerity

u1 and u2 are activation times for the finite element space X_h

integration method is described by qdm

weight allows to compute the norm on a subset of Omega

Definition at line 1211 of file ode_output_mod.F90.

Here is the call graph for this function:

◆ celerity_l2_norm()

real(rp) function, public ode_output_mod::celerity_l2_norm ( real(rp), dimension(:), intent(in)  u1,
type(fespace), intent(in)  X_h,
type(quadmesh), intent(in)  qdm,
procedure(r3tor)  weight 
)

returns || c(u1) * weight(x) ||_L2

c = wafe front celerity

u1 = activation times for the finite element space X_h

integration method is described by qdm

weight allows to compute the norm on a subset of Omega

Definition at line 1249 of file ode_output_mod.F90.

Here is the call graph for this function:

◆ comp_act_0()

subroutine ode_output_mod::comp_act_0 ( real(rp), dimension(:), intent(out)  act,
real(rp), dimension(:,:), intent(in)  V,
real(rp), intent(in)  time,
real(rp), intent(in)  Vth 
)
private

Computation of activation times : cut off.

Definition at line 1017 of file ode_output_mod.F90.

◆ comp_act_1()

subroutine ode_output_mod::comp_act_1 ( real(rp), dimension(:), intent(out)  act,
real(rp), dimension(:,:), intent(in)  V,
real(rp), intent(in)  time,
real(rp), intent(in)  dt,
real(rp), intent(in)  Vth 
)
private

Computation of activation times : linear interp.

Definition at line 1040 of file ode_output_mod.F90.

◆ comp_act_2()

subroutine ode_output_mod::comp_act_2 ( real(rp), dimension(:), intent(out)  act,
real(rp), dimension(:,:), intent(in)  V,
real(rp), intent(in)  time,
real(rp), intent(in)  dt,
real(rp), intent(in)  Vth 
)
private

Computation of activation times : quadradic interp.

Definition at line 1065 of file ode_output_mod.F90.

◆ comp_act_4()

subroutine ode_output_mod::comp_act_4 ( real(rp), dimension(:), intent(out)  act,
real(rp), dimension(:,:), intent(in)  V,
real(rp), intent(in)  time,
real(rp), intent(in)  dt,
real(rp), intent(in)  Vth 
)
private

Computation of activation times : bi-quadradic interp.

Definition at line 1101 of file ode_output_mod.F90.

Here is the call graph for this function:

◆ def_nv()

integer function ode_output_mod::def_nv ( integer  method)
private

size of V required to compute act

Definition at line 481 of file ode_output_mod.F90.

Here is the call graph for this function:

◆ ode_output_assemble()

subroutine ode_output_mod::ode_output_assemble ( type(ode_output), intent(inout)  out,
real(rp), intent(in)  dt,
type(fespace), optional, target  X_h 
)
private

assemble the output, follows set(out, ...)

Parameters :

  • dt = time step
  • X_h = finite element space

To run before any simulation

Definition at line 392 of file ode_output_mod.F90.

Here is the call graph for this function:

◆ ode_output_clear()

subroutine ode_output_mod::ode_output_clear ( type(ode_output), intent(inout)  out)
private

destructor for ode_output

Definition at line 227 of file ode_output_mod.F90.

◆ ode_output_create()

type(ode_output) function ode_output_mod::ode_output_create ( real(rp), intent(in)  t0,
real(rp), intent(in)  T,
integer, intent(in)  N 
)
private

Constructor for the type ode_output

  • INPUT:
    • dim = dimension in space
    • t0, T = starting and final time
    • N = number of unknowns per node

Definition at line 256 of file ode_output_mod.F90.

◆ ode_output_last_output()

subroutine ode_output_mod::ode_output_last_output ( type(ode_output), intent(in)  out)
private

ends computation output

Definition at line 769 of file ode_output_mod.F90.

Here is the call graph for this function:

◆ ode_output_print()

subroutine ode_output_mod::ode_output_print ( type(ode_output), intent(in)  out)
private

print ode_output

Definition at line 506 of file ode_output_mod.F90.

◆ ode_output_set()

subroutine ode_output_mod::ode_output_set ( type(ode_output), intent(inout)  out,
integer, intent(in), optional  verb,
real(rp), intent(in), optional  Ytn_period,
real(rp), intent(in), optional  Vtn_period,
real(rp), intent(in), optional  Vtn_rec_prd,
logical, intent(in), optional  Vtn_plot,
integer, intent(in), optional  act_type,
logical, intent(in), optional  act_rec,
logical, intent(in), optional  act_plot,
logical, intent(in), optional  stop_if_dep,
real(rp), intent(in), optional  act_Vth,
character(len=*), intent(in), optional  Vtn_file,
character(len=*), intent(in), optional  act_file,
character(len=*), intent(in), optional  outDir,
integer, intent(in), optional  pos,
integer, dimension(:), intent(in), optional  xn_list,
real(rp), intent(in), optional  Vxn_period,
logical, intent(in), optional  Vxn_plot,
character(len=*), intent(in), optional  Vxn_file 
)
private

set the following parameters = optional see ode_output_mod::ode_output for the default values

  • verb = verbosity level
  • Ytn_period = memory storing period for Y(., t_n)
  • Vtn_period = memory storing period for V(., t_n)
  • Vtn_rec_prd = file record periof for V(., t_n)
  • Vtn_plot = Plot of V(tn,:) ?
  • act_type = computation method for activation times
  • act_Vth = threshold for activation times computation
  • act_plot = Plot activation times ?
  • act_rec = recording activation times to file act.dat ?
  • stop_if_dep = stop if fully depolarised domain ?
  • pos = plot file format
  • outdir = directory for file recordings
  • Vtn_FILE = prefix for potential recordings
  • ACT_FILE = prefix for activation time recordings

Definition at line 315 of file ode_output_mod.F90.

Here is the call graph for this function:

◆ output_proc()

subroutine, public ode_output_mod::output_proc ( class(ode_output), intent(inout)  out,
real(rp), intent(in)  time,
type(ode_solution), intent(in)  s,
logical, intent(out)  final 
)

Pre-defined output for ODE resolution

This routine realises the output for ODE resolution relatively to the output setting in an ode_output

  • OUTPUT:
    • final = final output call ?
  • INPUT:
    • time = running time
    • s = ode_solution

Definition at line 570 of file ode_output_mod.F90.

Here is the call graph for this function:

◆ plot_act()

subroutine ode_output_mod::plot_act ( type(ode_output), intent(in)  out)
private

plot activation times

Definition at line 931 of file ode_output_mod.F90.

Here is the call graph for this function:

◆ plot_act_gmsh()

subroutine ode_output_mod::plot_act_gmsh ( type(ode_output), intent(in)  out)
private

Definition at line 974 of file ode_output_mod.F90.

Here is the call graph for this function:

◆ plot_act_gnuplot()

subroutine ode_output_mod::plot_act_gnuplot ( type(ode_output), intent(in)  out)
private

Definition at line 941 of file ode_output_mod.F90.

◆ plot_vtn()

subroutine ode_output_mod::plot_vtn ( type(ode_output), intent(in)  out)
private

Plot V(x, tn) "co$outDir/vn.dat", n=1..Ytn_cpt.

Definition at line 789 of file ode_output_mod.F90.

Here is the call graph for this function:

◆ plot_vtn_gmsh()

subroutine ode_output_mod::plot_vtn_gmsh ( type(ode_output), intent(in)  out)
private

Definition at line 842 of file ode_output_mod.F90.

Here is the call graph for this function:

◆ plot_vtn_gnuplot()

subroutine ode_output_mod::plot_vtn_gnuplot ( type(ode_output), intent(in)  out)
private

plot ../temp/vn.dat

Definition at line 802 of file ode_output_mod.F90.

Here is the call graph for this function:

◆ plot_vxn_gnuplot()

subroutine ode_output_mod::plot_vxn_gnuplot ( type(ode_output), intent(in)  out)
private

Definition at line 895 of file ode_output_mod.F90.

Here is the call graph for this function: