Skip to content

Commit

Permalink
Merge branch 'rename-is-linear' into 'master'
Browse files Browse the repository at this point in the history
Renamed tag <is_linear> to <linear>

See merge request ogs/ogs!4747
  • Loading branch information
endJunction committed Sep 29, 2023
2 parents 68cb163 + 67b83b9 commit 3f62408
Show file tree
Hide file tree
Showing 55 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ the linear solver will only do the `compute()`<sup>\*</sup> step if the timestep
changes.

This flag is a further optimization on top of the
[\<is_linear\>](@ref ogs_file_param__prj__processes__process__ComponentTransport__is_linear)
[\<linear\>](@ref ogs_file_param__prj__processes__process__ComponentTransport__linear)
flag.
So the requirements of `<is_linear>` apply to this flag, too!
So the requirements of `<linear>` apply to this flag, too!

\attention
This is an expert option. It comes with a number of further **requirements above
those of `<is_linear>`**. These are:
those of `<linear>`**. These are:

- The linear solver used to solve the process equations must be exclusively used
for a single process (or for a single `process_id` in the case of staggered
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ std::unique_ptr<Process> createComponentTransportProcess(
}

auto const is_linear =
//! \ogs_file_param{prj__processes__process__ComponentTransport__is_linear}
config.getConfigParameter("is_linear", false);
//! \ogs_file_param{prj__processes__process__ComponentTransport__linear}
config.getConfigParameter("linear", false);

auto const ls_compute_only_upon_timestep_change =
//! \ogs_file_param{prj__processes__process__ComponentTransport__linear_solver_compute_only_upon_timestep_change}
Expand Down
12 changes: 6 additions & 6 deletions ProcessLib/ComponentTransport/Tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -791,18 +791,18 @@ if (NOT OGS_USE_MPI)

# several variations of 1d_decay_chain_GIA
OgsTest(PROJECTFILE Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/1d_decay_chain_GIA.prj RUNTIME 40)
OgsTest(PROJECTFILE Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/is_linear/1d_decay_chain_GIA.xml RUNTIME 10)
OgsTest(PROJECTFILE Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/is_linear_compute_only_on_dt_change/1d_decay_chain_GIA.xml RUNTIME 4)
OgsTest(PROJECTFILE Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/linear/1d_decay_chain_GIA.xml RUNTIME 10)
OgsTest(PROJECTFILE Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/linear_compute_only_on_dt_change/1d_decay_chain_GIA.xml RUNTIME 4)

# further variations of 1d_decay_chain_GIA with Eigen's SparseLU solver
OgsTest(PROJECTFILE Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/SparseLU/1d_decay_chain_GIA.xml RUNTIME 40)
OgsTest(PROJECTFILE Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/SparseLU_is_linear/1d_decay_chain_GIA.xml RUNTIME 10)
OgsTest(PROJECTFILE Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/SparseLU_is_linear_compute_only_on_dt_change/1d_decay_chain_GIA.xml RUNTIME 4)
OgsTest(PROJECTFILE Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/SparseLU_linear/1d_decay_chain_GIA.xml RUNTIME 10)
OgsTest(PROJECTFILE Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/SparseLU_linear_compute_only_on_dt_change/1d_decay_chain_GIA.xml RUNTIME 4)

# variation with changing timestep size
OgsTest(PROJECTFILE Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/varying_dt/1d_decay_chain_GIA.xml RUNTIME 40)
OgsTest(PROJECTFILE Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/varying_dt_is_linear/1d_decay_chain_GIA.xml RUNTIME 10)
OgsTest(PROJECTFILE Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/varying_dt_is_linear_compute_only_on_dt_change/1d_decay_chain_GIA.xml RUNTIME 4)
OgsTest(PROJECTFILE Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/varying_dt_linear/1d_decay_chain_GIA.xml RUNTIME 10)
OgsTest(PROJECTFILE Parabolic/ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/varying_dt_linear_compute_only_on_dt_change/1d_decay_chain_GIA.xml RUNTIME 4)

OgsTest(PROJECTFILE Parabolic/ComponentTransport/ThermalDiffusion/TemperatureField_transport.prj RUNTIME 27)
endif()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
<OpenGeoSysProjectDiff base_file="../1d_decay_chain_GIA.prj">
<add sel="/*/processes/process">
<is_linear>true</is_linear>
<linear>true</linear>
</add>

<remove sel="/*/linear_solvers/linear_solver/eigen" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
<OpenGeoSysProjectDiff base_file="../1d_decay_chain_GIA.prj">
<add sel="/*/processes/process">
<is_linear>true</is_linear>
<linear>true</linear>
<linear_solver_compute_only_upon_timestep_change>true</linear_solver_compute_only_upon_timestep_change>
</add>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
<OpenGeoSysProjectDiff base_file="../1d_decay_chain_GIA.prj">
<add sel="/*/processes/process">
<is_linear>true</is_linear>
<linear>true</linear>
</add>
</OpenGeoSysProjectDiff>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
<OpenGeoSysProjectDiff base_file="../1d_decay_chain_GIA.prj">
<add sel="/*/processes/process">
<is_linear>true</is_linear>
<linear>true</linear>
<linear_solver_compute_only_upon_timestep_change>true</linear_solver_compute_only_upon_timestep_change>
</add>
</OpenGeoSysProjectDiff>
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@
"# Considered cases\n",
"\n",
"1. base case\n",
"2. `<is_linear>true</is_linear>`\n",
"2. `<linear>true</linear>`\n",
" * requires that global matrices `M`, `K` and right-hand side vector `b` assembled by the `ComponentTransport` process do not change over time (and do not depend on the solution)\n",
" * requires that BCs and STs do not depend on the solution\n",
" * performs only **one non-linear iteration per timestep**\n",
" * `ComponentTransport` process **caches assembled global matrices** (no re-assembly necessary)\n",
"3. `<is_linear>true</is_linear>` and `<linear_solver_compute_only_upon_timestep_change>true</linear_solver_compute_only_upon_timestep_change>`\n",
"3. `<linear>true</linear>` and `<linear_solver_compute_only_upon_timestep_change>true</linear_solver_compute_only_upon_timestep_change>`\n",
" * requires additionally, that also the BC and ST contributions to the global matrices do not change over time (no time- or solution-dependent BCs or STs!)\n",
" * LU decomposition or preconditioner is **computed only upon timestep change**\n",
" * only implemented for linear solvers from the Eigen library, so far\n",
Expand All @@ -115,19 +115,19 @@
"source": [
"cases = [\n",
" [\"1 base\", \"./1d_decay_chain_GIA.prj\"],\n",
" [\"2 linear\", \"is_linear/1d_decay_chain_GIA.xml\"],\n",
" [\"3 linear & dt\", \"is_linear_compute_only_on_dt_change/1d_decay_chain_GIA.xml\"],\n",
" [\"2 linear\", \"linear/1d_decay_chain_GIA.xml\"],\n",
" [\"3 linear & dt\", \"linear_compute_only_on_dt_change/1d_decay_chain_GIA.xml\"],\n",
" [\"4 LU\", \"SparseLU/1d_decay_chain_GIA.xml\"],\n",
" [\"5 LU & linear\", \"SparseLU_is_linear/1d_decay_chain_GIA.xml\"],\n",
" [\"5 LU & linear\", \"SparseLU_linear/1d_decay_chain_GIA.xml\"],\n",
" [\n",
" \"6 LU & linear & dt\",\n",
" \"SparseLU_is_linear_compute_only_on_dt_change/1d_decay_chain_GIA.xml\",\n",
" \"SparseLU_linear_compute_only_on_dt_change/1d_decay_chain_GIA.xml\",\n",
" ],\n",
" [\"7 varying dt\", \"varying_dt/1d_decay_chain_GIA.xml\"],\n",
" [\"8 varying dt & linear\", \"varying_dt_is_linear/1d_decay_chain_GIA.xml\"],\n",
" [\"8 varying dt & linear\", \"varying_dt_linear/1d_decay_chain_GIA.xml\"],\n",
" [\n",
" \"9 varying dt & linear & dt\",\n",
" \"varying_dt_is_linear_compute_only_on_dt_change/1d_decay_chain_GIA.xml\",\n",
" \"varying_dt_linear_compute_only_on_dt_change/1d_decay_chain_GIA.xml\",\n",
" ],\n",
"]"
]
Expand Down Expand Up @@ -155,14 +155,14 @@
"output_type": "stream",
"text": [
"running case ./1d_decay_chain_GIA.prj\n",
"running case is_linear/1d_decay_chain_GIA.xml\n",
"running case is_linear_compute_only_on_dt_change/1d_decay_chain_GIA.xml\n",
"running case linear/1d_decay_chain_GIA.xml\n",
"running case linear_compute_only_on_dt_change/1d_decay_chain_GIA.xml\n",
"running case SparseLU/1d_decay_chain_GIA.xml\n",
"running case SparseLU_is_linear/1d_decay_chain_GIA.xml\n",
"running case SparseLU_is_linear_compute_only_on_dt_change/1d_decay_chain_GIA.xml\n",
"running case SparseLU_linear/1d_decay_chain_GIA.xml\n",
"running case SparseLU_linear_compute_only_on_dt_change/1d_decay_chain_GIA.xml\n",
"running case varying_dt/1d_decay_chain_GIA.xml\n",
"running case varying_dt_is_linear/1d_decay_chain_GIA.xml\n",
"running case varying_dt_is_linear_compute_only_on_dt_change/1d_decay_chain_GIA.xml\n"
"running case varying_dt_linear/1d_decay_chain_GIA.xml\n",
"running case varying_dt_linear_compute_only_on_dt_change/1d_decay_chain_GIA.xml\n"
]
}
],
Expand Down Expand Up @@ -501,7 +501,7 @@
"id": "058305aa-e717-4dcf-989b-b58591494d87",
"metadata": {},
"source": [
"* with `<is_linear>true<is_linear>` only one non-linear iteration is done per timestep."
"* with `<linear>true<linear>` only one non-linear iteration is done per timestep."
]
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
<OpenGeoSysProjectDiff base_file="../1d_decay_chain_GIA.prj">
<add sel="/*/processes/process">
<is_linear>true</is_linear>
<linear>true</linear>
</add>

<remove sel="/*/time_loop/processes/process/time_stepping/timesteps"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
<OpenGeoSysProjectDiff base_file="../1d_decay_chain_GIA.prj">
<add sel="/*/processes/process">
<is_linear>true</is_linear>
<linear>true</linear>
<linear_solver_compute_only_upon_timestep_change>true</linear_solver_compute_only_upon_timestep_change>
</add>

Expand Down

0 comments on commit 3f62408

Please sign in to comment.