Skip to content

Commit ad2d202

Browse files
committed
Merge branch 'release/0.2.0'
2 parents 4cee9ce + abc9742 commit ad2d202

32 files changed

Lines changed: 1223 additions & 1266 deletions

fobos

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,28 @@ $EXDIRS = FACE/src/tests FACE/src/third_party/
2626
# GNU
2727
[shared-gnu]
2828
template = template-shared-gnu
29-
target = wenoof.f90
29+
target = wenoof.F90
3030
build_dir = ./shared/
3131
output = libwenoof.so
3232
mklib = shared
3333

3434
[static-gnu]
3535
template = template-static-gnu
36-
target = wenoof.f90
36+
target = wenoof.F90
3737
build_dir = ./static/
3838
output = libwenoof.a
3939
mklib = static
4040

4141
[shared-gnu-debug]
4242
template = template-shared-gnu-debug
43-
target = wenoof.f90
43+
target = wenoof.F90
4444
build_dir = ./shared/
4545
output = libwenoof.so
4646
mklib = shared
4747

4848
[static-gnu-debug]
4949
template = template-static-gnu-debug
50-
target = wenoof.f90
50+
target = wenoof.F90
5151
build_dir = ./static/
5252
output = libwenoof.a
5353
mklib = static
@@ -63,28 +63,28 @@ build_dir = ./exe/
6363
# Intel
6464
[shared-intel]
6565
template = template-shared-intel
66-
target = wenoof.f90
66+
target = wenoof.F90
6767
build_dir = ./shared/
6868
output = libwenoof.so
6969
mklib = shared
7070

7171
[static-intel]
7272
template = template-static-intel
73-
target = wenoof.f90
73+
target = wenoof.F90
7474
build_dir = ./static/
7575
output = libwenoof.a
7676
mklib = static
7777

7878
[shared-intel-debug]
7979
template = template-shared-intel-debug
80-
target = wenoof.f90
80+
target = wenoof.F90
8181
build_dir = ./shared/
8282
output = libwenoof.so
8383
mklib = shared
8484

8585
[static-intel-debug]
8686
template = template-static-intel-debug
87-
target = wenoof.f90
87+
target = wenoof.F90
8888
build_dir = ./static/
8989
output = libwenoof.a
9090
mklib = static

src/lib/abstract_objects/wenoof_alpha_object.F90

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ module wenoof_alpha_object
77
#else
88
use penf, only: RPP=>R8P
99
#endif
10-
use wenoof_base_object
11-
use wenoof_beta_object
12-
use wenoof_kappa_object
10+
use wenoof_base_object, only : base_object, base_object_constructor
1311

1412
implicit none
1513
private
@@ -23,24 +21,32 @@ module wenoof_alpha_object
2321

2422
type, extends(base_object), abstract :: alpha_object
2523
!< Abstract alpha (non linear weights) object.
26-
real(RPP), allocatable :: values_rank_1(:) !< Alpha values [0:S-1].
27-
real(RPP) :: values_sum_rank_1 !< Sum of alpha coefficients.
28-
real(RPP), allocatable :: values_rank_2(:,:) !< Alpha values [1:2,0:S-1].
29-
real(RPP), allocatable :: values_sum_rank_2(:) !< Sum of alpha coefficients [1:2].
3024
contains
25+
! public methods
26+
generic :: compute => compute_int, compute_rec !< Compute alpha.
3127
! public deferred methods
32-
procedure(compute_interface), pass(self), deferred :: compute !< Compute alpha.
28+
procedure(compute_int_interface), pass(self), deferred :: compute_int !< Compute alpha (interpolate).
29+
procedure(compute_rec_interface), pass(self), deferred :: compute_rec !< Compute alpha (reconstruct).
3330
endtype alpha_object
3431

3532
abstract interface
3633
!< Abstract interfaces of [[alpha_object]].
37-
pure subroutine compute_interface(self, beta, kappa)
38-
!< Compute alpha.
39-
import :: alpha_object, beta_object, kappa_object
40-
class(alpha_object), intent(inout) :: self !< Alpha.
41-
class(beta_object), intent(in) :: beta !< Beta.
42-
class(kappa_object), intent(in) :: kappa !< Kappa.
43-
endsubroutine compute_interface
44-
endinterface
34+
pure subroutine compute_int_interface(self, beta, kappa, values)
35+
!< Compute alpha (interpolate).
36+
import :: alpha_object, RPP
37+
class(alpha_object), intent(in) :: self !< Alpha.
38+
real(RPP), intent(in) :: beta(0:) !< Beta [0:S-1].
39+
real(RPP), intent(in) :: kappa(0:) !< Kappa [0:S-1].
40+
real(RPP), intent(out) :: values(0:) !< Alpha values [0:S-1].
41+
endsubroutine compute_int_interface
4542

