40 use,
intrinsic :: iso_c_binding, only : c_ptr, c_associated, c_null_ptr
69 integer,
intent(in) :: order
77 allocate(this%coeffs_A(order, order))
78 allocate(this%coeffs_b(order))
79 allocate(this%coeffs_c(order))
82 coeffs_a => this%coeffs_A, &
83 coeffs_b => this%coeffs_b, &
84 coeffs_c => this%coeffs_c, &
85 coeffs_a_d => this%coeffs_A_d, &
86 coeffs_b_d => this%coeffs_b_d, &
87 coeffs_c_d => this%coeffs_c_d)
98 coeffs_a(1, 1) = 0.0_rp
104 coeffs_a(2, 1) = 1.0_rp
114 coeffs_a(2, 1) = 1.0_rp
115 coeffs_a(3, 1) = 0.25_rp
116 coeffs_a(3, 2) = 0.25_rp
118 coeffs_b(1) = 1.0_rp / 6.0_rp
119 coeffs_b(2) = 1.0_rp / 6.0_rp
120 coeffs_b(3) = 2.0_rp / 3.0_rp
128 coeffs_a(2, 1) = 0.5_rp
129 coeffs_a(3, 2) = 0.5_rp
130 coeffs_a(4, 3) = 1.0_rp
132 coeffs_b(1) = 1.0_rp / 6.0_rp
133 coeffs_b(2) = 1.0_rp / 3.0_rp
134 coeffs_b(3) = 1.0_rp / 3.0_rp
135 coeffs_b(4) = 1.0_rp / 6.0_rp
142 call neko_error(
"The time order must be 1 to 4.")
145 if (c_associated(coeffs_a_d))
then
150 if (c_associated(coeffs_b_d))
then
155 if (c_associated(coeffs_c_d))
then
169 if (
allocated(this%coeffs_A))
then
170 if (neko_bcknd_device .eq. 1)
then
171 call device_unmap(this%coeffs_A, this%coeffs_A_d)
173 deallocate(this%coeffs_A)
175 if (
allocated(this%coeffs_b))
then
176 if (neko_bcknd_device .eq. 1)
then
177 call device_unmap(this%coeffs_b, this%coeffs_b_d)
179 deallocate(this%coeffs_b)
181 if (
allocated(this%coeffs_c))
then
182 if (neko_bcknd_device .eq. 1)
then
183 call device_unmap(this%coeffs_c, this%coeffs_c_d)
185 deallocate(this%coeffs_c)