Skip to content

Commit

Permalink
Merge pull request #185 from loganoz/fix/errors
Browse files Browse the repository at this point in the history
Convert stops in horses into real errors
  • Loading branch information
loganoz authored Oct 16, 2023
2 parents b26cd82 + 519f84b commit 4179468
Show file tree
Hide file tree
Showing 156 changed files with 544 additions and 544 deletions.
22 changes: 11 additions & 11 deletions Solver/src/CahnHilliardSolver/SpatialDiscretization.f90
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ subroutine Initialize_SpaceAndTimeMethods(controlVariables, sem)
if ( .not. controlVariables % ContainsKey(CHDiscretizationKey) ) then
print*, "Input file is missing entry for keyword: Cahn-Hilliard discretization"
errorMessage(STD_OUT)
stop
error stop
end if

CHDiscretizationName = controlVariables % stringValueForKey(CHDiscretizationKey, requestedLength = LINE_LENGTH)
Expand All @@ -93,7 +93,7 @@ subroutine Initialize_SpaceAndTimeMethods(controlVariables, sem)
write(STD_OUT,'(A)') " * BR2"
write(STD_OUT,'(A)') " * IP"
errorMessage(STD_OUT)
stop
error stop

end select

Expand Down Expand Up @@ -149,7 +149,7 @@ subroutine ComputeTimeDerivative( mesh, particles, time, mode)
case default
print*, "Unrecognized mode"
errorMessage(STD_OUT)
stop
error stop
end select
!
! **************************************
Expand Down Expand Up @@ -192,7 +192,7 @@ subroutine ComputeTimeDerivative( mesh, particles, time, mode)
#ifdef _HAS_MPI_
!$omp single
errorMessage(STD_OUT)
stop
error stop
! call mesh % UpdateMPIFacesSolution
!$omp end single
#endif
Expand All @@ -206,7 +206,7 @@ subroutine ComputeTimeDerivative( mesh, particles, time, mode)
#ifdef _HAS_MPI_
!$omp single
errorMessage(STD_OUT)
stop
error stop
! call mesh % UpdateMPIFacesGradients
!$omp end single
#endif
Expand Down Expand Up @@ -284,7 +284,7 @@ subroutine ComputeTimeDerivative( mesh, particles, time, mode)
#ifdef _HAS_MPI_
!$omp single
errorMessage(STD_OUT)
stop
error stop
! call mesh % UpdateMPIFacesSolution
!$omp end single
#endif
Expand All @@ -298,7 +298,7 @@ subroutine ComputeTimeDerivative( mesh, particles, time, mode)
#ifdef _HAS_MPI_
!$omp single
errorMessage(STD_OUT)
stop
error stop
! call mesh % UpdateMPIFacesGradients
!$omp end single
#endif
Expand Down Expand Up @@ -382,7 +382,7 @@ subroutine ComputeTimeDerivativeIsolated( mesh, particles, time, mode)
REAL(KIND=RP) :: time
integer, intent(in) :: mode

ERROR stop 'ComputeTimeDerivativeIsolated not implemented for Cahn-Hilliard'
error stop 'ComputeTimeDerivativeIsolated not implemented for Cahn-Hilliard'
end subroutine ComputeTimeDerivativeIsolated
!
!///////////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -432,7 +432,7 @@ subroutine ComputeLaplacian( mesh , t)
case default
print*, "Unrecognized face type"
errorMessage(STD_OUT)
stop
error stop

end select
end associate
Expand Down Expand Up @@ -464,7 +464,7 @@ subroutine ComputeLaplacian( mesh , t)
if ( MPI_Process % doMPIAction ) then
!$omp single
errorMessage(STD_OUT)
stop
error stop
! call mesh % GatherMPIFacesGradients
!$omp end single
!
Expand Down Expand Up @@ -574,7 +574,7 @@ subroutine ComputeLaplacianNeumannBCs( mesh , t)
if ( MPI_Process % doMPIAction ) then
!$omp single
errorMessage(STD_OUT)
stop
error stop
! call mesh % GatherMPIFacesGradients
!$omp end single
!
Expand Down
10 changes: 5 additions & 5 deletions Solver/src/CahnHilliardSolver/main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ PROGRAM HORSES3DMainCH

