Skip to content

Commit

Permalink
Merge Pull Request trilinos#7291 from trilinos/Trilinos/csiefer-9ef6047
Browse files Browse the repository at this point in the history
Automatically Merged using Trilinos Pull Request AutoTester
PR Title: MueLu: Adding Pairwise to easy parameterlist
PR Author: csiefer2
  • Loading branch information
trilinos-autotester authored May 1, 2020
2 parents f606fd8 + 7355fca commit ace4ed2
Show file tree
Hide file tree
Showing 6 changed files with 281 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
#include "MueLu_FilteredAFactory_fwd.hpp"
#include "MueLu_GenericRFactory_fwd.hpp"
#include "MueLu_LineDetectionFactory_fwd.hpp"
#include "MueLu_NotayAggregationFactory_fwd.hpp"
#include "MueLu_NullspaceFactory_fwd.hpp"
#include "MueLu_PatternFactory_fwd.hpp"
#include "MueLu_PgPFactory_fwd.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
#include "MueLu_GenericRFactory.hpp"
#include "MueLu_LineDetectionFactory.hpp"
#include "MueLu_MasterList.hpp"
#include "MueLu_NotayAggregationFactory.hpp"
#include "MueLu_NullspaceFactory.hpp"
#include "MueLu_PatternFactory.hpp"
#include "MueLu_PgPFactory.hpp"
Expand Down Expand Up @@ -934,7 +935,7 @@ namespace MueLu {

// Aggregation graph
RCP<Factory> dropFactory;

if (MUELU_TEST_PARAM_2LIST(paramList, paramList, "aggregation: drop scheme", std::string, "matlab")) {
#ifdef HAVE_MUELU_MATLAB
dropFactory = rcp(new SingleLevelMatlabFactory());
Expand Down Expand Up @@ -971,7 +972,7 @@ namespace MueLu {

// Aggregation scheme
MUELU_SET_VAR_2LIST(paramList, defaultList, "aggregation: type", std::string, aggType);
TEUCHOS_TEST_FOR_EXCEPTION(!strings({"uncoupled", "coupled", "brick", "matlab"}).count(aggType),
TEUCHOS_TEST_FOR_EXCEPTION(!strings({"uncoupled", "coupled", "brick", "matlab","notay"}).count(aggType),
Exceptions::RuntimeError, "Unknown aggregation algorithm: \"" << aggType << "\". Please consult User's Guide.");
#ifndef HAVE_MUELU_MATLAB
if (aggType == "matlab")
Expand Down Expand Up @@ -1027,13 +1028,26 @@ namespace MueLu {
aggFactory->SetFactory("Coordinates", this->GetFactoryManager(levelID-1)->GetFactory("Coordinates"));
}
}
else if (aggType == "notay") {
aggFactory = rcp(new NotayAggregationFactory());
ParameterList aggParams;
MUELU_TEST_AND_SET_PARAM_2LIST(paramList, defaultList, "aggregation: pairwise: size", int, aggParams);
MUELU_TEST_AND_SET_PARAM_2LIST(paramList, defaultList, "aggregation: Dirichlet threshold", double, aggParams);
MUELU_TEST_AND_SET_PARAM_2LIST(paramList, defaultList, "aggregation: ordering", std::string, aggParams);
MUELU_TEST_AND_SET_PARAM_2LIST(paramList, defaultList, "aggregation: compute aggregate qualities",bool, aggParams);
aggFactory->SetParameterList(aggParams);
aggFactory->SetFactory("DofsPerNode", manager.GetFactory("Graph"));
aggFactory->SetFactory("Graph", manager.GetFactory("Graph"));
}
#ifdef HAVE_MUELU_MATLAB
else if(aggType == "matlab") {
ParameterList aggParams = paramList.sublist("aggregation: params");
aggFactory = rcp(new SingleLevelMatlabFactory());
aggFactory->SetParameterList(aggParams);
}
#endif


manager.SetFactory("Aggregates", aggFactory);

// Coarse map
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# regenerate a build system incorporating the new file.
# YOU MUST ALSO TOUCH A CMAKE CONFIGURATION FILE WHEN YOU PUSH THE NEW
# FILE TO FORCE THE RECONFIGURE ON OTHER PEOPLE'S BUILDS.

# Consider this file touched!
FILE(GLOB xmlFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.xml)

# disabling a test
Expand All @@ -11,3 +13,4 @@ LIST(REMOVE_ITEM xmlFiles default_e2d.xml)
TRIBITS_COPY_FILES_TO_BINARY_DIR(ParameterList_default_EasyParameterListInterpreter_cp
SOURCE_FILES ${xmlFiles}
)

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<ParameterList name="MueLu">
<Parameter name="aggregation: type" type="string" value="notay"/>
<Parameter name="aggregation: Dirichlet threshold" type="double" value="10.0"/>
<Parameter name="aggregation: ordering" type="string" value="natural"/>
<Parameter name="max levels" type="int" value="2"/>
</ParameterList>
120 changes: 120 additions & 0 deletions packages/muelu/test/interface/default/Output/notay_epetra.gold
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
Clearing old data (if any)
Level 0
Setup Smoother (MueLu::IfpackSmoother{type = point relaxation stand-alone})
keep smoother data = 0 [default]
PreSmoother data = Teuchos::RCP<MueLu::SmootherPrototype<ignored> >{ptr=0,node=0,strong_count=0,weak_count=0} [default]
PostSmoother data = Teuchos::RCP<MueLu::SmootherPrototype<ignored> >{ptr=0,node=0,strong_count=0,weak_count=0} [default]
smoother ->
relaxation: type = symmetric Gauss-Seidel [unused]
relaxation: sweeps = 1 [unused]
relaxation: damping factor = 1 [unused]

Level 1
Prolongator smoothing (MueLu::SaPFactory)
Matrix filtering (MueLu::FilteredAFactory)
Build (MueLu::CoalesceDropFactory)
Build (MueLu::AmalgamationFactory)
[empty list]

algorithm = "classical": threshold = 0, blocksize = 1
aggregation: drop tol = 0 [default]
aggregation: Dirichlet threshold = 10
aggregation: drop scheme = classical [default]
aggregation: distance laplacian algo = default [default]
lightweight wrap = 1

Filtered matrix is not being constructed as no filtering is being done
filtered matrix: use lumping = 1 [default]
filtered matrix: reuse graph = 1 [default]
filtered matrix: reuse eigenvalue = 1 [default]

Build (MueLu::TentativePFactory)
Build (MueLu::NotayAggregationFactory)
BuildInitialAggregates (MueLu::NotayAggregationFactory)
BuildOnRankLocalMatrix (MueLu::NotayAggregationFactory)
BuildIntermediateProlongator (MueLu::NotayAggregationFactory)
BuildCoarseLocalMatrix (MueLu::NotayAggregationFactory)
BuildFurtherAggregates (MueLu::NotayAggregationFactory)
BuildIntermediateProlongator (MueLu::NotayAggregationFactory)
BuildCoarseLocalMatrix (MueLu::NotayAggregationFactory)
BuildFurtherAggregates (MueLu::NotayAggregationFactory)
BuildIntermediateProlongator (MueLu::NotayAggregationFactory)
BuildCoarseLocalMatrix (MueLu::NotayAggregationFactory)
BuildFurtherAggregates (MueLu::NotayAggregationFactory)
BuildIntermediateProlongator (MueLu::NotayAggregationFactory)
BuildCoarseLocalMatrix (MueLu::NotayAggregationFactory)
BuildFurtherAggregates (MueLu::NotayAggregationFactory)
BuildIntermediateProlongator (MueLu::NotayAggregationFactory)
BuildCoarseLocalMatrix (MueLu::NotayAggregationFactory)
BuildFurtherAggregates (MueLu::NotayAggregationFactory)
BuildIntermediateProlongator (MueLu::NotayAggregationFactory)
BuildCoarseLocalMatrix (MueLu::NotayAggregationFactory)
BuildFurtherAggregates (MueLu::NotayAggregationFactory)
BuildIntermediateProlongator (MueLu::NotayAggregationFactory)
BuildCoarseLocalMatrix (MueLu::NotayAggregationFactory)
BuildFurtherAggregates (MueLu::NotayAggregationFactory)
aggregation: pairwise: size = 8 [default]
aggregation: compute aggregate qualities = 0 [default]
aggregation: Dirichlet threshold = 10
aggregation: ordering = natural

Nullspace factory (MueLu::NullspaceFactory)
Fine level nullspace = Nullspace

Build (MueLu::CoarseMapFactory)
Striding info = {} [default]
Strided block id = -1 [default]
Domain GID offsets = {0} [default]

tentative: calculate qr = 1 [default]
tentative: build coarse coordinates = 1 [default]
tentative: constant column sums = 0 [default]
Nullspace name = Nullspace [default]
matrixmatrix: kernel params ->
[empty list]

sa: damping factor = 1.33 [default]
sa: calculate eigenvalue estimate = 0 [default]
sa: eigenvalue estimate num iterations = 10 [default]
matrixmatrix: kernel params ->
[empty list]

Transpose P (MueLu::TransPFactory)
matrixmatrix: kernel params ->
[empty list]

Computing Ac (MueLu::RAPFactory)
transpose: use implicit = 0 [default]
rap: triple product = 0 [default]
rap: fix zero diagonals = 0 [default]
rap: relative diagonal floor = {} [default]
CheckMainDiagonal = 0 [default]
RepairMainDiagonal = 0 [default]
matrixmatrix: kernel params ->
[empty list]

Setup Smoother (MueLu::AmesosSmoother{type = <ignored>})
keep smoother data = 0 [default]
PreSmoother data = Teuchos::RCP<MueLu::SmootherPrototype<ignored> >{ptr=0,node=0,strong_count=0,weak_count=0} [default]
PostSmoother data = Teuchos::RCP<MueLu::SmootherPrototype<ignored> >{ptr=0,node=0,strong_count=0,weak_count=0} [default]
presmoother ->
[empty list]


--------------------------------------------------------------------------------
--- Multigrid Summary ---
--------------------------------------------------------------------------------
Number of levels = 2
Operator complexity = 1.83
Smoother complexity = 0.00
Cycle type = V

level rows nnz nnz/row c ratio procs
0 9999 29995 3.00 1
1 4985 24919 5.00 2.01 1

Smoother (level 0) both : MueLu::IfpackSmoother{type = point relaxation stand-alone}

Smoother (level 1) pre : MueLu::AmesosSmoother{type = <ignored>}
Smoother (level 1) post : no smoother

135 changes: 135 additions & 0 deletions packages/muelu/test/interface/default/Output/notay_tpetra.gold
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
Clearing old data (if any)
Level 0
Setup Smoother (MueLu::Ifpack2Smoother{type = RELAXATION})
keep smoother data = 0 [default]
PreSmoother data = Teuchos::RCP<MueLu::SmootherPrototype<ignored> >{ptr=0,node=0,strong_count=0,weak_count=0} [default]
PostSmoother data = Teuchos::RCP<MueLu::SmootherPrototype<ignored> >{ptr=0,node=0,strong_count=0,weak_count=0} [default]
smoother ->
relaxation: type = Symmetric Gauss-Seidel
relaxation: sweeps = 1
relaxation: damping factor = 1
relaxation: inner sweeps = 1 [default]
relaxation: inner sparse-triangular solve = 0 [default]
relaxation: zero starting solution = 1 [default]
relaxation: backward mode = 0 [default]
relaxation: use l1 = 0 [default]
relaxation: l1 eta = 1.5 [default]
relaxation: min diagonal value = 0 [default]
relaxation: fix tiny diagonal entries = 0 [default]
relaxation: check diagonal entries = 0 [default]
relaxation: local smoothing indices = Teuchos::ArrayRCP<int>{ptr=0,lowerOffset=0,upperOffset=-1,size=0,node=0,strong_count=0,weak_count=0} [default]
relaxation: symmetric matrix structure = 0 [default]
relaxation: ifpack2 dump matrix = 0 [default]
relaxation: mtgs cluster size = 1 [default]

Level 1
Prolongator smoothing (MueLu::SaPFactory)
Matrix filtering (MueLu::FilteredAFactory)
Build (MueLu::CoalesceDropFactory)
Build (MueLu::AmalgamationFactory)
[empty list]

algorithm = "classical": threshold = 0, blocksize = 1
aggregation: drop tol = 0 [default]
aggregation: Dirichlet threshold = 10
aggregation: drop scheme = classical [default]
aggregation: distance laplacian algo = default [default]
lightweight wrap = 1

Filtered matrix is not being constructed as no filtering is being done
filtered matrix: use lumping = 1 [default]
filtered matrix: reuse graph = 1 [default]
filtered matrix: reuse eigenvalue = 1 [default]

Build (MueLu::TentativePFactory)
Build (MueLu::NotayAggregationFactory)
BuildInitialAggregates (MueLu::NotayAggregationFactory)
BuildOnRankLocalMatrix (MueLu::NotayAggregationFactory)
BuildIntermediateProlongator (MueLu::NotayAggregationFactory)
BuildCoarseLocalMatrix (MueLu::NotayAggregationFactory)
BuildFurtherAggregates (MueLu::NotayAggregationFactory)
BuildIntermediateProlongator (MueLu::NotayAggregationFactory)
BuildCoarseLocalMatrix (MueLu::NotayAggregationFactory)
BuildFurtherAggregates (MueLu::NotayAggregationFactory)
BuildIntermediateProlongator (MueLu::NotayAggregationFactory)
BuildCoarseLocalMatrix (MueLu::NotayAggregationFactory)
BuildFurtherAggregates (MueLu::NotayAggregationFactory)
BuildIntermediateProlongator (MueLu::NotayAggregationFactory)
BuildCoarseLocalMatrix (MueLu::NotayAggregationFactory)
BuildFurtherAggregates (MueLu::NotayAggregationFactory)
BuildIntermediateProlongator (MueLu::NotayAggregationFactory)
BuildCoarseLocalMatrix (MueLu::NotayAggregationFactory)
BuildFurtherAggregates (MueLu::NotayAggregationFactory)
BuildIntermediateProlongator (MueLu::NotayAggregationFactory)
BuildCoarseLocalMatrix (MueLu::NotayAggregationFactory)
BuildFurtherAggregates (MueLu::NotayAggregationFactory)
BuildIntermediateProlongator (MueLu::NotayAggregationFactory)
BuildCoarseLocalMatrix (MueLu::NotayAggregationFactory)
BuildFurtherAggregates (MueLu::NotayAggregationFactory)
aggregation: pairwise: size = 8 [default]
aggregation: compute aggregate qualities = 0 [default]
aggregation: Dirichlet threshold = 10
aggregation: ordering = natural

Nullspace factory (MueLu::NullspaceFactory)
Fine level nullspace = Nullspace

Build (MueLu::CoarseMapFactory)
Striding info = {} [default]
Strided block id = -1 [default]
Domain GID offsets = {0} [default]

tentative: calculate qr = 1 [default]
tentative: build coarse coordinates = 1 [default]
tentative: constant column sums = 0 [default]
Nullspace name = Nullspace [default]
matrixmatrix: kernel params ->
[empty list]

sa: damping factor = 1.33 [default]
sa: calculate eigenvalue estimate = 0 [default]
sa: eigenvalue estimate num iterations = 10 [default]
matrixmatrix: kernel params ->
[empty list]

Transpose P (MueLu::TransPFactory)
matrixmatrix: kernel params ->
[empty list]

Computing Ac (MueLu::RAPFactory)
transpose: use implicit = 0 [default]
rap: triple product = 0 [default]
rap: fix zero diagonals = 0 [default]
rap: relative diagonal floor = {} [default]
CheckMainDiagonal = 0 [default]
RepairMainDiagonal = 0 [default]
matrixmatrix: kernel params ->
[empty list]

Setup Smoother (MueLu::Amesos2Smoother{type = <ignored>})
keep smoother data = 0 [default]
PreSmoother data = Teuchos::RCP<MueLu::SmootherPrototype<ignored> >{ptr=0,node=0,strong_count=0,weak_count=0} [default]
PostSmoother data = Teuchos::RCP<MueLu::SmootherPrototype<ignored> >{ptr=0,node=0,strong_count=0,weak_count=0} [default]
presmoother ->
A = Teuchos::RCP<MueLu::FactoryBase const>{ptr=0,node=0,strong_count=0,weak_count=0} [default]
Nullspace = Teuchos::RCP<MueLu::FactoryBase const>{ptr=0,node=0,strong_count=0,weak_count=0} [default]
fix nullspace = 0 [default]


--------------------------------------------------------------------------------
--- Multigrid Summary ---
--------------------------------------------------------------------------------
Number of levels = 2
Operator complexity = 1.83
Smoother complexity = 1.33
Cycle type = V

level rows nnz nnz/row c ratio procs
0 9999 29995 3.00 1
1 4985 24919 5.00 2.01 1

Smoother (level 0) both : "Ifpack2::Relaxation": {Initialized: true, Computed: true, Type: Symmetric Gauss-Seidel, sweeps: 1, damping factor: 1, Global matrix dimensions: [9999, 9999], Global nnz: 29995}

Smoother (level 1) pre : <Direct> solver interface
Smoother (level 1) post : no smoother

0 comments on commit ace4ed2

Please sign in to comment.