Skip to content

Commit

Permalink
Merge Pull Request #8479 from trilinos/Trilinos/muelu-diagonal-mod
Browse files Browse the repository at this point in the history
Automatically Merged using Trilinos Pull Request AutoTester
PR Title: MueLu: diagonal modifications for Chebyshev and prolongator smoothing
PR Author: jhux2
  • Loading branch information
trilinos-autotester authored Jan 26, 2021
2 parents e76f001 + 19a772d commit 2e2b449
Show file tree
Hide file tree
Showing 182 changed files with 1,337 additions and 260 deletions.
18 changes: 18 additions & 0 deletions packages/muelu/doc/UsersGuide/masterList.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,24 @@ Only used when tentative: calculate qr is set to false.</description>
<name-ML>not supported by ML</name-ML>
</parameter>

<parameter>
<name>sa: rowsumabs diagonal replacement tolerance</name>
<type>double</type>
<default>-1.0</default>
<description>If not -1, use this value for deciding whether a diagonal value in prolongator smoothing is too small and should be replaced.</description>
<visible>false</visible>
<name-ML>not supported by ML</name-ML>
</parameter>

<parameter>
<name>sa: rowsumabs diagonal replacement value</name>
<type>double</type>
<default>0.0</default>
<description>If it's determined that a diagonal entry in prolongator smoothing is too small, replace that entry with this value.</description>
<visible>false</visible>
<name-ML>not supported by ML</name-ML>
</parameter>

<parameter>
<name>interp: interpolation order</name>
<type>int</type>
Expand Down
4 changes: 4 additions & 0 deletions packages/muelu/doc/UsersGuide/paramlist_hidden.tex
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@

\cbb{sa: max eigenvalue}{double}{-1.0}{If not -1, use this value for lambdaMax(Dinv A) in prolongator smoothing instead of calculating it.}

\cbb{sa: rowsumabs diagonal replacement tolerance}{double}{-1.0}{If not -1, use this value for deciding whether a diagonal value in prolongator smoothing is too small and should be replaced.}

\cbb{sa: rowsumabs diagonal replacement value}{double}{0.0}{If it's determined that a diagonal entry in prolongator smoothing is too small, replace that entry with this value.}

\cbb{interp: interpolation order}{int}{1}{Interpolation order used to interpolate values from coarse points to fine points. Possible values are 0 for piece-wise constant interpolation and 1 for piece-wise linear interpolation. This parameter is set to 1 by default.}

\cbb{interp: build coarse coordinates}{bool}{true}{If false, skip the calculation of coarse coordinates.}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,9 @@ namespace MueLu {
bool useMaxAbsDiagonalScaling = false;
if (defaultList.isParameter("sa: use rowsumabs diagonal scaling"))
useMaxAbsDiagonalScaling = defaultList.get<bool>("sa: use rowsumabs diagonal scaling");
double chebyReplaceTol = -Teuchos::ScalarTraits<double>::one();
if (defaultList.isParameter("sa: rowsumabs diagonal replacement tolerance"))
chebyReplaceTol = defaultList.get<double>("sa: rowsumabs diagonal replacement tolerance");

// === Smoothing ===
// FIXME: should custom smoother check default list too?
Expand Down Expand Up @@ -735,6 +738,10 @@ namespace MueLu {

if (preSmootherType == "CHEBYSHEV" && useMaxAbsDiagonalScaling)
preSmootherParams.set("chebyshev: use rowsumabs diagonal scaling",true);
if (preSmootherType == "CHEBYSHEV" && chebyReplaceTol != -Teuchos::ScalarTraits<double>::one())
preSmootherParams.set("chebyshev: rowsumabs diagonal replacement tolerance",chebyReplaceTol);
if (preSmootherType == "CHEBYSHEV" && defaultList.isParameter("sa: rowsumabs diagonal replacement value"))
preSmootherParams.set("chebyshev: rowsumabs diagonal replacement value", defaultList.get<double>("sa: rowsumabs diagonal replacement value"));

#ifdef HAVE_MUELU_INTREPID2
// Propagate P-coarsening for Topo smoothing
Expand Down Expand Up @@ -1694,6 +1701,8 @@ namespace MueLu {
MUELU_TEST_AND_SET_PARAM_2LIST(paramList, defaultList, "sa: max eigenvalue", double, Pparams);
MUELU_TEST_AND_SET_PARAM_2LIST(paramList, defaultList, "sa: eigenvalue estimate num iterations", int, Pparams);
MUELU_TEST_AND_SET_PARAM_2LIST(paramList, defaultList, "sa: use rowsumabs diagonal scaling", bool, Pparams);
MUELU_TEST_AND_SET_PARAM_2LIST(paramList, defaultList, "sa: rowsumabs diagonal replacement tolerance", double, Pparams);
MUELU_TEST_AND_SET_PARAM_2LIST(paramList, defaultList, "sa: rowsumabs diagonal replacement value", double, Pparams);
MUELU_TEST_AND_SET_PARAM_2LIST(paramList, defaultList, "sa: enforce constraints", bool, Pparams);
MUELU_TEST_AND_SET_PARAM_2LIST(paramList, defaultList, "tentative: calculate qr", bool, Pparams);

Expand Down
Loading

0 comments on commit 2e2b449

Please sign in to comment.