CALL ReadControlFile( controlVariables )
CALL CheckInputIntegrity(controlVariables, success)
IF(.NOT. success) ERROR STOP "Control file reading error"
IF(.NOT. success) error stop "Control file reading error"

!
! ----------------
! Set up the DGSEM
! ----------------
!
CALL ConstructPhysicsStorage( controlVariables, success )
IF(.NOT. success) ERROR STOP "Physics parameters input error"
IF(.NOT. success) error stop "Physics parameters input error"

call GetMeshPolynomialOrders(controlVariables,Nx,Ny,Nz,Nmax)
call InitializeNodalStorage (controlVariables,Nmax)
Expand All @@ -96,8 +96,8 @@ PROGRAM HORSES3DMainCH
Nx_ = Nx, Ny_ = Ny, Nz_ = Nz, &
success = success)

IF(.NOT. success) ERROR STOP "Mesh reading error"
IF(.NOT. success) ERROR STOP "Boundary condition specification error"
IF(.NOT. success) error stop "Mesh reading error"
IF(.NOT. success) error stop "Boundary condition specification error"
CALL UserDefinedFinalSetup(sem % mesh, multiphase)
!
! -------------------------
Expand Down Expand Up @@ -376,7 +376,7 @@ subroutine CheckIfTheVersionIsRequested

if ( trim(arg) .eq. "--version" ) then
print*, "Current HORSES version: ", trim(VERSION)
stop
error stop
end if
end do

Expand Down
8 changes: 4 additions & 4 deletions Solver/src/IncompressibleNSSolver/SpatialDiscretization.f90
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ subroutine Initialize_SpaceAndTimeMethods(controlVariables, mesh)
write(STD_OUT,'(A)') " * Standard"
write(STD_OUT,'(A)') " * Split-Form"
errorMessage(STD_OUT)
stop
error stop

end select

Expand All @@ -112,7 +112,7 @@ subroutine Initialize_SpaceAndTimeMethods(controlVariables, mesh)
if ( .not. controlVariables % ContainsKey(viscousDiscretizationKey) ) then
print*, "Input file is missing entry for keyword: viscous discretization"
errorMessage(STD_OUT)
stop
error stop
end if

viscousDiscretizationName = controlVariables % stringValueForKey(viscousDiscretizationKey, requestedLength = LINE_LENGTH)
Expand All @@ -135,7 +135,7 @@ subroutine Initialize_SpaceAndTimeMethods(controlVariables, mesh)
write(STD_OUT,'(A)') " * BR2"
write(STD_OUT,'(A)') " * IP"
errorMessage(STD_OUT)
stop
error stop

end select

Expand Down Expand Up @@ -570,7 +570,7 @@ subroutine TimeDerivative_StrongVolumetricContribution( e , t )
e % storage % QDot = ScalarStrongIntegrals % StdVolumeGreen ( e , NCONS, contravariantFlux )

type is (SplitDG_t)
ERROR stop ':: TimeDerivative_StrongVolumetricContribution not implemented for split form'
error stop ':: TimeDerivative_StrongVolumetricContribution not implemented for split form'
!~ !
!~ ! Compute sharp fluxes for skew-symmetric approximations
!~ ! ------------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions Solver/src/IncompressibleNSSolver/main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ PROGRAM HORSES3DMainiNS

CALL ReadControlFile( controlVariables )
CALL CheckInputIntegrity(controlVariables, success)
IF(.NOT. success) ERROR STOP "Control file reading error"
IF(.NOT. success) error stop "Control file reading error"

!
! ----------------
! Set up the DGSEM
! ----------------
!
CALL ConstructPhysicsStorage( controlVariables, success )
IF(.NOT. success) ERROR STOP "Physics parameters input error"
IF(.NOT. success) error stop "Physics parameters input error"

