Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
raback committed Nov 19, 2024
1 parent 11222c3 commit fa0b467
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 31 deletions.
7 changes: 3 additions & 4 deletions fem/src/SParIterSolver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -936,17 +936,16 @@ SUBROUTINE SetHypreParameters(Params, hypremethod, Ilun, hypre_dppara, hypre_int
! COGMRes 11 - x
!---------------------------------------


! 1st round set the method
! 2nd round set the preconditioner!
! Many hypre methods can be both preconditioners and solvers.
DO i=0,1

j = 0
IF(i==0) THEN
hypre_sol = ListGetInteger( Params,'Linear System Method Hypre Index',Found )
IF(Found ) CYCLE
Method => IterativeMethod
IterativeMethod = ListGetString( Params,'Linear System Iterative Method' )
Method => IterativeMethod
ELSE
hypre_pre = ListGetInteger( Params,'Linear System Preconditioning Hypre Index',Found )
IF(Found ) CYCLE
Expand Down Expand Up @@ -997,7 +996,7 @@ SUBROUTINE SetHypreParameters(Params, hypremethod, Ilun, hypre_dppara, hypre_int
hypre_pre = j
END IF
END DO

! Some methods (Krylov methods) can not act as preconditioners!
IF( ANY( hypre_pre == [6,7,8,9,10,11] ) ) THEN
CALL Fatal(Caller,'Invalid preconditioner for Hypre: '//TRIM(PrecMethod))
Expand Down
2 changes: 1 addition & 1 deletion fem/tests/FluxIntegralBCInduction/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ CONFIGURE_FILE( case.sif case.sif COPYONLY)

file(COPY ELMERSOLVER_STARTINFO indmesh.grd DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/")

ADD_ELMER_TEST(FluxIntegralBCInduction LABELS quick mumps)
ADD_ELMER_TEST(FluxIntegralBCInduction LABELS quick)
19 changes: 5 additions & 14 deletions fem/tests/FluxIntegralBCInduction/case.sif
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ End
$chr="a"

Simulation
Max Output Level = 7
Max Output Level = 20
Coordinate System = Axi Symmetric
Coordinate Mapping(3) = 1 2 3
Simulation Type = Steady state
Expand Down Expand Up @@ -77,20 +77,11 @@ Solver 2

Calculate Magnetic Field Strength = True
Calculate Electric Field = True
Calculate Nodal Heating = True
Calculate Current Density = True
Calculate Nodal Heating = False
Calculate Current Density = False

Calculate Nodal Fields = True
Calculate Elemental Fields = False

Optimize Bandwidth = False
Linear System Scaling = False

Linear System Solver = Direct
Linear System Direct Method = umfpack

ctest 1 = Real -1.0
ctest 2 = Real -1.0
Calculate Nodal Fields = False
Calculate Elemental Fields = True
End


Expand Down
18 changes: 6 additions & 12 deletions fem/tests/mgdyn_steady_plate/case.sif
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Header
End

Simulation
Max Output Level = 5
Max Output Level = 20
Coordinate System = "Cartesian"
Simulation Type = Steady
Steady State Max Iterations = 1
Expand Down Expand Up @@ -107,20 +107,14 @@ Solver 2

Potential Variable = String "AV"

Calculate Current Density = Logical True
Calculate Electric Field = Logical True
Calculate Magnetic Field Strength = Logical True
Calculate Current Density = True
Calculate Electric Field = True
Calculate Magnetic Field Strength = True
Calculate Joule Heating = True

Steady State Convergence Tolerance = 0
Linear System Solver = "Iterative"
Linear System Preconditioning = None
Linear System Residual Output = 0
Linear System Max Iterations = 5000
Linear System Iterative Method = CG
Linear System Convergence Tolerance = 1.0e-8

Calculate Elemental Fields = Logical False
Calculate Nodal Fields = Logical False

Impose Body Force Potential = Logical True
Impose Body Force Current = Logical True

Expand Down

0 comments on commit fa0b467

Please sign in to comment.