43+
pure subroutine compute_rec_interface(self, beta, kappa, values)
44+
!< Compute alpha (reconstruct).
45+
import :: alpha_object, RPP
46+
class(alpha_object), intent(in) :: self !< Alpha.
47+
real(RPP), intent(in) :: beta(1:,0:) !< Beta [1:2,0:S-1].
48+
real(RPP), intent(in) :: kappa(1:,0:) !< Kappa [1:2,0:S-1].
49+
real(RPP), intent(out) :: values(1:,0:) !< Alpha values [1:2,0:S-1].
50+
endsubroutine compute_rec_interface
51+
endinterface
4652
endmodule wenoof_alpha_object

src/lib/abstract_objects/wenoof_base_object.F90

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@ subroutine create_interface(self, constructor)
5252
class(base_object_constructor), intent(in) :: constructor !< Object constructor.
5353
endsubroutine create_interface
5454

55-
pure function description_interface(self) result(string)
55+
pure function description_interface(self, prefix) result(string)
5656
!< Return object string-description.
5757
import :: base_object
58-
class(base_object), intent(in) :: self !< Object.
59-
character(len=:), allocatable :: string !< String-description.
58+
class(base_object), intent(in) :: self !< Object.
59+
character(len=*), intent(in), optional :: prefix !< Prefixing string.
60+
character(len=:), allocatable :: string !< String-description.
6061
endfunction description_interface
6162

6263
elemental subroutine destroy_interface(self)

src/lib/abstract_objects/wenoof_beta_object.F90

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module wenoof_beta_object
77
#else
88
use penf, only: RPP=>R8P
99
#endif
10-
use wenoof_base_object
10+
use wenoof_base_object, only : base_object, base_object_constructor
1111

1212
implicit none
1313
private
@@ -20,31 +20,30 @@ module wenoof_beta_object
2020

2121
type, extends(base_object), abstract :: beta_object
2222
!< Abstract Beta coefficients (smoothness indicators of stencil interpolations) object.
23-
real(RPP), allocatable :: values_rank_1(:) !< Beta values [0:S-1].
24-
real(RPP), allocatable :: values_rank_2(:,:) !< Beta values [1:2,0:S-1].
2523
contains
2624
! public methods
27-
generic :: compute => compute_with_stencil_of_rank_1, compute_with_stencil_of_rank_2
25+
generic :: compute => compute_int, compute_rec !< Compute beta.
2826
! deferred public methods
29-
procedure(compute_with_stencil_of_rank_1_interface), pass(self), deferred :: compute_with_stencil_of_rank_1!< Compute beta.
30-
procedure(compute_with_stencil_of_rank_2_interface), pass(self), deferred :: compute_with_stencil_of_rank_2!< Compute beta.
27+
procedure(compute_int_interface), pass(self), deferred :: compute_int !< Compute beta (interpolate).
28+
procedure(compute_rec_interface), pass(self), deferred :: compute_rec !< Compute beta (reconstruct).
3129
endtype beta_object
3230

3331
abstract interface
3432
!< Abstract interfaces of [[beta_object]].
35-
pure subroutine compute_with_stencil_of_rank_1_interface(self, stencil)
36-
!< Compute beta.
33+
pure subroutine compute_int_interface(self, stencil, values)
34+
!< Compute beta (interpolate).
3735
import :: beta_object, RPP
38-
class(beta_object), intent(inout) :: self !< Beta.
39-
real(RPP), intent(in) :: stencil(1-self%S:) !< Stencil used for the interpolation, [1-S:-1+S].
40-
endsubroutine compute_with_stencil_of_rank_1_interface
36+
class(beta_object), intent(in) :: self !< Beta.
37+
real(RPP), intent(in) :: stencil(1-self%S:) !< Stencil used for the interpolation, [1-S:-1+S].
38+
real(RPP), intent(out) :: values(0:) !< Beta values [0:S-1].
39+
endsubroutine compute_int_interface
4140