! Initialize manufactured solutions if necessary

Expand All @@ -95,8 +95,8 @@ PROGRAM HORSES3DMainiNS

call Initialize_SpaceAndTimeMethods(controlVariables, sem % mesh)

IF(.NOT. success) ERROR STOP "Mesh reading error"
IF(.NOT. success) ERROR STOP "Boundary condition specification error"
IF(.NOT. success) error stop "Mesh reading error"
IF(.NOT. success) error stop "Boundary condition specification error"
CALL UserDefinedFinalSetup(sem % mesh, thermodynamics, dimensionless, refValues)
!
! -------------------------
Expand Down Expand Up @@ -376,7 +376,7 @@ subroutine CheckIfTheVersionIsRequested

if ( trim(arg) .eq. "--version" ) then
print*, "Current HORSES version: ", trim(VERSION)
stop
error stop
end if
end do

Expand Down
14 changes: 7 additions & 7 deletions Solver/src/MultiphaseSolver/SpatialDiscretization.f90
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ subroutine Initialize_SpaceAndTimeMethods(controlVariables, mesh)
case ( "split-form")
print*, "There are no split-forms available for the Multiphase Solver"
errorMessage(STD_OUT)
stop
error stop
case default
write(STD_OUT,'(A,A,A)') 'Requested inviscid discretization "',trim(inviscidDiscretizationName),'" is not implemented.'
write(STD_OUT,'(A)') "Implemented discretizations are:"
write(STD_OUT,'(A)') " * Standard"
errorMessage(STD_OUT)
stop
error stop

end select

Expand All @@ -117,7 +117,7 @@ subroutine Initialize_SpaceAndTimeMethods(controlVariables, mesh)
if ( .not. controlVariables % ContainsKey(viscousDiscretizationKey) ) then
print*, "Input file is missing entry for keyword: viscous discretization"
errorMessage(STD_OUT)
stop
error stop
end if

viscousDiscretizationName = controlVariables % stringValueForKey(viscousDiscretizationKey, requestedLength = LINE_LENGTH)
Expand All @@ -140,7 +140,7 @@ subroutine Initialize_SpaceAndTimeMethods(controlVariables, mesh)
write(STD_OUT,'(A)') " * BR2"
write(STD_OUT,'(A)') " * IP"
errorMessage(STD_OUT)
stop
error stop

end select

Expand All @@ -157,7 +157,7 @@ subroutine Initialize_SpaceAndTimeMethods(controlVariables, mesh)
if ( .not. controlVariables % ContainsKey(CHDiscretizationKey) ) then
print*, "Input file is missing entry for keyword: Cahn-Hilliard discretization"
errorMessage(STD_OUT)
stop
error stop
end if

CHDiscretizationName = controlVariables % stringValueForKey(CHDiscretizationKey, requestedLength = LINE_LENGTH)
Expand All @@ -180,7 +180,7 @@ subroutine Initialize_SpaceAndTimeMethods(controlVariables, mesh)
write(STD_OUT,'(A)') " * BR2"
write(STD_OUT,'(A)') " * IP"
errorMessage(STD_OUT)
stop
error stop

end select

Expand Down Expand Up @@ -1136,7 +1136,7 @@ subroutine ComputeLaplacian( mesh , t)
case default
print*, "Unrecognized face type"
errorMessage(STD_OUT)
stop
error stop

end select
end associate
Expand Down
10 changes: 5 additions & 5 deletions Solver/src/MultiphaseSolver/main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ PROGRAM HORSES3DMainMU

CALL ReadControlFile( controlVariables )
CALL CheckInputIntegrity(controlVariables, success)
IF(.NOT. success) ERROR STOP "Control file reading error"
IF(.NOT. success) error stop "Control file reading error"

!
! ----------------
! Set up the DGSEM
! ----------------
!
CALL ConstructPhysicsStorage( controlVariables, success )
IF(.NOT. success) ERROR STOP "Physics parameters input error"
IF(.NOT. success) error stop "Physics parameters input error"

