Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -716,12 +716,12 @@ HypreInternalLinearSolver::Impl::init(IOptionsHypreSolver* options, MPI_Comm com
precond_name = "iluk";
checkError("Hypre ILU preconditioner", HYPRE_ILUCreate(&preconditioner));
/* (Recommended) General solver options */
int ilu_type = 0 ;
int max_iter = 1 ;
double tol = 0. ;
int reordering = 0 ;
int fill = options->ilukLevel() ;
int print_level = 3 ;
int ilu_type = 0 ;
int max_iter = options->iluMaxIter() ;
double tol = options->iluTol() ;
int reordering = options->iluReordering() ;
int fill = options->ilukLevel() ;
int print_level = options->iluPrintLevel() ;
checkError("Hypre ILUK preconditioner Type SetUp ", HYPRE_ILUSetType(preconditioner, ilu_type)); /* 0, 1, 10, 11, 20, 21, 30, 31, 40, 41, 50 */
checkError("Hypre ILUK preconditioner Max Iter ", HYPRE_ILUSetMaxIter(preconditioner, max_iter));
checkError("Hypre ILUK preconditioner Tol ", HYPRE_ILUSetTol(preconditioner, tol));
Expand All @@ -738,16 +738,16 @@ HypreInternalLinearSolver::Impl::init(IOptionsHypreSolver* options, MPI_Comm com
case HypreOptionTypes::BJILUTPC:
{
precond_name = "ilut";
checkError("Hypre ILU preconditioner", HYPRE_ILUCreate(&preconditioner));
/* (Recommended) General solver options */
int ilu_type = 1 ;
int max_iter = 1 ;
double tol = 0. ;
int reordering = 0 ;
int ilu_type = 1 ;/* 0, 1, 10, 11, 20, 21, 30, 31, 40, 41, 50 */
int max_iter = options->iluMaxIter() ;
double tol = options->iluTol() ;
int reordering = options->iluReordering() ;
double threshold = options->ilutThreshold() ;
int max_nnz_row = options->ilutMaxNnz() ;
int print_level = 3 ;
checkError("Hypre ILUT preconditioner Type SetUp ", HYPRE_ILUSetType(preconditioner, ilu_type)); /* 0, 1, 10, 11, 20, 21, 30, 31, 40, 41, 50 */
int max_nnz_row = options->ilutMaxNnz() ;
int print_level = options->iluPrintLevel() ;
checkError("Hypre ILU preconditioner ", HYPRE_ILUCreate(&preconditioner));
checkError("Hypre ILUT preconditioner Type SetUp ", HYPRE_ILUSetType(preconditioner, ilu_type));
checkError("Hypre ILUT preconditioner Max Iter ", HYPRE_ILUSetMaxIter(preconditioner, max_iter));
checkError("Hypre ILUT preconditioner Tol ", HYPRE_ILUSetTol(preconditioner, tol));
checkError("Hypre ILUT preconditioner Reodering ", HYPRE_ILUSetLocalReordering(preconditioner, reordering)); /* 0: none, 1: RCM */
Expand All @@ -766,9 +766,9 @@ HypreInternalLinearSolver::Impl::init(IOptionsHypreSolver* options, MPI_Comm com
case HypreOptionTypes::FSAIPC:
{
precond_name = "fsai";
int max_steps = 5 ;
int max_step_size = 3;
double kap_tolerance = 1.e-3 ;
int max_steps = options->fsaiMaxSteps() ;
int max_step_size = options->fsaiMaxStepSize() ;
double kap_tolerance = options->fsaiKapTolerance() ;
checkError("Hypre FSAI preconditioner", HYPRE_FSAICreate(&preconditioner));
checkError("Hypre FSAI preconditioner", HYPRE_FSAISetMaxSteps(preconditioner, max_steps));
checkError("Hypre FSAI preconditioner", HYPRE_FSAISetMaxStepSize(preconditioner, max_step_size));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,26 @@
<description>Requested accuracy</description>
</simple>

<simple name="ilu-type" type="integer" default="0">
<description>ilu type ILUK:0, ILUT:1, 10, 11, 20, 21, 30, 31, 40, 41, 50</description>
</simple>

<simple name="ilu-max-iter" type="integer" default="0">
<description>ilu max iterl</description>
</simple>

<simple name="ilu-tol" type="real" default="0.">
<description>ilu fill in level</description>
</simple>

<simple name="ilu-reordering" type="integer" default="0">
<description>ilu ordering 0: none, 1: RCM </description>
</simple>

<simple name="ilu-print-level" type="integer" default="3">
<description>ilu ordering 0: none, 1: RCM </description>
</simple>

<simple name="iluk-level" type="integer" default="0">
<description>ilu fill in level</description>
</simple>
Expand All @@ -49,6 +69,18 @@
<description>ilut max nnz per row</description>
</simple>

<simple name="fsai-max-steps" type="integer" default="5">
<description>FSAI max steps</description>
</simple>

<simple name="fsai-max-step-size" type="integer" default="3">
<description>FSAI max step size</description>
</simple>

<simple name="fsai-kap-tolerance" type="real" default="1.e-3">
<description>FSAI kap tolerance</description>
</simple>

<simple name="amg-coarsen-type" type="string" default="PMIS">
<description>
Coarsen alg type:
Expand Down
25 changes: 25 additions & 0 deletions alien/ArcaneInterface/test/AlienBench/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ addSources(alien_hypre_sycl.exe
hypre_sycl.cpp
)




if(ALIEN_USE_SYCL)
target_compile_definitions(alien_hypre_sycl.exe PUBLIC USE_SYCL2020)
IF(ALIEN_USE_HIPSYCL)
Expand Down Expand Up @@ -248,6 +251,28 @@ install(
TARGETS alien_hypre_sycl.exe
RUNTIME DESTINATION bin
)

createExecutable(test_hypre_fsai.exe)

addSources(test_hypre_fsai.exe
test_hypre_fsai.cpp
)

linkLibraries(test_hypre_fsai.exe hypre mpi)

commit(test_hypre_fsai.exe)


createExecutable(test_hypre_iluk.exe)

addSources(test_hypre_iluk.exe
test_hypre_iluk.cpp
)

linkLibraries(test_hypre_iluk.exe hypre mpi)

commit(test_hypre_iluk.exe)

endif ()
endif ()
endif ()
Expand Down
Loading
Loading