42-
pure subroutine compute_with_stencil_of_rank_2_interface(self, stencil)
43-
!< Compute beta.
41+
pure subroutine compute_rec_interface(self, stencil, values)
42+
!< Compute beta (reconstruct).
4443
import :: beta_object, RPP
45-
class(beta_object), intent(inout) :: self !< Beta.
46-
real(RPP), intent(in) :: stencil(1:,1-self%S:) !< Stencil used for the interpolation, [1:2, 1-S:-1+S].
47-
endsubroutine compute_with_stencil_of_rank_2_interface
44+
class(beta_object), intent(in) :: self !< Beta.
45+
real(RPP), intent(in) :: stencil(1:,1-self%S:) !< Stencil used for the interpolation, [1:2, 1-S:-1+S].
46+
real(RPP), intent(out) :: values(1:,0:) !< Beta values [1:2,0:S-1].
47+
endsubroutine compute_rec_interface
4848
endinterface
49-
5049
endmodule wenoof_beta_object

src/lib/abstract_objects/wenoof_interpolations_object.F90

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module wenoof_interpolations_object
77
#else
88
use penf, only: RPP=>R8P
99
#endif
10-
use wenoof_base_object
10+
use wenoof_base_object, only : base_object, base_object_constructor
1111

1212
implicit none
1313
private
@@ -16,37 +16,36 @@ module wenoof_interpolations_object
1616

1717
type, extends(base_object_constructor), abstract :: interpolations_object_constructor
1818
!< Abstract interpolations object constructor.
19-
real(RPP), allocatable :: stencil(:) !< Stencil used for interpolation, [1-S:S-1].
20-
real(RPP) :: x_target !< Coordinate of the interpolation point.
19+
real(RPP), allocatable :: stencil(:) !< Stencil used for interpolation, [1-S:S-1].
20+
real(RPP) :: x_target !< Coordinate of the interpolation point.
2121
endtype interpolations_object_constructor
2222

2323
type, extends(base_object), abstract :: interpolations_object
2424
!< Abstract interpolations object.
25-
real(RPP), allocatable :: values_rank_1(:) !< Stencil interpolations values [0:S-1].
26-
real(RPP), allocatable :: values_rank_2(:,:) !< Stencil interpolations values [1:2,0:S-1].
2725
contains
2826
! public methods
29-
generic :: compute => compute_with_stencil_of_rank_1, compute_with_stencil_of_rank_2
27+
generic :: compute => compute_int, compute_rec !< Compute interpolations.
3028
! deferred public methods
31-
procedure(compute_with_stencil_of_rank_1_interface), pass(self), deferred :: compute_with_stencil_of_rank_1!< Compute interp.
32-
procedure(compute_with_stencil_of_rank_2_interface), pass(self), deferred :: compute_with_stencil_of_rank_2!< Compute interp.
29+
procedure(compute_int_interface), pass(self), deferred :: compute_int !< Compute interpolations (interpolate).
30+
procedure(compute_rec_interface), pass(self), deferred :: compute_rec !< Compute interpolations (reconstruct).
3331
endtype interpolations_object
3432

3533
abstract interface
3634
!< Abstract interfaces of [[interpolations_object]].
37-
pure subroutine compute_with_stencil_of_rank_1_interface(self, stencil)
38-
!< Compute interpolations.
35+
pure subroutine compute_int_interface(self, stencil, values)
36+
!< Compute interpolations (interpolate).
3937
import :: interpolations_object, RPP
40-
class(interpolations_object), intent(inout) :: self !< Interpolations.
41-
real(RPP), intent(in) :: stencil(1-self%S:) !< Stencil used for the interpolation, [1-S:-1+S].
42-
endsubroutine compute_with_stencil_of_rank_1_interface
38+
class(interpolations_object), intent(in) :: self !< Interpolations.
39+
real(RPP), intent(in) :: stencil(1-self%S:) !< Stencil used for the interpolation, [1-S:-1+S].
40+
real(RPP), intent(out) :: values(0:) !< Interpolations values.
41+
endsubroutine compute_int_interface
4342

