142 real(RP),
dimension(:,:),
allocatable :: x
148 procedure(rntorn),
nopass,
pointer :: m =>null()
151 procedure(rntorn),
nopass,
pointer :: s =>null()
225 integer ,
intent(in) :: type
226 integer ,
optional :: dim
227 integer ,
optional :: dof, N, Na
228 procedure(rntorn) ,
optional :: M, S
229 real(RP),
dimension(:,:) ,
optional :: X
233 &
"ode_problem_mod : ode_problem_create" 237 if (
present(dim))
then 239 if (dim==0)
call allocmem(pb%x, 3, 1)
242 if (
present(dof)) pb%dof = dof
243 if (
present(n )) pb%N = n
244 if (
present(na)) pb%Na = na
247 call allocmem(pb%X,
size(x,1),
size(x,2))
250 if (
present(m)) pb%M => m
251 if (
present(s)) pb%S => s
252 if (
present(ab)) pb%AB => ab
255 &
"ode_problem_mod: ode_problem_create: not valid")
268 if (.NOT.bool)
return 271 bool = (pb%N>=1) .AND. (pb%Na>=0) .AND. (pb%Na<=pb%N)
272 bool = bool .AND. (pb%dof >= 1)
273 if (.NOT.bool)
return 279 bool = (
allocated(pb%X))
280 if (.NOT.bool)
return 282 bool = (
size(pb%X,1)==3).AND.(
size(pb%X,2)==pb%dof)
283 if (.NOT.bool)
return 285 if (pb%dim == 0)
then 288 if (.NOT.bool)
return 296 bool =
associated(pb%M) .AND.
associated(pb%S)
299 bool =
associated(pb%AB)
302 bool =
associated(pb%M) .AND.
associated(pb%S)
303 bool = bool .AND.
associated(pb%AB)
306 bool = bool .AND. (pb%N==1)
309 bool =
associated(pb%M) .AND.
associated(pb%S)
310 bool = bool .AND.
associated(pb%AB)
319 integer,
intent(in) :: type
320 character(len=15) :: name
333 name =
"ODE_PB_SL_NL" 348 character(len=15) :: name
350 write(*,*)
"ode_problem_mod : ode_problem_print" 353 write(*,*)
" Problem type = ", name
354 write(*,*)
" Problem sizes N, Na =", pb%N, pb%Na
356 if (pb%dim == 0)
then 357 write(*,*)
" 0D problem, No disc. nodes in space" 359 write(*,*)
" Number of nodes in space =", pb%dof
363 write(*,*)
" Status = valid" 366 write(*,*)
" Status = invalid" 367 write(*,*)
" Associated M =",
associated(pb%M)
368 write(*,*)
" Associated S =",
associated(pb%S)
369 write(*,*)
" Associated AB =",
associated(pb%AB)
370 write(*,*)
" Allocated X =",
allocated(pb%X)
371 if (
allocated(pb%X))
then 372 write(*,*)
" Shape of the array X =", shape(pb%X)
DEFINITION OF ABSTRACT_INTERFACES FOR THE LIBRARY CHORAL
DERIVED TYPE ode_problem: definition of ODE/PDE problems
subroutine ode_problem_print(pb)
print ode_problem
integer, parameter ode_pb_tot_nb
Number of ode problem types.
REAL NUMBERS PRECISION IN CHORAL: selects simple/double/quad
integer, parameter ode_pb_sl
SemiLinear ODE : with .
integer, parameter ode_pb_lin
Linear ODE : .
logical function ode_problem_valid(pb)
check ode_problem
subroutine ode_problem_clear(pb)
destructor for ode_problem
type(ode_problem) function ode_problem_create(type, dim, dof, X, M, S, AB, N, Na)
Constructor for the type ode_problem
allocate memory for real(RP) arrays
BOTTOM LEVEL MODULE FOR ODEs
integer choral_verb
Verbosity level.
integer, parameter ode_pb_sl_nl
SemiLinear ODE coupled with a non-linear ODE system for with .
DEFINITION OF GLOBAL VARIABLES FOR THE LIBRARY CHORAL
character(len=15) function, public name_ode_problem(type)
ode_problem name
Type ode_problem: definition of ODE/PDE problems.
integer, parameter ode_pb_nl
Non-Linear ODE system: , .