Skip to content
Snippets Groups Projects
Unverified Commit 50ae2efb authored by joergbuchwald's avatar joergbuchwald Committed by GitHub
Browse files

Add GMRES test, formatting (#2929)

parent 601b5fcd
No related branches found
No related tags found
No related merge requests found
...@@ -144,7 +144,9 @@ void EigenIterativeLinearSolver<Eigen::GMRES< ...@@ -144,7 +144,9 @@ void EigenIterativeLinearSolver<Eigen::GMRES<
} }
template <> template <>
void EigenIterativeLinearSolver<Eigen::GMRES<EigenMatrix::RawMatrixType, Eigen::IncompleteLUT<double>>>::setRestart(int const restart) void EigenIterativeLinearSolver<
Eigen::GMRES<EigenMatrix::RawMatrixType,
Eigen::IncompleteLUT<double>>>::setRestart(int const restart)
{ {
_solver.set_restart(restart); _solver.set_restart(restart);
INFO("-> set restart value: {:d}", _solver.get_restart()); INFO("-> set restart value: {:d}", _solver.get_restart());
......
...@@ -782,6 +782,18 @@ AddTest( ...@@ -782,6 +782,18 @@ AddTest(
square_1x1_quad_1e5.vtu square_1e5_volumetricsourceterm_pcs_0_ts_1_t_1.000000.vtu analytical_solution pressure 0.75e-4 1e-16 square_1x1_quad_1e5.vtu square_1e5_volumetricsourceterm_pcs_0_ts_1_t_1.000000.vtu analytical_solution pressure 0.75e-4 1e-16
) )
AddTest(
NAME SteadyStateDiffusion_square_1x1_1e2_GMRES
PATH Elliptic/square_1x1_SteadyStateDiffusion
EXECUTABLE ogs
EXECUTABLE_ARGS square_1e2_GMRES.prj
WRAPPER time
TESTER vtkdiff
REQUIREMENTS NOT (OGS_USE_MPI)
DIFF_DATA
square_1x1_quad_1e2.vtu square_1e2_GMRES_pcs_0_ts_1_t_1.000000.vtu Linear_1_to_minus1 pressure 1e-14 1e-14
)
if (NOT OGS_USE_MPI) if (NOT OGS_USE_MPI)
OgsTest(PROJECTFILE "Elliptic/cube_1x1x1_SteadyStateDiffusion/cube_1e4_anisotropic.prj") OgsTest(PROJECTFILE "Elliptic/cube_1x1x1_SteadyStateDiffusion/cube_1e4_anisotropic.prj")
endif() # OGS_USE_MPI endif() # OGS_USE_MPI
<?xml version="1.0" encoding="ISO-8859-1"?>
<OpenGeoSysProject>
<mesh>square_1x1_quad_1e2.vtu</mesh>
<geometry>square_1x1.gml</geometry>
<processes>
<process>
<name>SteadyStateDiffusion</name>
<type>STEADY_STATE_DIFFUSION</type>
<integration_order>2</integration_order>
<process_variables>
<process_variable>pressure</process_variable>
</process_variables>
<secondary_variables>
<secondary_variable internal_name="darcy_velocity" output_name="v"/>
</secondary_variables>
</process>
</processes>
<media>
<medium id="0">
<phases/>
<properties>
<property>
<name>diffusion</name>
<type>Constant</type>
<value>1</value>
</property>
<property>
<name>reference_temperature</name>
<type>Constant</type>
<value>293.15</value>
</property>
</properties>
</medium>
</media>
<time_loop>
<processes>
<process ref="SteadyStateDiffusion">
<nonlinear_solver>basic_picard</nonlinear_solver>
<convergence_criterion>
<type>DeltaX</type>
<norm_type>NORM2</norm_type>
<abstol>1.e-6</abstol>
</convergence_criterion>
<time_discretization>
<type>BackwardEuler</type>
</time_discretization>
<time_stepping>
<type>SingleStep</type>
</time_stepping>
</process>
</processes>
<output>
<type>VTK</type>
<prefix>square_1e2_GMRES</prefix>
<variables>
<variable> pressure </variable>
<variable> v </variable>
</variables>
</output>
</time_loop>
<nonlinear_solvers>
<nonlinear_solver>
<name>basic_picard</name>
<type>Picard</type>
<max_iter>10</max_iter>
<linear_solver>general_linear_solver</linear_solver>
</nonlinear_solver>
</nonlinear_solvers>
<linear_solvers>
<linear_solver>
<name>general_linear_solver</name>
<lis>-i cg -p jacobi -tol 1e-16 -maxiter 10000</lis>
<eigen>
<solver_type>GMRES</solver_type>
<precon_type>DIAGONAL</precon_type>
<max_iteration_step>10000</max_iteration_step>
<error_tolerance>1e-16</error_tolerance>
<restart>30</restart>
</eigen>
<petsc>
<prefix>gw</prefix>
<parameters>-gw_ksp_type cg -gw_pc_type bjacobi -gw_ksp_rtol 1e-16 -gw_ksp_max_it 10000</parameters>
</petsc>
</linear_solver>
</linear_solvers>
<parameters>
<parameter>
<name>p0</name>
<type>Constant</type>
<value>0</value>
</parameter>
<parameter>
<name>p_Dirichlet_left</name>
<type>Constant</type>
<value>1</value>
</parameter>
<parameter>
<name>p_Dirichlet_right</name>
<type>Constant</type>
<value>-1</value>
</parameter>
</parameters>
<process_variables>
<process_variable>
<name>pressure</name>
<components>1</components>
<order>1</order>
<initial_condition>p0</initial_condition>
<boundary_conditions>
<boundary_condition>
<geometrical_set>square_1x1_geometry</geometrical_set>
<geometry>left</geometry>
<type>Dirichlet</type>
<parameter>p_Dirichlet_left</parameter>
</boundary_condition>
<boundary_condition>
<geometrical_set>square_1x1_geometry</geometrical_set>
<geometry>right</geometry>
<type>Dirichlet</type>
<parameter>p_Dirichlet_right</parameter>
</boundary_condition>
</boundary_conditions>
</process_variable>
</process_variables>
</OpenGeoSysProject>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment