diff --git a/src/NURBS/forcad_nurbs_curve.f90 b/src/NURBS/forcad_nurbs_curve.f90 index 3244a220b..11103f856 100644 --- a/src/NURBS/forcad_nurbs_curve.f90 +++ b/src/NURBS/forcad_nurbs_curve.f90 @@ -62,8 +62,7 @@ pure subroutine set1(this, knot, Xc, Wc) this%nc = size(this%Xc, 1) if (present(Wc)) then if (size(Wc) /= this%nc) then - ! print*, 'Error: Number of weights does not match the number of control points.' - return + error stop 'Number of weights does not match the number of control points.' else this%Wc = Wc end if @@ -90,8 +89,7 @@ pure subroutine set2(this, Xth_dir, order, continuity, Xc, Wc) this%nc = size(this%Xc, 1) if (present(Wc)) then if (size(Wc) /= this%nc) then - ! print*, 'Error: Number of weights does not match the number of control points.' - return + error stop 'Number of weights does not match the number of control points.' else this%Wc = Wc end if @@ -112,8 +110,7 @@ pure subroutine create(this, res, Xt) ! check if (.not.allocated(this%Xc)) then - ! print*, 'Error: Control points are not set.' - return + error stop 'Control points are not set.' end if ! Set parameter values @@ -165,7 +162,7 @@ pure function get_Xc(this) result(Xc) if (allocated(this%Xc)) then Xc = this%Xc else - ! print*, 'Error: Control points are not set.' + error stop 'Control points are not set.' end if end function !=============================================================================== @@ -181,7 +178,7 @@ pure function get_Xg(this) result(Xg) if (allocated(this%Xg)) then Xg = this%Xg else - ! print*, 'Error: Geometry points are not set.' + error stop 'Geometry points are not set.' end if end function !=============================================================================== @@ -197,7 +194,7 @@ pure function get_Wc(this) result(Wc) if (allocated(this%Wc)) then Wc = this%Wc else - ! print*, 'Error: The Bezier curve is not rational.' + error stop 'The Bezier curve is not rational.' end if end function !=============================================================================== @@ -213,7 +210,7 @@ pure function get_Xt(this) result(Xt) if (allocated(this%Xt)) then Xt = this%Xt else - ! print*, 'Error: Parameter values are not set.' + error stop 'Parameter values are not set.' end if end function !=============================================================================== @@ -256,7 +253,7 @@ pure function get_knot(this) result(knot) if (allocated(this%knot)) then knot = this%knot else - ! print*, 'Error: Knot vector is not set.' + error stop 'Knot vector is not set.' end if end function !=============================================================================== @@ -321,8 +318,7 @@ impure subroutine export_Xc(this, filename) ! check if (.not.allocated(this%Xc)) then - ! print*, 'Error: Control points are not set.' - return + error stop 'Control points are not set.' end if call this%get_elem_Xc(elemConn) @@ -361,8 +357,7 @@ impure subroutine export_Xg(this, filename) ! check if (.not.allocated(this%Xg)) then - ! print*, 'Error: Geometry points are not set.' - return + error stop 'Geometry points are not set.' end if call this%get_elem_Xg(elemConn) @@ -403,7 +398,7 @@ pure subroutine modify_Xc(this,X,num,dir) this%Xc(num,dir) = X call this%set(knot = this%knot, Xc = this%Xc, Wc = this%Wc) else - ! print*, 'Error: Control points are not set.' + error stop 'Control points are not set.' end if end subroutine !=============================================================================== @@ -421,7 +416,7 @@ pure subroutine modify_Wc(this,W,num) this%Wc(num) = W call this%set(knot = this%knot, Xc = this%Xc, Wc = this%Wc) else - ! print*, 'Error: The Bezier curve is not rational.' + error stop 'The Bezier curve is not rational.' end if end subroutine !=============================================================================== @@ -436,8 +431,7 @@ pure function get_multiplicity(this) result(m) ! check if (.not.allocated(this%knot)) then - ! print*, 'Error: Knot vector is not set.' - return + error stop 'Knot vector is not set.' else m = compute_multiplicity(this%knot) end if @@ -454,8 +448,7 @@ pure function get_continuity(this) result(c) ! check if (.not.allocated(this%knot)) then - ! print*, 'Error: Knot vector is not set.' - return + error stop 'Knot vector is not set.' else c = this%order - compute_multiplicity(this%knot) end if diff --git a/src/NURBS/forcad_nurbs_surface.f90 b/src/NURBS/forcad_nurbs_surface.f90 index 184b25aa6..43cd309c1 100644 --- a/src/NURBS/forcad_nurbs_surface.f90 +++ b/src/NURBS/forcad_nurbs_surface.f90 @@ -108,8 +108,7 @@ pure subroutine create(this, res1, res2, Xt1, Xt2) ! check if (.not.allocated(this%Xc)) then - ! print*, 'Error: Control points are not set.' - return + error stop 'Control points are not set.' end if @@ -181,7 +180,7 @@ pure function get_Xc(this) result(Xc) if (allocated(this%Xc)) then Xc = this%Xc else - ! print*, 'Error: Control points are not set.' + error stop 'Control points are not set.' end if end function !=============================================================================== @@ -197,7 +196,7 @@ pure function get_Xg(this) result(Xg) if (allocated(this%Xg)) then Xg = this%Xg else - ! print*, 'Error: Geometry points are not set.' + error stop 'Geometry points are not set.' end if end function !=============================================================================== @@ -213,7 +212,7 @@ pure function get_Wc(this) result(Wc) if (allocated(this%Wc)) then Wc = this%Wc else - ! print*, 'Error: The Bezier curve is not rational.' + error stop 'The Bezier curve is not rational.' end if end function !=============================================================================== @@ -231,16 +230,16 @@ pure function get_Xt(this, dir) result(Xt) if (allocated(this%Xt1)) then Xt = this%Xt1 else - ! print*, 'Error: Parameter values are not set.' + error stop 'Parameter values are not set.' end if elseif (dir == 2) then if (allocated(this%Xt2)) then Xt = this%Xt2 else - ! print*, 'Error: Parameter values are not set.' + error stop 'Parameter values are not set.' end if else - ! print*, 'Error: Invalid direction for parameter values.' + error stop 'Invalid direction for parameter values.' end if end function @@ -288,16 +287,16 @@ pure function get_knot(this, dir) result(knot) if (allocated(this%knot1)) then knot = this%knot1 else - ! print*, 'Error: Knot vector is not set.' + error stop 'Knot vector is not set.' end if elseif (dir == 2) then if (allocated(this%knot2)) then knot = this%knot2 else - ! print*, 'Error: Knot vector is not set.' + error stop 'Knot vector is not set.' end if else - ! print*, 'Error: Invalid direction for knot vector.' + error stop 'Invalid direction for knot vector.' end if end function @@ -365,8 +364,7 @@ impure subroutine export_Xc(this, filename) ! check if (.not.allocated(this%Xc)) then - ! print*, 'Error: Control points are not set.' - return + error stop 'Control points are not set.' end if call this%get_elem_Xc(elemConn) @@ -405,8 +403,7 @@ impure subroutine export_Xg(this, filename) ! check if (.not.allocated(this%Xg)) then - ! print*, 'Error: Geometry points are not set.' - return + error stop 'Geometry points are not set.' end if call this%get_elem_Xg(elemConn) @@ -447,7 +444,7 @@ pure subroutine modify_Xc(this,X,num,dir) this%Xc(num,dir) = X call this%set(knot1 = this%knot1, knot2 = this%knot2, Xc = this%Xc, Wc = this%Wc) else - ! print*, 'Error: Control points are not set.' + error stop 'Control points are not set.' end if end subroutine !=============================================================================== @@ -465,7 +462,7 @@ pure subroutine modify_Wc(this,W,num) this%Wc(num) = W call this%set(knot1 = this%knot1, knot2 = this%knot2, Xc = this%Xc, Wc = this%Wc) else - ! print*, 'Error: The NURBS surface is not rational.' + error stop 'The NURBS surface is not rational.' end if end subroutine !=============================================================================== @@ -483,8 +480,7 @@ pure function get_multiplicity(this, dir) result(m) ! check if (.not.allocated(this%knot1)) then - ! print*, 'Error: Knot vector is not set.' - return + error stop 'Knot vector is not set.' else m = compute_multiplicity(this%knot1) end if @@ -493,14 +489,13 @@ pure function get_multiplicity(this, dir) result(m) ! check if (.not.allocated(this%knot2)) then - ! print*, 'Error: Knot vector is not set.' - return + error stop 'Knot vector is not set.' else m = compute_multiplicity(this%knot2) end if else - ! print*, 'Error: Invalid direction.' + error stop 'Invalid direction.' end if end function @@ -519,8 +514,7 @@ pure function get_continuity(this, dir) result(c) ! check if (.not.allocated(this%knot1)) then - ! print*, 'Error: Knot vector is not set.' - return + error stop 'Knot vector is not set.' else c = this%order(1) - compute_multiplicity(this%knot1) end if @@ -529,14 +523,13 @@ pure function get_continuity(this, dir) result(c) ! check if (.not.allocated(this%knot2)) then - ! print*, 'Error: Knot vector is not set.' - return + error stop 'Knot vector is not set.' else c = this%order(2) - compute_multiplicity(this%knot2) end if else - ! print*, 'Error: Invalid direction.' + error stop 'Invalid direction.' end if end function @@ -555,8 +548,7 @@ pure function get_nc(this, dir) result(nc) ! check if (.not.allocated(this%knot1)) then - ! print*, 'Error: Knot vector is not set.' - return + error stop 'Knot vector is not set.' else nc = sum(compute_multiplicity(this%knot1)) - this%order(1) - 1 end if @@ -565,14 +557,13 @@ pure function get_nc(this, dir) result(nc) ! check if (.not.allocated(this%knot2)) then - ! print*, 'Error: Knot vector is not set.' - return + error stop 'Knot vector is not set.' else nc = sum(compute_multiplicity(this%knot2)) - this%order(2) - 1 end if else - ! print*, 'Error: Invalid direction.' + error stop 'Invalid direction.' end if end function diff --git a/src/NURBS/forcad_nurbs_volume.f90 b/src/NURBS/forcad_nurbs_volume.f90 index c73be7422..8c613421d 100644 --- a/src/NURBS/forcad_nurbs_volume.f90 +++ b/src/NURBS/forcad_nurbs_volume.f90 @@ -114,8 +114,7 @@ pure subroutine create(this, res1, res2, res3, Xt1, Xt2, Xt3) ! check if (.not.allocated(this%Xc)) then - ! print*, 'Error: Control points are not set.' - return + error stop 'Control points are not set.' end if ! Set parameter values @@ -200,7 +199,7 @@ pure function get_Xc(this) result(Xc) if (allocated(this%Xc)) then Xc = this%Xc else - ! print*, 'Error: Control points are not set.' + error stop 'Control points are not set.' end if end function !=============================================================================== @@ -216,7 +215,7 @@ pure function get_Xg(this) result(Xg) if (allocated(this%Xg)) then Xg = this%Xg else - ! print*, 'Error: Geometry points are not set.' + error stop 'Geometry points are not set.' end if end function !=============================================================================== @@ -232,7 +231,7 @@ pure function get_Wc(this) result(Wc) if (allocated(this%Wc)) then Wc = this%Wc else - ! print*, 'Error: The Bezier curve is not rational.' + error stop 'The Bezier curve is not rational.' end if end function !=============================================================================== @@ -250,22 +249,22 @@ pure function get_Xt(this, dir) result(Xt) if (allocated(this%Xt1)) then Xt = this%Xt1 else - ! print*, 'Error: Parameter values are not set.' + error stop 'Parameter values are not set.' end if elseif (dir == 2) then if (allocated(this%Xt2)) then Xt = this%Xt2 else - ! print*, 'Error: Parameter values are not set.' + error stop 'Parameter values are not set.' end if elseif (dir == 3) then if (allocated(this%Xt3)) then Xt = this%Xt3 else - ! print*, 'Error: Parameter values are not set.' + error stop 'Parameter values are not set.' end if else - ! print*, 'Error: Invalid direction for parameter values.' + error stop 'Invalid direction for parameter values.' end if end function @@ -315,22 +314,22 @@ pure function get_knot(this, dir) result(knot) if (allocated(this%knot1)) then knot = this%knot1 else - ! print*, 'Error: Knot vector is not set.' + error stop 'Knot vector is not set.' end if elseif (dir == 2) then if (allocated(this%knot2)) then knot = this%knot2 else - ! print*, 'Error: Knot vector is not set.' + error stop 'Knot vector is not set.' end if elseif (dir == 3) then if (allocated(this%knot3)) then knot = this%knot3 else - ! print*, 'Error: Knot vector is not set.' + error stop 'Knot vector is not set.' end if else - ! print*, 'Error: Invalid direction for knot vector.' + error stop 'Invalid direction for knot vector.' end if end function @@ -400,8 +399,7 @@ impure subroutine export_Xc(this, filename) ! check if (.not.allocated(this%Xc)) then - ! print*, 'Error: Control points are not set.' - return + error stop 'Control points are not set.' end if call this%get_elem_Xc(elemConn) @@ -441,8 +439,7 @@ impure subroutine export_Xg(this, filename) ! check if (.not.allocated(this%Xg)) then - ! print*, 'Error: Geometry points are not set.' - return + error stop 'Geometry points are not set.' end if call this%get_elem_Xg(elemConn) @@ -484,7 +481,7 @@ pure subroutine modify_Xc(this,X,num,dir) this%Xc(num,dir) = X call this%set(knot1 = this%knot1, knot2 = this%knot2, knot3 = this%knot3, Xc = this%Xc, Wc = this%Wc) else - ! print*, 'Error: Control points are not set.' + error stop 'Control points are not set.' end if end subroutine !=============================================================================== @@ -502,7 +499,7 @@ pure subroutine modify_Wc(this,W,num) this%Wc(num) = W call this%set(knot1 = this%knot1, knot2 = this%knot2, knot3 = this%knot3, Xc = this%Xc, Wc = this%Wc) else - ! print*, 'Error: The NURBS surface is not rational.' + error stop 'The NURBS surface is not rational.' end if end subroutine !=============================================================================== @@ -520,8 +517,7 @@ pure function get_multiplicity(this, dir) result(m) ! check if (.not.allocated(this%knot1)) then - ! print*, 'Error: Knot vector is not set.' - return + error stop 'Knot vector is not set.' else m = compute_multiplicity(this%knot1) end if @@ -530,8 +526,7 @@ pure function get_multiplicity(this, dir) result(m) ! check if (.not.allocated(this%knot2)) then - ! print*, 'Error: Knot vector is not set.' - return + error stop 'Knot vector is not set.' else m = compute_multiplicity(this%knot2) end if @@ -540,14 +535,13 @@ pure function get_multiplicity(this, dir) result(m) ! check if (.not.allocated(this%knot3)) then - ! print*, 'Error: Knot vector is not set.' - return + error stop 'Knot vector is not set.' else m = compute_multiplicity(this%knot3) end if else - ! print*, 'Error: Invalid direction.' + error stop 'Invalid direction.' end if end function @@ -566,8 +560,7 @@ pure function get_continuity(this, dir) result(c) ! check if (.not.allocated(this%knot1)) then - ! print*, 'Error: Knot vector is not set.' - return + error stop 'Knot vector is not set.' else c = this%order(1) - compute_multiplicity(this%knot1) end if @@ -576,8 +569,7 @@ pure function get_continuity(this, dir) result(c) ! check if (.not.allocated(this%knot2)) then - ! print*, 'Error: Knot vector is not set.' - return + error stop 'Knot vector is not set.' else c = this%order(2) - compute_multiplicity(this%knot2) end if @@ -586,14 +578,13 @@ pure function get_continuity(this, dir) result(c) ! check if (.not.allocated(this%knot3)) then - ! print*, 'Error: Knot vector is not set.' - return + error stop 'Knot vector is not set.' else c = this%order(3) - compute_multiplicity(this%knot3) end if else - ! print*, 'Error: Invalid direction.' + error stop 'Invalid direction.' end if end function @@ -612,8 +603,7 @@ pure function get_nc(this, dir) result(nc) ! check if (.not.allocated(this%knot1)) then - ! print*, 'Error: Knot vector is not set.' - return + error stop 'Knot vector is not set.' else nc = sum(compute_multiplicity(this%knot1)) - this%order(1) - 1 end if @@ -622,8 +612,7 @@ pure function get_nc(this, dir) result(nc) ! check if (.not.allocated(this%knot2)) then - ! print*, 'Error: Knot vector is not set.' - return + error stop 'Knot vector is not set.' else nc = sum(compute_multiplicity(this%knot2)) - this%order(2) - 1 end if @@ -632,14 +621,13 @@ pure function get_nc(this, dir) result(nc) ! check if (.not.allocated(this%knot3)) then - ! print*, 'Error: Knot vector is not set.' - return + error stop 'Knot vector is not set.' else nc = sum(compute_multiplicity(this%knot3)) - this%order(3) - 1 end if else - ! print*, 'Error: Invalid direction.' + error stop 'Invalid direction.' end if end function diff --git a/src/Rational_Bezier/forcad_bezier_curve.f90 b/src/Rational_Bezier/forcad_bezier_curve.f90 index 88ee6f9c7..14180cbe8 100644 --- a/src/Rational_Bezier/forcad_bezier_curve.f90 +++ b/src/Rational_Bezier/forcad_bezier_curve.f90 @@ -53,8 +53,7 @@ pure subroutine set(this, Xc, Wc) this%nc = size(this%Xc, 1) if (present(Wc)) then if (size(Wc) /= this%nc) then - ! print*, 'Error: Number of weights does not match the number of control points.' - return + error stop 'Number of weights does not match the number of control points.' else this%Wc = Wc end if @@ -76,8 +75,7 @@ pure subroutine create(this, res, Xt) ! check if (.not.allocated(this%Xc)) then - ! print*, 'Error: Control points are not set.' - return + error stop 'Control points are not set.' end if ! Set parameter values @@ -130,7 +128,7 @@ pure function get_Xc(this) result(Xc) if (allocated(this%Xc)) then Xc = this%Xc else - ! print*, 'Error: Control points are not set.' + error stop 'Control points are not set.' end if end function !=============================================================================== @@ -146,7 +144,7 @@ pure function get_Xg(this) result(Xg) if (allocated(this%Xg)) then Xg = this%Xg else - ! print*, 'Error: Geometry points are not set.' + error stop 'Geometry points are not set.' end if end function !=============================================================================== @@ -162,7 +160,7 @@ pure function get_Wc(this) result(Wc) if (allocated(this%Wc)) then Wc = this%Wc else - ! print*, 'Error: The Bezier curve is not rational.' + error stop 'The Bezier curve is not rational.' end if end function !=============================================================================== @@ -178,7 +176,7 @@ pure function get_Xt(this) result(Xt) if (allocated(this%Xt)) then Xt = this%Xt else - ! print*, 'Error: Parameter values are not set.' + error stop 'Parameter values are not set.' end if end function !=============================================================================== @@ -282,8 +280,7 @@ impure subroutine export_Xc(this, filename) ! check if (.not.allocated(this%Xc)) then - ! print*, 'Error: Control points are not set.' - return + error stop 'Control points are not set.' end if call this%get_elem_Xc(elemConn) @@ -323,8 +320,7 @@ impure subroutine export_Xg(this, filename) ! check if (.not.allocated(this%Xg)) then - ! print*, 'Error: Geometry points are not set.' - return + error stop 'Geometry points are not set.' end if call this%get_elem_Xg(elemConn) @@ -366,7 +362,7 @@ pure subroutine modify_Xc(this,X,num,dir) this%Xc(num,dir) = X call this%set(Xc = this%Xc, Wc = this%Wc) else - ! print*, 'Error: Control points are not set.' + error stop 'Control points are not set.' end if end subroutine !=============================================================================== @@ -385,7 +381,7 @@ pure subroutine modify_Wc(this,W,num) this%Wc(num) = W call this%set(Xc = this%Xc, Wc = this%Wc) else - ! print*, 'Error: The Bezier curve is not rational.' + error stop 'The Bezier curve is not rational.' end if end subroutine !=============================================================================== @@ -403,8 +399,7 @@ pure subroutine elevate_degree(this) ! check if (.not.allocated(this%Xc)) then - ! print*, 'Error: Control points are not set.' - return + error stop 'Control points are not set.' end if if (allocated(this%Wc)) then ! Rational Bezier curve diff --git a/src/Rational_Bezier/forcad_bezier_surface.f90 b/src/Rational_Bezier/forcad_bezier_surface.f90 index 15dc472a0..0eaa8c956 100644 --- a/src/Rational_Bezier/forcad_bezier_surface.f90 +++ b/src/Rational_Bezier/forcad_bezier_surface.f90 @@ -70,8 +70,7 @@ pure subroutine create(this, res1, res2, Xt1, Xt2) ! check if (.not.allocated(this%Xc)) then - ! print*, 'Error: Control points are not set.' - return + error stop 'Control points are not set.' end if @@ -143,7 +142,7 @@ pure function get_Xc(this) result(Xc) if (allocated(this%Xc)) then Xc = this%Xc else - ! print*, 'Error: Control points are not set.' + error stop 'Control points are not set.' end if end function !=============================================================================== @@ -159,7 +158,7 @@ pure function get_Xg(this) result(Xg) if (allocated(this%Xg)) then Xg = this%Xg else - ! print*, 'Error: Geometry points are not set.' + error stop 'Geometry points are not set.' end if end function !=============================================================================== @@ -175,7 +174,7 @@ pure function get_Wc(this) result(Wc) if (allocated(this%Wc)) then Wc = this%Wc else - ! print*, 'Error: The Bezier curve is not rational.' + error stop 'The Bezier curve is not rational.' end if end function !=============================================================================== @@ -193,16 +192,16 @@ pure function get_Xt(this, dir) result(Xt) if (allocated(this%Xt1)) then Xt = this%Xt1 else - ! print*, 'Error: Parameter values are not set.' + error stop 'Parameter values are not set.' end if elseif (dir == 2) then if (allocated(this%Xt2)) then Xt = this%Xt2 else - ! print*, 'Error: Parameter values are not set.' + error stop 'Parameter values are not set.' end if else - ! print*, 'Error: Invalid direction for parameter values.' + error stop 'Invalid direction for parameter values.' end if end function @@ -304,8 +303,7 @@ impure subroutine export_Xc(this, filename) ! check if (.not.allocated(this%Xc)) then - ! print*, 'Error: Control points are not set.' - return + error stop 'Control points are not set.' end if call this%get_elem_Xc(elemConn) @@ -344,8 +342,7 @@ impure subroutine export_Xg(this, filename) ! check if (.not.allocated(this%Xg)) then - ! print*, 'Error: Geometry points are not set.' - return + error stop 'Geometry points are not set.' end if call this%get_elem_Xg(elemConn) @@ -387,7 +384,7 @@ pure subroutine modify_Xc(this,X,num,dir) this%Xc(num,dir) = X call this%set(nc = this%nc, Xc = this%Xc, Wc = this%Wc) else - ! print*, 'Error: Control points are not set.' + error stop 'Control points are not set.' end if end subroutine !=============================================================================== @@ -406,7 +403,7 @@ pure subroutine modify_Wc(this,W,num) this%Wc(num) = W call this%set(nc = this%nc, Xc = this%Xc, Wc = this%Wc) else - ! print*, 'Error: The Bezier curve is not rational.' + error stop 'The Bezier curve is not rational.' end if end subroutine !=============================================================================== diff --git a/src/Rational_Bezier/forcad_bezier_volume.f90 b/src/Rational_Bezier/forcad_bezier_volume.f90 index 4c72e4f1d..8951d3223 100644 --- a/src/Rational_Bezier/forcad_bezier_volume.f90 +++ b/src/Rational_Bezier/forcad_bezier_volume.f90 @@ -70,8 +70,7 @@ pure subroutine create(this, res1, res2, res3, Xt1, Xt2, Xt3) ! check if (.not.allocated(this%Xc)) then - ! print*, 'Error: Control points are not set.' - return + error stop 'Control points are not set.' end if ! Set parameter values @@ -156,7 +155,7 @@ pure function get_Xc(this) result(Xc) if (allocated(this%Xc)) then Xc = this%Xc else - ! print*, 'Error: Control points are not set.' + error stop 'Control points are not set.' end if end function !=============================================================================== @@ -172,7 +171,7 @@ pure function get_Xg(this) result(Xg) if (allocated(this%Xg)) then Xg = this%Xg else - ! print*, 'Error: Geometry points are not set.' + error stop 'Geometry points are not set.' end if end function !=============================================================================== @@ -188,7 +187,7 @@ pure function get_Wc(this) result(Wc) if (allocated(this%Wc)) then Wc = this%Wc else - ! print*, 'Error: The Bezier curve is not rational.' + error stop 'The Bezier curve is not rational.' end if end function !=============================================================================== @@ -206,22 +205,22 @@ pure function get_Xt(this, dir) result(Xt) if (allocated(this%Xt1)) then Xt = this%Xt1 else - ! print*, 'Error: Parameter values are not set.' + error stop 'Parameter values are not set.' end if elseif (dir == 2) then if (allocated(this%Xt2)) then Xt = this%Xt2 else - ! print*, 'Error: Parameter values are not set.' + error stop 'Parameter values are not set.' end if elseif (dir == 3) then if (allocated(this%Xt3)) then Xt = this%Xt3 else - ! print*, 'Error: Parameter values are not set.' + error stop 'Parameter values are not set.' end if else - ! print*, 'Error: Invalid direction for parameter values.' + error stop 'Invalid direction for parameter values.' end if end function @@ -324,8 +323,7 @@ impure subroutine export_Xc(this, filename) ! check if (.not.allocated(this%Xc)) then - ! print*, 'Error: Control points are not set.' - return + error stop 'Control points are not set.' end if call this%get_elem_Xc(elemConn) @@ -365,8 +363,7 @@ impure subroutine export_Xg(this, filename) ! check if (.not.allocated(this%Xg)) then - ! print*, 'Error: Geometry points are not set.' - return + error stop 'Geometry points are not set.' end if call this%get_elem_Xg(elemConn) @@ -409,7 +406,7 @@ pure subroutine modify_Xc(this,X,num,dir) this%Xc(num,dir) = X call this%set(nc = this%nc, Xc = this%Xc, Wc = this%Wc) else - ! print*, 'Error: Control points are not set.' + error stop 'Control points are not set.' end if end subroutine !=============================================================================== @@ -427,7 +424,7 @@ pure subroutine modify_Wc(this,W,num) this%Wc(num) = W call this%set(nc = this%nc, Xc = this%Xc, Wc = this%Wc) else - ! print*, 'Error: The Bezier curve is not rational.' + error stop 'The Bezier curve is not rational.' end if end subroutine !===============================================================================