! Initialize manufactured solutions if necessary

Expand All @@ -95,8 +95,8 @@ PROGRAM HORSES3DMainMU

call Initialize_SpaceAndTimeMethods(controlVariables, sem % mesh)

IF(.NOT. success) ERROR STOP "Mesh reading error"
IF(.NOT. success) ERROR STOP "Boundary condition specification error"
IF(.NOT. success) error stop "Mesh reading error"
IF(.NOT. success) error stop "Boundary condition specification error"
CALL UserDefinedFinalSetup(sem % mesh, thermodynamics, dimensionless, refValues, multiphase)
!
! -------------------------
Expand Down Expand Up @@ -376,7 +376,7 @@ subroutine CheckIfTheVersionIsRequested

if ( trim(arg) .eq. "--version" ) then
print*, "Current HORSES version: ", trim(VERSION)
stop
error stop
end if
end do

Expand Down
8 changes: 4 additions & 4 deletions Solver/src/NavierStokesSolver/SpatialDiscretization.f90
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ subroutine Initialize_SpaceAndTimeMethods(controlVariables, sem)
write(STD_OUT,'(A)') " * Standard"
write(STD_OUT,'(A)') " * Split-Form"
errorMessage(STD_OUT)
stop
error stop

end select

Expand Down Expand Up @@ -134,7 +134,7 @@ subroutine Initialize_SpaceAndTimeMethods(controlVariables, sem)
write(STD_OUT,'(A)') " * Entropy"
write(STD_OUT,'(A)') " * Energy"
errorMessage(STD_OUT)
stop
error stop
end select

else
Expand All @@ -151,7 +151,7 @@ subroutine Initialize_SpaceAndTimeMethods(controlVariables, sem)
if ( .not. controlVariables % ContainsKey(viscousDiscretizationKey) ) then
print*, "Input file is missing entry for keyword: viscous discretization"
errorMessage(STD_OUT)
stop
error stop
end if

viscousDiscretizationName = controlVariables % stringValueForKey(viscousDiscretizationKey, requestedLength = LINE_LENGTH)
Expand All @@ -174,7 +174,7 @@ subroutine Initialize_SpaceAndTimeMethods(controlVariables, sem)
write(STD_OUT,'(A)') " * BR2"
write(STD_OUT,'(A)') " * IP"
errorMessage(STD_OUT)
stop
error stop

end select

Expand Down
10 changes: 5 additions & 5 deletions Solver/src/NavierStokesSolver/main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ PROGRAM HORSES3DMainNS

CALL ReadControlFile( controlVariables )
CALL CheckInputIntegrity(controlVariables, success)
IF(.NOT. success) ERROR STOP "Control file reading error"
IF(.NOT. success) error stop "Control file reading error"

!
! ----------------
! Set up the DGSEM
! ----------------
!
CALL ConstructPhysicsStorage( controlVariables, success )
IF(.NOT. success) ERROR STOP "Physics parameters input error"
IF(.NOT. success) error stop "Physics parameters input error"

! Initialize manufactured solutions if necessary
sem % ManufacturedSol = controlVariables % containsKey("manufactured solution")
Expand All @@ -102,8 +102,8 @@ PROGRAM HORSES3DMainNS

call Initialize_SpaceAndTimeMethods(controlVariables, sem)

IF(.NOT. success) ERROR STOP "Mesh reading error"
IF(.NOT. success) ERROR STOP "Boundary condition specification error"
IF(.NOT. success) error stop "Mesh reading error"
IF(.NOT. success) error stop "Boundary condition specification error"
CALL UserDefinedFinalSetup(sem % mesh, thermodynamics, dimensionless, refValues)
!
! -------------------------
Expand Down Expand Up @@ -392,7 +392,7 @@ subroutine CheckIfTheVersionIsRequested

if ( trim(arg) .eq. "--version" ) then
print*, "Current HORSES version: ", trim(VERSION)
stop
error stop
end if
end do

Expand Down
Loading

0 comments on commit 4179468

Please sign in to comment.