44-
pure subroutine compute_with_stencil_of_rank_2_interface(self, stencil)
45-
!< Compute interpolations.
43+
pure subroutine compute_rec_interface(self, stencil, values)
44+
!< Compute interpolations (reconstruct).
4645
import :: interpolations_object, RPP
47-
class(interpolations_object), intent(inout) :: self !< Interpolations.
48-
real(RPP), intent(in) :: stencil(1:,1-self%S:) !< Stencil used for the interpolation, [1:2, 1-S:-1+S].
49-
endsubroutine compute_with_stencil_of_rank_2_interface
46+
class(interpolations_object), intent(in) :: self !< Interpolations.
47+
real(RPP), intent(in) :: stencil(1:,1-self%S:) !< Stencil used for the interpolation, [1:2, 1-S:-1+S].
48+
real(RPP), intent(out) :: values(1:, 0:) !< Interpolations values.
49+
endsubroutine compute_rec_interface
5050
endinterface
51-
5251
endmodule wenoof_interpolations_object

src/lib/abstract_objects/wenoof_interpolator_object.F90

Lines changed: 37 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ module wenoof_interpolator_object
77
#else
88
use penf, only: RPP=>R8P
99
#endif
10-
use wenoof_base_object
11-
use wenoof_interpolations_object
12-
use wenoof_weights_object
10+
use wenoof_base_object, only : base_object, base_object_constructor
11+
use wenoof_interpolations_object, only : interpolations_object, interpolations_object_constructor
12+
use wenoof_weights_object, only : weights_object, weights_object_constructor
1313

1414
implicit none
1515
private
@@ -32,56 +32,51 @@ module wenoof_interpolator_object
3232
class(weights_object), allocatable :: weights !< Weights of interpolations.
3333
contains
3434
! public methods
35-
generic :: interpolate => interpolate_with_stencil_of_rank_1_debug, interpolate_with_stencil_of_rank_2_debug, &
36-
interpolate_with_stencil_of_rank_1_standard, interpolate_with_stencil_of_rank_2_standard
35+
generic :: interpolate => interpolate_int_debug, interpolate_rec_debug, &
36+
interpolate_int_standard, interpolate_rec_standard !< Interpolate.
3737
! public deferred methods
38-
procedure(interpolate_with_stencil_of_rank_1_debug_interface), pass(self), &
39-
deferred :: interpolate_with_stencil_of_rank_1_debug
40-
procedure(interpolate_with_stencil_of_rank_2_debug_interface), pass(self), &
41-
deferred :: interpolate_with_stencil_of_rank_2_debug
42-
procedure(interpolate_with_stencil_of_rank_1_standard_interface), pass(self), &
43-
deferred :: interpolate_with_stencil_of_rank_1_standard
44-
procedure(interpolate_with_stencil_of_rank_2_standard_interface), pass(self), &
45-
deferred :: interpolate_with_stencil_of_rank_2_standard
38+
procedure(interpolate_int_debug_interface), pass(self), deferred :: interpolate_int_debug !< Interpolate (int) debug.
39+
procedure(interpolate_int_standard_interface), pass(self), deferred :: interpolate_int_standard !< Interpolate (int) standard.
40+
procedure(interpolate_rec_debug_interface), pass(self), deferred :: interpolate_rec_debug !< Interpolate (rec) debug.
41+
procedure(interpolate_rec_standard_interface), pass(self), deferred :: interpolate_rec_standard !< Interpolate (rec) standard.
4642
endtype interpolator_object
4743

4844
abstract interface
4945
!< Abstract interfaces of [[interpolator_object]].
50-
pure subroutine interpolate_with_stencil_of_rank_1_debug_interface(self, stencil, interpolation, si, weights)
51-
!< Interpolate values (providing also debug values).
46+
pure subroutine interpolate_int_debug_interface(self, stencil, interpolation, si, weights)
47+
!< Interpolate (interpolate) values (providing also debug values).
5248
import :: interpolator_object, RPP
53-
class(interpolator_object), intent(inout) :: self !< Interpolator.
54-
real(RPP), intent(in) :: stencil(1 - self%S:) !< Stencil of the interpolation [1-S:-1+S].
55-
real(RPP), intent(out) :: interpolation !< Result of the interpolation.
56-
real(RPP), intent(out) :: si(0:) !< Computed values of smoothness indicators [0:S-1].
57-
real(RPP), intent(out) :: weights(0:) !< Weights of the stencils, [0:S-1].
58-
endsubroutine interpolate_with_stencil_of_rank_1_debug_interface
49+
class(interpolator_object), intent(in) :: self !< Interpolator.
50+
real(RPP), intent(in) :: stencil(1 - self%S:) !< Stencil of the interpolation [1-S:-1+S].
51+
real(RPP), intent(out) :: interpolation !< Result of the interpolation.
52+
real(RPP), intent(out) :: si(0:) !< Computed values of smoothness indicators [0:S-1].
53+
real(RPP), intent(out) :: weights(0:) !< Weights of the stencils, [0:S-1].
54+
endsubroutine interpolate_int_debug_interface
5955

