Choral
Data Types | Functions/Subroutines
ode_problem_mod Module Reference

DERIVED TYPE ode_problem: definition of ODE/PDE problems More...

Data Types

interface  clear
 
interface  ode_problem
 Type ode_problem: definition of ODE/PDE problems. More...
 
interface  print
 
interface  valid
 

Functions/Subroutines

subroutine ode_problem_clear (pb)
 destructor for ode_problem More...
 
type(ode_problem) function ode_problem_create (type, dim, dof, X, M, S, AB, N, Na)
  Constructor for the type ode_problem More...
 
logical function ode_problem_valid (pb)
 check ode_problem More...
 
character(len=15) function, public name_ode_problem (type)
 ode_problem name More...
 
subroutine ode_problem_print (pb)
 print ode_problem More...
 

Detailed Description

DERIVED TYPE ode_problem: definition of ODE/PDE problems

Choral constants for ODE problems: ODE_PB_xxx, see the list.

Tutorial examples are listed in ode_solver_mod detailed description.

  1. General target problem: ODE_PB_SL_NL =
    SemiLinear PDE coupled with a Non-Linear ODE system,
    • for \( 1 \le i \le N_a \): \(~~~ d Y_i/dt =a_i(x,t,Y)Y_i + b_i(x,t,Y)Y_i = F_i \)
    • for \( N_a < i < N \): \(~~~ d Y_i/dt = b_i(x,t,Y)Y_i \)
      ( \( a_i(x,t,Y) = 0 \) here),
    • for \( i=N \): \(~~~ M \partial V/\partial t = -S V + M b_N(x,t,Y) \)
    where:
    • \( 0 \le N_a \le N \)
    • \( M, ~S \) = positive symmetric linear operators (mass and stiffness matrices e. g.),
    • \( Y(x,t) \in R^N \)
    • \( V(x,t) = Y_N(x,t)\in R \)
    • \( x \in \Omega \) and \( 0 \le t \le T \)
    Nota bene: if \( N_a = N \), the semilinear equation is:
    • \(~~~ M \partial V/\partial t = -S V + M (a_N(x,t,Y)V + b_N(x,t,Y)) \)
  2. ODE_PB_Lin = Linear PDE
    • \( N = 1 \), \( a(x,t) = b(x,t) = 0 \)
    • \( M \partial V/\partial t = -S V \)
  3. ODE_PB_SL = semiLinear PDE
    • \( N = 1 \)
    • \( M \partial V/\partial t = -S V + M F(x,t,V) \)
  4. ODE_PB_NL = Non Linear ODE
    • \( S=0 \), \( M=Id \)
    • for \( 1 \le i \le N_a \): \(~~~ d Y_i/dt = a_i(x,t,Y)Y_i + b_i(x,t,Y)Y_i \)
    • for \( N_a < i \le N \): \(~~~ d Y_i/dt = b_i(x,t,Y)Y_i \)

An ode_problem is constructed with

problem = ode_problem(type, atgs)

the argumentss define the problem relativelly to its type, see ode_problem_create.

Among these parameters:

Reaction term decomposition:
We have set

to define the global reaction term \(~~~ F:~(x,t)\in\Omega\times\R\rightarrow F(x,t)\in\R^{N}\)

This linearisation of the reaction term \( F \) is used by several ODE methods such as implicit-explicit Euler or exponential integrators in ode_NL_ms_mod and ode_SL_NL_ms_mod.

Author
Charles Pierre

Function/Subroutine Documentation

◆ name_ode_problem()

character(len=15) function, public ode_problem_mod::name_ode_problem ( integer, intent(in)  type)

ode_problem name

Definition at line 319 of file ode_problem_mod.f90.

◆ ode_problem_clear()

subroutine ode_problem_mod::ode_problem_clear ( type(ode_problem), intent(inout)  pb)
private

destructor for ode_problem

Definition at line 187 of file ode_problem_mod.f90.

◆ ode_problem_create()

type(ode_problem) function ode_problem_mod::ode_problem_create ( integer, intent(in)  type,
integer, optional  dim,
integer, optional  dof,
real(rp), dimension(:,:), optional  X,
procedure(rntorn), optional  M,
procedure(rntorn), optional  S,
procedure(ode_reaction), optional  AB,
integer, optional  N,
integer, optional  Na 
)
private

Constructor for the type ode_problem

  • INPUT:
    • type = type, ode problem type
    optional arguments:
    • dof : number of nodes
    • X : node coordinates
    • M, S : linear operators
    • AB : non linear operators
    • N, Na : problem dimensions
    • dim : set dim = 0 for 0D problems

Details are given in in ode_problem_mod detailed description

Definition at line 224 of file ode_problem_mod.f90.

Here is the call graph for this function:

◆ ode_problem_print()

subroutine ode_problem_mod::ode_problem_print ( type(ode_problem), intent(in)  pb)
private

print ode_problem

Definition at line 346 of file ode_problem_mod.f90.

Here is the call graph for this function:

◆ ode_problem_valid()

logical function ode_problem_mod::ode_problem_valid ( type(ode_problem), intent(in)  pb)
private

check ode_problem

Definition at line 263 of file ode_problem_mod.f90.