Choral
Data Types | Functions/Subroutines
ode_solver_mod Module Reference

TOP LEVEL MODULE FOR ODEs, derived type ode_solver More...

Data Types

interface  clear
 
interface  initialcond
 set initial conditions More...
 
interface  ode_solution
 
interface  ode_solver
 Type ode_solver. More...
 
interface  print
 
interface  solve
 Generic 'solve' for ODEs. More...
 
interface  valid
 

Functions/Subroutines

subroutine ode_solver_clear (slv)
 destructor for ode_solver More...
 
type(ode_solver) function ode_solver_create (pb, type, os_meth, SL_meth, NL_meth, L_meth, DC_meth, check_overflow, verb)
  Constructor for the type ode_solver More...
 
logical function ode_solver_valid (slv)
 check ode_solver More...
 
subroutine ode_solver_print (slv)
 print ode_solver More...
 
character(len=20) function, public name_ode_solver_type (type)
 name the type of ode_solver More...
 
logical function, public check_ode_method (method, pb_type, slv_type)
 check whether the ode method 'method' is available for the problem type 'pb_type' and for the solver type 'slv_type' More...
 
type(ode_solution) function ode_solution_create (slv, pb)
  Constructor for the type ode_solution More...
 
subroutine homogeneous_initialcond (sol, pb, slv, t0, y0)
 homogeneous initial condition More...
 
subroutine ode_solver_solve (sol, slv, pb, t0, T, dt, KInv, output)
  Solve an ODE with constant time step More...
 
subroutine, public set_ode_solver_output (slv, output)
  Load a user defined output for ODE resolution More...
 

Detailed Description

TOP LEVEL MODULE FOR ODEs, derived type ode_solver

This is the top level module for all modules ode_xxx.f90.
It contains the solve command for:

Choral constants for ODE solver types: ODE_SLV_xxx, see the list.

ODE RESOLUTION PROCEDURE:

  1. Define the ode_problem
    pb = ode_problem(problem_type, atgs)
    see ode_problem_mod detailed description
  2. Define the ode_solver
    slv = ode_solver(solver_type, pb, atgs)
    for details see ode_solver_create.
  3. Construct the ode_solution
    sol = ode_solution(sol, slv, pb)
  4. Set the initial condition
    call initialCond(sol, pb, slv, ...)
    see initialCond for details.
  5. Solve with
    call solve(sol, slv, pb, ...)
    see ode_solver_solve for drtails

OPTIONAL: Output and linear system inversions.

Tutorial examples:

Author
Charles Pierre

Function/Subroutine Documentation

◆ check_ode_method()

logical function, public ode_solver_mod::check_ode_method ( integer, intent(in)  method,
integer, intent(in)  pb_type,
integer, intent(in)  slv_type 
)

check whether the ode method 'method' is available for the problem type 'pb_type' and for the solver type 'slv_type'

Definition at line 495 of file ode_solver_mod.f90.

Here is the call graph for this function:

◆ homogeneous_initialcond()

subroutine ode_solver_mod::homogeneous_initialcond ( type(ode_solution), intent(inout)  sol,
type(ode_problem ), intent(in)  pb,
type(ode_solver), intent(in)  slv,
real(rp), intent(in)  t0,
real(rp), dimension(:), intent(in)  y0 
)
private

homogeneous initial condition

Definition at line 626 of file ode_solver_mod.f90.

Here is the call graph for this function:

◆ name_ode_solver_type()

character(len=20) function, public ode_solver_mod::name_ode_solver_type ( integer, intent(in)  type)

name the type of ode_solver

Definition at line 467 of file ode_solver_mod.f90.

◆ ode_solution_create()

type(ode_solution) function ode_solver_mod::ode_solution_create ( type(ode_solver), intent(in)  slv,
type(ode_problem), intent(in)  pb 
)
private

Constructor for the type ode_solution

Definition at line 553 of file ode_solver_mod.f90.

Here is the call graph for this function:

◆ ode_solver_clear()

subroutine ode_solver_mod::ode_solver_clear ( type(ode_solver), intent(inout)  slv)
private

destructor for ode_solver

Definition at line 246 of file ode_solver_mod.f90.

Here is the call graph for this function:

◆ ode_solver_create()

type(ode_solver) function ode_solver_mod::ode_solver_create ( type(ode_problem), intent(in)  pb,
integer, intent(in)  type,
integer, intent(in), optional  os_meth,
integer, intent(in), optional  SL_meth,
integer, intent(in), optional  NL_meth,
integer, intent(in), optional  L_meth,
integer, intent(in), optional  DC_meth,
logical, intent(in), optional  check_overflow,
integer, intent(in), optional  verb 
)
private

Constructor for the type ode_solver

  • INPUT:
    • type = solver type
    • pb = ode_problem . optional arguments
    • os_meth = operator splitting method
    • L_meth = linear ode method
    • SL_meth = semilinear ode method
    • DC_meth = deferred correction method
    • NL_meth = non linear ODE method
    • verb = verbosity level
    • check_overflow = checks overflow when solving

Definition at line 285 of file ode_solver_mod.f90.

Here is the call graph for this function:

◆ ode_solver_print()

subroutine ode_solver_mod::ode_solver_print ( type(ode_solver), intent(in)  slv)
private

print ode_solver

Definition at line 412 of file ode_solver_mod.f90.

Here is the call graph for this function:

◆ ode_solver_solve()

subroutine ode_solver_mod::ode_solver_solve ( type(ode_solution), intent(inout)  sol,
type(ode_solver), intent(inout)  slv,
type(ode_problem), intent(in)  pb,
real(rp), intent(in)  t0,
real(rp), intent(in)  T,
real(rp), intent(in)  dt,
procedure(linsystem_solver), optional  KInv,
type(ode_output), optional  output 
)
private

Solve an ODE with constant time step

  • INPUT:
    • slv = ode_solver
    • pb = ode_problem
    • t0, t = starting and final time
    • dt = time step
    Optional:
    • KInv = inversion of the linear system \( (M + cS)u = {\rm rhs} \)
    • output = ode_output type definition
    Detail on 'KInv' and on 'output' are in ode_solver_mod detailed description.

Definition at line 715 of file ode_solver_mod.f90.

Here is the call graph for this function:

◆ ode_solver_valid()

logical function ode_solver_mod::ode_solver_valid ( type(ode_solver), intent(in)  slv)
private

check ode_solver

Definition at line 344 of file ode_solver_mod.f90.

Here is the call graph for this function:

◆ set_ode_solver_output()

subroutine, public ode_solver_mod::set_ode_solver_output ( type(ode_solver), intent(inout)  slv,
procedure(ode_output_proc output 
)

Load a user defined output for ODE resolution

Set slv%output

Definition at line 872 of file ode_solver_mod.f90.