Skip to content

Commit 6ddc0f9

Browse files
authored
Merge pull request #67 from gha3mi/devel
Feature Additions, Bug Fixes, and Compiler Compatibility Improvements
2 parents 18486ab + 393623c commit 6ddc0f9

15 files changed

+1726
-558
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ To install PyVista, run the following command:
108108
pip install pyvista
109109
```
110110

111+
By default PyVista visualization is enabled. To disable it, define the preprocessor flag `NOSHOW_PYVISTA` in the `fpm.toml` file or pass it as a compiler flag.
112+
111113
### Using fpm
112114

113115
#### Running Examples with fpm

example/nearest_point_1d.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ program nearest_point_1d
77
type(nurbs_curve) :: shape !! Declare a NURBS curve object
88
real(rk), allocatable :: Xc(:,:), Wc(:) !! Arrays for control points and weights
99
real(rk) :: knot(6) !! Array for knot vector
10-
real(rk), allocatable :: nearest_Xg(:) !! Array for the nearest point on the curve
10+
real(rk) :: nearest_Xg(3) !! Array for the nearest point on the curve
1111
real(rk) :: nearest_Xt !! Array for the parametric coordinates of the nearest point
1212
integer :: id !! Variable for the id of the nearest point
1313

@@ -70,6 +70,6 @@ program nearest_point_1d
7070

7171
!> Finalize the NURBS curve object
7272
call shape%finalize()
73-
deallocate(nearest_Xg, Xc, Wc)
73+
deallocate(Xc, Wc)
7474

7575
end program

example/nearest_point_2d.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ program nearest_point_2d
55
implicit none
66

77
type(nurbs_surface) :: shape !! Declare a NURBS surface object
8-
real(rk), allocatable :: nearest_Xg(:) !! Coordinates of the nearest point on the surface
9-
real(rk), allocatable :: nearest_Xt(:) !! Corresponding parametric coordinates of the nearest point
8+
real(rk) :: nearest_Xg(3) !! Coordinates of the nearest point on the surface
9+
real(rk) :: nearest_Xt(2) !! Corresponding parametric coordinates of the nearest point
1010
integer :: id !! id of the nearest point
1111
real(rk) :: Xc(4,3) !! Control points
1212
real(rk) :: Wc(4) !! Weights of the control points

example/nearest_point_2d_bench.f90

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ program nearest_point_2d_bench
66
implicit none
77

88
type(nurbs_surface) :: shape !! Declare a NURBS surface object
9-
real(rk), allocatable :: nearest_Xg(:) !! Coordinates of the nearest point on the surface
10-
real(rk), allocatable :: nearest_Xt(:) !! Corresponding parametric coordinates of the nearest point
9+
real(rk) :: nearest_Xg(3) !! Coordinates of the nearest point on the surface
10+
real(rk) :: nearest_Xt(2) !! Corresponding parametric coordinates of the nearest point
1111
integer :: id !! id of the nearest point
1212
real(rk), allocatable :: points(:,:)
13+
real(rk) :: pointsi(3)
1314
integer :: i, j
1415
type(timer) :: t
1516

@@ -42,7 +43,8 @@ program nearest_point_2d_bench
4243
call random_number(points)
4344
call t%timer_start()
4445
do i = 1, size(points,1)
45-
call shape%nearest_point(points(i,:), nearest_Xg, nearest_Xt, id)
46+
pointsi = points(i,:)
47+
call shape%nearest_point(pointsi, nearest_Xg, nearest_Xt, id)
4648
end do
4749
call t%timer_stop()
4850
deallocate(points)
@@ -53,6 +55,5 @@ program nearest_point_2d_bench
5355

5456
!> Finalize the NURBS surface object
5557
call shape%finalize()
56-
deallocate(nearest_Xg, nearest_Xt)
5758

5859
end program

example/nearest_point_3d.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ program nearest_point_3d
55
implicit none
66

77
type(nurbs_volume) :: shape !! Declare a NURBS volume object
8-
real(rk), allocatable :: nearest_Xg(:) !! Coordinates of the nearest point on the volume
9-
real(rk), allocatable :: nearest_Xt(:) !! Corresponding parametric coordinates of the nearest point
8+
real(rk) :: nearest_Xg(3) !! Coordinates of the nearest point on the volume
9+
real(rk) :: nearest_Xt(3) !! Corresponding parametric coordinates of the nearest point
1010
integer :: id !! id of the nearest point
1111
real(rk) :: Xc(8,3) !! Control points
1212
real(rk) :: Wc(8) !! Weights of the control points

example/poisson_iga_solver_2d.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ program poisson_iga_solver_2d
164164
end do
165165
call ti%timer_stop(message="L2 error evaluation : ")
166166

167-
print '(a,1pe10.4)', "L2 error norm = ", sqrt(l2_error)
167+
print '(a,1pe11.4)', "L2 error norm = ", sqrt(l2_error)
168168
print '(a,a,a,a)', trim(filename)//".vtk", " and ", trim(filename)//"_interp.vtk", " exported"
169169

170170
call surf%finalize()

example/poisson_iga_solver_3d.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ program poisson_iga_solver_3d
166166
end do
167167
call ti%timer_stop(message="L2 error evaluation : ")
168168

169-
print '(a,1pe10.4)', "L2 error norm = ", sqrt(l2_error)
169+
print '(a,1pe11.4)', "L2 error norm = ", sqrt(l2_error)
170170
print '(a,a,a,a)', trim(filename)//".vtk", " and ", trim(filename)//"_interp.vtk", " exported"
171171

172172
call surf%finalize()

0 commit comments

Comments
 (0)