Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MueLu: diagonal modifications for Chebyshev and prolongator smoothing #8479

Merged
merged 10 commits into from
Jan 26, 2021
Merged
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
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