72 procedure(rtor),
nopass,
pointer ::
f =>
f_c3 75 real(RP),
dimension(3) :: x0 = 0._rp
78 real(RP) :: t0 = 3._rp
81 real(RP) :: rt = 1._rp
84 real(RP) :: rx = 0.15_rp
87 real(RP) :: l = 1.0_rp
127 real(RP),
intent(in) :: L
128 real(RP),
intent(in) :: t0
129 real(RP),
intent(in) :: Rt
130 real(RP),
intent(in) :: Rx
131 real(RP),
dimension(3),
optional,
intent(in) :: x0
139 if (
present(x0))
then 145 if (.NOT.
associated(s%f))
call quit(
"stimulation_mod:& 146 & stimulation_create: invalid argument 'f'")
147 if (.NOT.(s%Rt>0._rp))
call quit(
"stimulation_mod:& 148 & stimulation_create: invalid argument 'Rt'")
149 if (.NOT.(s%Rx>0._rp))
call quit(
"stimulation_mod:& 150 & stimulation_create: invalid argument 'Rx'")
155 function stim(s, x, t)
result(res)
158 real(RP),
dimension(3),
intent(in) :: x
159 real(RP) ,
intent(in) :: t
163 t2 = abs( t - s%t0)/s%Rt
165 r = sqrt(sum( (x-s%x0)**2 ))/s%Rx
167 res = s%f(t2) * s%f(r) * s%L
real(rp) function stim(s, x, t)
DEFINITION OF ABSTRACT_INTERFACES FOR THE LIBRARY CHORAL
real(rp) function, public f_c3(t)
C3 function with support [-1,1].
PRE-DEFINED NUMERIC FUNCTIONS
REAL NUMBERS PRECISION IN CHORAL: selects simple/double/quad
Derived type stimulation.
type(stimulation) function stimulation_create(f, L, t0, Rt, Rx, x0)
Constructor for the type stimulation
real(rp) function f(x)
right hand side 'f'