@@ -34,7 +34,6 @@ module foodie_integrator_euler_explicit
3434 contains
3535 ! deferred methods
3636 procedure , pass(self) :: class_name ! < Return the class name of schemes.
37- procedure , pass(self) :: description ! < Return pretty-printed object description.
3837 procedure , pass(self) :: has_fast_mode ! < Return .true. if the integrator class has *fast mode* integrate.
3938 procedure , pass(lhs) :: integr_assign_integr ! < Operator `=`.
4039 procedure , pass(self) :: integrate ! < Integrate integrand field.
@@ -55,17 +54,6 @@ pure function class_name(self)
5554 class_name = trim (adjustl (class_name_))
5655 end function class_name
5756
58- pure function description (self , prefix ) result(desc)
59- ! < Return a pretty-formatted object description.
60- class(integrator_euler_explicit), intent (in ) :: self ! < Integrator.
61- character (* ), intent (in ), optional :: prefix ! < Prefixing string.
62- character (len= :), allocatable :: desc ! < Description.
63- character (len= :), allocatable :: prefix_ ! < Prefixing string, local variable.
64-
65- prefix_ = ' ' ; if (present (prefix)) prefix_ = prefix
66- desc = prefix_// ' Euler, Explicit (1 step/stage) 1st order scheme'
67- end function description
68-
6957 elemental function has_fast_mode (self )
7058 ! < Return .true. if the integrator class has *fast mode* integrate.
7159 class(integrator_euler_explicit), intent (in ) :: self ! < Integrator.
@@ -142,22 +130,23 @@ elemental subroutine destroy(self)
142130 call self% destroy_multistage
143131 end subroutine destroy
144132
145- subroutine initialize (self , scheme , U , stop_on_fail )
146- ! < Create the actual RK integrator: initialize the Butcher' table coefficients.
147- class(integrator_euler_explicit), intent (inout ) :: self ! < Integrator.
148- character (* ), intent (in ) :: scheme ! < Selected scheme.
149- class(integrand_object), intent (in ), optional :: U ! < Integrand molding prototype.
150- logical , intent (in ), optional :: stop_on_fail ! < Stop execution if initialization fail.
151-
152- if (self% is_supported(scheme= scheme)) then
153- call self% destroy
154- self% stages = 0
155- self% registers = self% stages
156- if (present (U)) call self% allocate_integrand_members(U= U)
157- else
158- call self% trigger_error(error= ERROR_UNSUPPORTED_SCHEME, &
159- error_message= ' "' // trim (adjustl (scheme))// ' " unsupported scheme' , &
160- is_severe= stop_on_fail)
161- endif
162- end subroutine initialize
133+ subroutine initialize (self , scheme , U , stop_on_fail )
134+ ! < Create the actual RK integrator: initialize the Butcher' table coefficients.
135+ class(integrator_euler_explicit), intent (inout ) :: self ! < Integrator.
136+ character (* ), intent (in ) :: scheme ! < Selected scheme.
137+ class(integrand_object), intent (in ), optional :: U ! < Integrand molding prototype.
138+ logical , intent (in ), optional :: stop_on_fail ! < Stop execution if initialization fail.
139+
140+ if (self% is_supported(scheme= scheme)) then
141+ call self% destroy
142+ self% description_ = trim (adjustl (scheme))
143+ self% stages = 0
144+ self% registers = self% stages
145+ if (present (U)) call self% allocate_integrand_members(U= U)
146+ else
147+ call self% trigger_error(error= ERROR_UNSUPPORTED_SCHEME, &
148+ error_message= ' "' // trim (adjustl (scheme))// ' " unsupported scheme' , &
149+ is_severe= stop_on_fail)
150+ endif
151+ end subroutine initialize
163152endmodule foodie_integrator_euler_explicit
0 commit comments