diff --git a/CMakeLists.txt b/CMakeLists.txt index f0f6b63..0997fcc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,6 +54,9 @@ target_link_libraries (stell $<$,$>:LAPACK::LAPACK> $<$,$>:${BLAS_LIBRARIES}> $<$,$>:${LAPACK_LIBRARIES}> +# sanitizer +# traps +# checks ) target_include_directories (stell diff --git a/Sources/Miscel/line_segment.f b/Sources/Miscel/line_segment.f index 2295b95..c5c44e8 100644 --- a/Sources/Miscel/line_segment.f +++ b/Sources/Miscel/line_segment.f @@ -321,7 +321,7 @@ PURE FUNCTION y_value_int(x0, x1, yy, xx, ilow, ihigh) y_value_int = 0.0 ELSE y_value_int = slope(yy, xx, ilow, ihigh) & - & / 2.0*(x1**2.0 - x0**2.0) & + & / 2.0*(x1*x1 - x0*x0) & & + offset(yy, xx, ilow, ihigh)*(x1 - x0) END IF diff --git a/Sources/Modules/integration_path.f b/Sources/Modules/integration_path.f index 7f1541e..c9e5b5f 100644 --- a/Sources/Modules/integration_path.f +++ b/Sources/Modules/integration_path.f @@ -160,12 +160,12 @@ MODULE integration_path !> @param[in] length Length of the interval. !> @returns A pointer to a constructed @ref integration_path_class object. !------------------------------------------------------------------------------- - FUNCTION make_integrator(method, npoints, length) + FUNCTION make_integrator(method, npoints, length) RESULT(res) IMPLICIT NONE ! Declare Arguments - CLASS (integration_path_class), POINTER :: make_integrator + CLASS (integration_path_class), POINTER :: res CHARACTER (len=*), INTENT(in) :: method INTEGER, INTENT(in) :: npoints REAL (rprec), INTENT(in) :: length @@ -179,14 +179,13 @@ FUNCTION make_integrator(method, npoints, length) SELECT CASE (method) CASE ('add') - make_integrator => integration_path_class() + res => integration_path_class() CASE ('gleg') - make_integrator => integration_path_gleg_class(npoints) + res => integration_path_gleg_class(npoints) CASE ('hp_gleg') - make_integrator => integration_path_hp_glep_class(npoints, & - & length) + res => integration_path_hp_glep_class(npoints, length) END SELECT @@ -442,8 +441,8 @@ RECURSIVE FUNCTION integration_path_integrate_paths(this, path, & start_time = profiler_get_start_time() IF (ASSOCIATED(path%next)) THEN - total = this%integrate(path%next, context) - total = total + this%integrate(context, path, path%next) + total = this%integrate_paths(path%next, context) & + & + this%integrate_path(context, path, path%next) ELSE total = 0.0 END IF @@ -997,8 +996,7 @@ FUNCTION path_test() & (/ 2.0_rprec, 0.0_rprec, 0.0_rprec /)) CALL path_append_vertex(test_path, & & (/ 0.0_rprec, 0.0_rprec, 0.0_rprec /)) - result = integration_path_integrate_paths(int_params, test_path, & - & context) + result = int_params%integrate(test_path, context) path_test = check(2.0_rprec, result, 1, 'path_integrate') IF (.not.path_test) THEN RETURN