Skip to content

Commit

Permalink
Dev/jmg alien composyx pluggin (#1801)
Browse files Browse the repository at this point in the history
* composyx alien pluggin
* add composyx alien-bench test
  • Loading branch information
gratienj authored Nov 27, 2024
1 parent df0467b commit b20f9f2
Show file tree
Hide file tree
Showing 15 changed files with 615 additions and 88 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ ComposyxInternalSolver::init()
m_output_level = m_options->outputLevel();
bool verbose = (m_parallel_mng->commRank()== 0) && m_output_level>0 ;
m_internal.reset(new InternalType()) ;
if(m_options->solver()=="gmres")
{
m_internal->setParam("gmres-restart",m_options->gmresRestart()) ;
m_internal->setParam("gmres-zeta", m_options->gmresZeta()) ;
m_internal->setParam("gmres-ortho", m_options->gmresOrtho().localstr()) ;
}
m_internal->init(m_options->maxIterationNum(),
m_options->stopCriteriaValue(),
m_options->solver().localstr(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@
<simple name="output-level" type="integer" default="0">
<description>Verbosity indicator (min=0, max=3)</description>
</simple>
<simple name="gmres-restart" type="integer" default="10">
<description>GMRES restart param</description>
</simple>
<simple name="gmres-zeta" type="real" default="-1.">
<description>GMRES compression param</description>
</simple>
<simple name="gmres-ortho" type="string" default="CGS">
<description>GMRES ortho param</description>
</simple>
<simple name="solver" type="string" default="bcg">
<description>gmres|cg|bcgs</description>
</simple>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<nsd>2 2 1</nsd>
<lx nx="10">1.</lx>
<ly ny="10">1.</ly>
<lz nz="10">1.</lz>
<lz nz="1">1.</lz>
</cartesian>
</meshgenerator>
</mesh>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<nsd>2 2 1</nsd>
<lx nx="10">1.</lx>
<ly ny="10">1.</ly>
<lz nz="10">1.</lz>
<lz nz="1">1.</lz>
</cartesian>
</meshgenerator>
</mesh>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<nsd>1 1 1</nsd>
<lx nx="10">1.</lx>
<ly ny="10">1.</ly>
<lz nz="10">1.</lz>
<lz nz="1">1.</lz>
</cartesian>
</meshgenerator>
</mesh>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
<case codeversion="1.0" codename="AlienBench" xml:lang="en">
<arcane>
<title>Test unitaires des solveurs lineaires</title>
<timeloop>BenchLoop</timeloop>
</arcane>

<arcane-post-processing>
<output-period>1</output-period>
<output>
<variable>U</variable>
<variable>X</variable>
<variable>K</variable>
<variable>S</variable>
</output>
</arcane-post-processing>

<mesh>
<meshgenerator>
<cartesian>
<origine>0. 0. 0.</origine>
<nsd>2 2 1</nsd>
<lx nx="10">1.</lx>
<ly ny="10">1.</ly>
<lz nz="1">1.</lz>
</cartesian>
</meshgenerator>
</mesh>


<alien-bench>
<!-- big diagonal-coefficient keep diagonal dominant matrix -->
<redistribution>false</redistribution>
<homogeneous>true</homogeneous>
<diagonal-coefficient>10.</diagonal-coefficient>
<lambdax>0.125</lambdax>
<lambday>0.25</lambday>
<alpha>10.</alpha>
<sigma>1000000.</sigma>
<epsilon>0.01</epsilon>

<linear-solver name="ComposyxSolver">
<solver>bcgs</solver>
<preconditioner>none</preconditioner>
<max-iteration-num>1000</max-iteration-num>
<stop-criteria-value>1e-8</stop-criteria-value>
<output-level>1</output-level>
</linear-solver>


</alien-bench>
</case>
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
<case codeversion="1.0" codename="AlienBench" xml:lang="en">
<arcane>
<title>Test unitaires des solveurs lineaires</title>
<timeloop>BenchLoop</timeloop>
</arcane>

<arcane-post-processing>
<output-period>1</output-period>
<output>
<variable>U</variable>
<variable>X</variable>
<variable>K</variable>
<variable>S</variable>
</output>
</arcane-post-processing>

<mesh>
<meshgenerator>
<cartesian>
<origine>0. 0. 0.</origine>
<nsd>2 1 1</nsd>
<lx nx="10">1.</lx>
<ly ny="10">1.</ly>
<lz nz="10">1.</lz>
</cartesian>
</meshgenerator>
</mesh>


<alien-bench>
<!-- big diagonal-coefficient keep diagonal dominant matrix -->
<redistribution>false</redistribution>
<homogeneous>true</homogeneous>
<diagonal-coefficient>10.</diagonal-coefficient>
<lambdax>0.125</lambdax>
<lambday>0.25</lambday>
<alpha>10.</alpha>
<sigma>1000000.</sigma>
<epsilon>0.01</epsilon>

<linear-solver name="ComposyxSolver">
<solver>bcgs</solver>
<preconditioner>none</preconditioner>
<max-iteration-num>1000</max-iteration-num>
<stop-criteria-value>1e-8</stop-criteria-value>
<output-level>1</output-level>
</linear-solver>


</alien-bench>
</case>
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<nsd>2 2 1</nsd>
<lx nx="10">1.</lx>
<ly ny="10">1.</ly>
<lz nz="10">1.</lz>
<lz nz="1">1.</lz>
</cartesian>
</meshgenerator>
</mesh>
Expand All @@ -31,7 +31,8 @@
<alien-bench>
<!-- big diagonal-coefficient keep diagonal dominant matrix -->
<redistribution>false</redistribution>
<diagonal-coefficient>0.</diagonal-coefficient>
<homogeneous>true</homogeneous>
<diagonal-coefficient>10.</diagonal-coefficient>
<lambdax>0.125</lambdax>
<lambday>0.25</lambday>
<alpha>10.</alpha>
Expand All @@ -40,8 +41,11 @@

<linear-solver name="ComposyxSolver">
<solver>gmres</solver>
<preconditioner>none</preconditioner>
<max-iteration-num>1000</max-iteration-num>
<stop-criteria-value>1e-8</stop-criteria-value>
<gmres-restart>2</gmres-restart>
<gmres-ortho>CGS</gmres-ortho>
<output-level>1</output-level>
</linear-solver>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
<alien-bench>
<!-- big diagonal-coefficient keep diagonal dominant matrix -->
<redistribution>false</redistribution>
<diagonal-coefficient>0.</diagonal-coefficient>
<homogeneous>true</homogeneous>
<diagonal-coefficient>10.</diagonal-coefficient>
<lambdax>0.125</lambdax>
<lambday>0.25</lambday>
<alpha>10.</alpha>
Expand All @@ -40,8 +41,11 @@

<linear-solver name="ComposyxSolver">
<solver>gmres</solver>
<preconditioner>none</preconditioner>
<max-iteration-num>1000</max-iteration-num>
<stop-criteria-value>1e-8</stop-criteria-value>
<gmres-restart>2</gmres-restart>
<gmres-ortho>CGS</gmres-ortho>
<output-level>1</output-level>
</linear-solver>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
<case codeversion="1.0" codename="AlienBench" xml:lang="en">
<arcane>
<title>Test unitaires des solveurs lineaires</title>
<timeloop>BenchLoop</timeloop>
</arcane>

<arcane-post-processing>
<output-period>1</output-period>
<output>
<variable>U</variable>
<variable>X</variable>
<variable>K</variable>
<variable>S</variable>
</output>
</arcane-post-processing>

<mesh>
<meshgenerator>
<cartesian>
<origine>0. 0. 0.</origine>
<nsd>2 1 1</nsd>
<lx nx="10">1.</lx>
<ly ny="10">1.</ly>
<lz nz="10">1.</lz>
</cartesian>
</meshgenerator>
</mesh>


<alien-bench>
<!-- big diagonal-coefficient keep diagonal dominant matrix -->
<redistribution>false</redistribution>
<homogeneous>true</homogeneous>
<diagonal-coefficient>10.</diagonal-coefficient>
<lambdax>0.125</lambdax>
<lambday>0.25</lambday>
<alpha>10.</alpha>
<sigma>1000000.</sigma>
<epsilon>0.01</epsilon>

<linear-solver name="ComposyxSolver">
<solver>gmres</solver>
<preconditioner>none</preconditioner>
<max-iteration-num>1000</max-iteration-num>
<stop-criteria-value>1e-8</stop-criteria-value>
<gmres-restart>10</gmres-restart>
<gmres-ortho>CGS</gmres-ortho>
<output-level>1</output-level>
</linear-solver>


</alien-bench>
</case>
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
<case codeversion="1.0" codename="AlienBench" xml:lang="en">
<arcane>
<title>Test unitaires des solveurs lineaires</title>
<timeloop>BenchLoop</timeloop>
</arcane>

<arcane-post-processing>
<output-period>1</output-period>
<output>
<variable>U</variable>
<variable>X</variable>
<variable>K</variable>
<variable>S</variable>
</output>
</arcane-post-processing>

<mesh>
<meshgenerator>
<cartesian>
<origine>0. 0. 0.</origine>
<nsd>2 2 1</nsd>
<lx nx="10">1.</lx>
<ly ny="10">1.</ly>
<lz nz="1">1.</lz>
</cartesian>
</meshgenerator>
</mesh>


<alien-bench>
<!-- big diagonal-coefficient keep diagonal dominant matrix -->
<redistribution>false</redistribution>
<homogeneous>true</homogeneous>
<diagonal-coefficient>10.</diagonal-coefficient>
<lambdax>0.125</lambdax>
<lambday>0.25</lambday>
<alpha>10.</alpha>
<sigma>1000000.</sigma>
<epsilon>0.01</epsilon>

<linear-solver name="ComposyxSolver">
<solver>gmres</solver>
<preconditioner>as</preconditioner>
<max-iteration-num>1000</max-iteration-num>
<stop-criteria-value>1e-8</stop-criteria-value>
<gmres-restart>2</gmres-restart>
<gmres-zeta>-1</gmres-zeta>
<gmres-ortho>CGS</gmres-ortho>
<output-level>1</output-level>
</linear-solver>


</alien-bench>
</case>
5 changes: 3 additions & 2 deletions alien/ArcaneInterface/test/AlienBench/AlienBench-composyx.arc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<nsd>1 1 1</nsd>
<lx nx="10">1.</lx>
<ly ny="10">1.</ly>
<lz nz="10">1.</lz>
<lz nz="1">1.</lz>
</cartesian>
</meshgenerator>
</mesh>
Expand All @@ -31,7 +31,8 @@
<alien-bench>
<!-- big diagonal-coefficient keep diagonal dominant matrix -->
<redistribution>false</redistribution>
<diagonal-coefficient>0.</diagonal-coefficient>
<homogeneous>true</homogeneous>
<diagonal-coefficient>10.</diagonal-coefficient>
<lambdax>0.125</lambdax>
<lambday>0.25</lambday>
<alpha>10.</alpha>
Expand Down
Loading

0 comments on commit b20f9f2

Please sign in to comment.