60-
pure subroutine interpolate_with_stencil_of_rank_2_debug_interface(self, stencil, interpolation, si, weights)
61-
!< Interpolate values (providing also debug values).
56+
pure subroutine interpolate_int_standard_interface(self, stencil, interpolation)
57+
!< Interpolate (interpolate) values (without providing debug values).
6258
import :: interpolator_object, RPP
63-
class(interpolator_object), intent(inout) :: self !< Interpolator.
64-
real(RPP), intent(in) :: stencil(1:, 1 - self%S:) !< Stencil of the interpolation [1:2, 1-S:-1+S].
65-
real(RPP), intent(out) :: interpolation(1:) !< Result of the interpolation, [1:2].
66-
real(RPP), intent(out) :: si(1:, 0:) !< Computed values of smoothness indicators [1:2, 0:S-1].
67-
real(RPP), intent(out) :: weights(1:, 0:) !< Weights of the stencils, [1:2, 0:S-1].
68-
endsubroutine interpolate_with_stencil_of_rank_2_debug_interface
59+
class(interpolator_object), intent(in) :: self !< Interpolator.
60+
real(RPP), intent(in) :: stencil(1 - self%S:) !< Stencil of the interpolation [1-S:-1+S].
61+
real(RPP), intent(out) :: interpolation !< Result of the interpolation.
62+
endsubroutine interpolate_int_standard_interface
6963

70-
pure subroutine interpolate_with_stencil_of_rank_1_standard_interface(self, stencil, interpolation)
71-
!< Interpolate values (without providing debug values).
64+
pure subroutine interpolate_rec_debug_interface(self, stencil, interpolation, si, weights)
65+
!< Interpolate (reconstruct) values (providing also debug values).
7266
import :: interpolator_object, RPP
73-
class(interpolator_object), intent(inout) :: self !< Interpolator.
74-
real(RPP), intent(in) :: stencil(1 - self%S:) !< Stencil of the interpolation [1-S:-1+S].
75-
real(RPP), intent(out) :: interpolation !< Result of the interpolation.
76-
endsubroutine interpolate_with_stencil_of_rank_1_standard_interface
67+
class(interpolator_object), intent(in) :: self !< Interpolator.
68+
real(RPP), intent(in) :: stencil(1:, 1 - self%S:) !< Stencil of the interpolation [1:2, 1-S:-1+S].
69+
real(RPP), intent(out) :: interpolation(1:) !< Result of the interpolation, [1:2].
70+
real(RPP), intent(out) :: si(1:, 0:) !< Computed values of smoothness indicators [1:2, 0:S-1].
71+
real(RPP), intent(out) :: weights(1:, 0:) !< Weights of the stencils, [1:2, 0:S-1].
72+
endsubroutine interpolate_rec_debug_interface
7773

78-
pure subroutine interpolate_with_stencil_of_rank_2_standard_interface(self, stencil, interpolation)
79-
!< Interpolate values (without providing debug values).
74+
pure subroutine interpolate_rec_standard_interface(self, stencil, interpolation)
75+
!< Interpolate (reconstruct) values (without providing debug values).
8076
import :: interpolator_object, RPP
81-
class(interpolator_object), intent(inout) :: self !< Interpolator.
82-
real(RPP), intent(in) :: stencil(1:, 1 - self%S:) !< Stencil of the interpolation [1:2, 1-S:-1+S].
83-
real(RPP), intent(out) :: interpolation(1:) !< Result of the interpolation, [1:2].
84-
endsubroutine interpolate_with_stencil_of_rank_2_standard_interface
77+
class(interpolator_object), intent(in) :: self !< Interpolator.
78+
real(RPP), intent(in) :: stencil(1:, 1 - self%S:) !< Stencil of the interpolation [1:2, 1-S:-1+S].
79+
real(RPP), intent(out) :: interpolation(1:) !< Result of the interpolation, [1:2].
80+
endsubroutine interpolate_rec_standard_interface
8581
endinterface
86-
8782
endmodule wenoof_interpolator_object

0 commit comments

Comments
 (0)