Skip to content

Commit

Permalink
Merge Pull Request #12482 from trilinos/Trilinos/master_merge_2023110…
Browse files Browse the repository at this point in the history
…3_175834

Automatically Merged using Trilinos Master Merge AutoTester
PR Title: b'Trilinos Master Merge PR Generator: Auto PR created to promote from master_merge_20231103_175834 branch to master'
PR Author: trilinos-autotester
  • Loading branch information
trilinos-autotester authored Nov 4, 2023
2 parents f2813b6 + 533336a commit c4f035c
Show file tree
Hide file tree
Showing 69 changed files with 5,550 additions and 3,097 deletions.
50 changes: 25 additions & 25 deletions packages/framework/ini-files/config-specs.ini
Original file line number Diff line number Diff line change
Expand Up @@ -910,36 +910,36 @@ opt-set-cmake-var Trilinos_ENABLE_Zoltan2 BOOL : ON
opt-set-cmake-var Trilinos_ENABLE_Zoltan2Core BOOL : ON

[PACKAGE-ENABLES|ALL-NO-EPETRA]
opt-set-cmake-var Trilinos_ENABLE_ALL_PACKAGES BOOL : ON
opt-set-cmake-var Trilinos_ENABLE_Amesos BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_Domi BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_Epetra BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_EpetraExt BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_FEI BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_Ifpack BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_Intrepid BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_Komplex BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_Moertel BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_ML BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_Rythmos BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_TriKota BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_ALL_PACKAGES BOOL FORCE : ON
opt-set-cmake-var Trilinos_ENABLE_Amesos BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_Domi BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_Epetra BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_EpetraExt BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_FEI BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_Ifpack BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_Intrepid BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_Komplex BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_Moertel BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_ML BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_Rythmos BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_TriKota BOOL FORCE : OFF

[PACKAGE-ENABLES|NO-EPETRA]
# Identical from ALL-NO-EPETRA directive, but without enabling all of the
# packages first. This directive can be used in builds that may be enabling
# certain packages directly without any of the directives pre-defined above.
opt-set-cmake-var Trilinos_ENABLE_Amesos BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_Domi BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_Epetra BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_EpetraExt BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_FEI BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_Ifpack BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_Intrepid BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_Komplex BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_Moertel BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_ML BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_Rythmos BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_TriKota BOOL : OFF
opt-set-cmake-var Trilinos_ENABLE_Amesos BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_Domi BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_Epetra BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_EpetraExt BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_FEI BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_Ifpack BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_Intrepid BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_Komplex BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_Moertel BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_ML BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_Rythmos BOOL FORCE : OFF
opt-set-cmake-var Trilinos_ENABLE_TriKota BOOL FORCE : OFF

[PACKAGE-ENABLES|NO-PACKAGE-ENABLES]
# Nothing to do here.
Expand Down
5 changes: 5 additions & 0 deletions packages/ifpack2/src/Ifpack2_Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ void getValidParameters(Teuchos::ParameterList& params)
params.set("schwarz: use reordering", true);
params.set("schwarz: filter singletons", false);
params.set("schwarz: overlap level", 0);
params.set("schwarz: num iterations", 1);
params.set("subdomain solver name", "");
Teuchos::ParameterList dummyListSubdomain;
params.set("subdomain solver parameters",dummyListSubdomain);
params.sublist("subdomain solver parameters").disableRecursiveValidation();

// Ifpack2_BlockRelaxation.hpp
// params.set("relaxation: type", "Jacobi"); // already set
Expand Down
24 changes: 15 additions & 9 deletions packages/intrepid2/unit-test/Projection/test_convergence_PYR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,17 @@ int ConvergencePyr(const bool verbose) {
}
};

typedef CellTools<DeviceType> ct;
typedef OrientationTools<DeviceType> ots;
typedef Experimental::ProjectionTools<DeviceType> pts;
typedef RealSpaceTools<DeviceType> rst;
typedef FunctionSpaceTools<DeviceType> fst;
using ct = CellTools<DeviceType>;
using ots = OrientationTools<DeviceType>;
#ifdef HAVE_INTREPID2_EXPERIMENTAL_NAMESPACE
using pts = Experimental::ProjectionTools<DeviceType>;
using ProjStruct = Experimental::ProjectionStruct<DeviceType,ValueType>;
#else
using pts = ProjectionTools<DeviceType>;
using ProjStruct = ProjectionStruct<DeviceType,ValueType>;
#endif
using rst = RealSpaceTools<DeviceType>;
using fst = FunctionSpaceTools<DeviceType>;

constexpr ordinal_type dim = 3;
const ordinal_type basisDegree = 3;
Expand Down Expand Up @@ -368,7 +374,7 @@ int ConvergencePyr(const bool verbose) {
{
ordinal_type targetCubDegree(basis.getDegree()),targetDerivCubDegree(basis.getDegree());

Experimental::ProjectionStruct<DeviceType,ValueType> projStruct;
ProjStruct projStruct;
if(useL2Projection) {
projStruct.createL2ProjectionStruct(&basis, targetCubDegree);
} else {
Expand Down Expand Up @@ -659,7 +665,7 @@ int ConvergencePyr(const bool verbose) {
{
ordinal_type targetCubDegree(cub_degree),targetDerivCubDegree(cub_degree-1);
Experimental::ProjectionStruct<DeviceType,ValueType> projStruct;
ProjStruct projStruct;
if(useL2Projection) {
projStruct.createL2ProjectionStruct(&basis, targetCubDegree);
} else {
Expand Down Expand Up @@ -914,7 +920,7 @@ int ConvergencePyr(const bool verbose) {
{
ordinal_type targetCubDegree(basis.getDegree()),targetDerivCubDegree(basis.getDegree()-1);
Experimental::ProjectionStruct<DeviceType,ValueType> projStruct;
ProjStruct projStruct;
if(useL2Projection) {
projStruct.createL2ProjectionStruct(&basis, targetCubDegree);
} else {
Expand Down Expand Up @@ -1161,7 +1167,7 @@ int ConvergencePyr(const bool verbose) {
{
ordinal_type targetCubDegree(basis.getDegree());

Experimental::ProjectionStruct<DeviceType,ValueType> projStruct;
ProjStruct projStruct;
if(useL2Projection) {
projStruct.createL2ProjectionStruct(&basis, targetCubDegree);
} else {
Expand Down
52 changes: 52 additions & 0 deletions packages/ml/src/RefMaxwell/ml_GradDiv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,58 @@ ML_Epetra::GradDivPreconditioner::GradDivPreconditioner(const Epetra_CrsMatrix &
}/*end constructor*/


// ================================================ ====== ==== ==== == =
ML_Epetra::GradDivPreconditioner::GradDivPreconditioner(const Epetra_CrsMatrix& K2_Matrix, // Face Grad-div + Mass
const Teuchos::ParameterList& List,
const bool ComputePrec):
ML_Preconditioner(),
K2_Matrix_(&K2_Matrix),
FaceNode_Matrix_(0),
D1_Clean_Matrix_(0),
D0_Clean_Matrix_(0),
TMT_Matrix_(0),
#ifdef HAVE_ML_IFPACK
IfSmoother(0),
#endif
verbose_(false),very_verbose_(false)
{
using Teuchos::RCP;
FaceNode_Matrix_ = &*List.get<RCP<const Epetra_CrsMatrix> >("FaceNode");
ML_CHK_ERRV((FaceNode_Matrix_==0));
D1_Clean_Matrix_ = &*List.get<RCP<const Epetra_CrsMatrix> >("D1");
ML_CHK_ERRV((D1_Clean_Matrix_==0));
D0_Clean_Matrix_ = &*List.get<RCP<const Epetra_CrsMatrix> >("D0");
ML_CHK_ERRV((D0_Clean_Matrix_==0));
TMT_Matrix_ = &*List.get<RCP<const Epetra_CrsMatrix> >("K0");
ML_CHK_ERRV((TMT_Matrix_==0));


/* Set the Epetra Goodies */
Comm_ = &(K2_Matrix_->Comm());
DomainMap_ = &(K2_Matrix_->DomainMap());
RangeMap_ = &(K2_Matrix_->RangeMap());
EdgeMap_ = &(D1_Clean_Matrix_->DomainMap());

Label_=new char [80];
strcpy(Label_,"ML face-element grad-div preconditioner");
List_=List;
SetDefaultsGradDiv(List_,false);

#ifdef ML_TIMING
/* Internal Timings */
NumApplications_ = 0;
ApplicationTime_ = 0.0;
FirstApplication_ = true;
FirstApplicationTime_ = 0.0;
NumConstructions_ = 0;
ConstructionTime_ = 0.0;
#endif

if(ComputePrec) ML_CHK_ERRV(ComputePreconditioner());

}


// ================================================ ====== ==== ==== == =
ML_Epetra::GradDivPreconditioner::~GradDivPreconditioner()
{
Expand Down
10 changes: 10 additions & 0 deletions packages/ml/src/RefMaxwell/ml_GradDiv.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ namespace ML_Epetra
const Epetra_CrsMatrix & K0_Matrix, // Nodal Laplacian (for aggregation)
const Teuchos::ParameterList& List,
const bool ComputePrec = true);

// Parameter-list driven version of main constructor
// Paramters of relevance (below) should be RCP's to matrices:
// FaceNode Face-to-node interpolation matrix
// D0 - Discrete gradient w/o BCs
// D1 - Discrete curl w/o BCs
// K0 - Nodal Laplacian (for aggregation)
GradDivPreconditioner(const Epetra_CrsMatrix& K2_Matrix, // Face Grad-div + Mass
const Teuchos::ParameterList& List,
const bool ComputePrec = true);
//@}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,17 @@ namespace Thyra {
if (startingOver == true) {

// Convert to Xpetra
std::list<std::string> convertXpetra = {"Coordinates", "Nullspace", "M1", "Ms", "D0", "M0inv"};
std::list<std::string> convertMat = {
"Dk_1", "Dk_2", "D0",
"Mk_one", "Mk_1_one", "M1_beta", "M1_alpha",
"invMk_1_invBeta", "invMk_2_invAlpha",
// for backwards compatibility
"M1", "Ms", "M0inv"
};
std::list<std::string> convertMV = {"Coordinates", "Nullspace"};
std::list<std::string> convertXpetra;
convertXpetra.insert(convertXpetra.end(), convertMV.begin(), convertMV.end());
convertXpetra.insert(convertXpetra.end(), convertMat.begin(), convertMat.end());
for (auto it = convertXpetra.begin(); it != convertXpetra.end(); ++it)
Converters<Scalar,LocalOrdinal,GlobalOrdinal,Node>::replaceWithXpetra(paramList,*it);

Expand All @@ -180,7 +190,6 @@ namespace Thyra {
RCP<XphMV> halfNullspace = Xpetra::convertToHalfPrecision(nullspace);
paramList.set("Nullspace",halfNullspace);
}
std::list<std::string> convertMat = {"M1", "Ms", "D0", "M0inv"};
for (auto it = convertMat.begin(); it != convertMat.end(); ++it) {
if (paramList.isType<RCP<XpMat> >(*it)) {
RCP<XpMat> M = paramList.get<RCP<XpMat> >(*it);
Expand Down
1 change: 1 addition & 0 deletions packages/muelu/doc/UsersGuide/update_params.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ namespace MueLu {
std::stringstream temp1; temp1 << "\"" << "1" << "\"";
if (value == temp1.str()) {
RCP<Teuchos::FancyOStream> out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout));
out->setOutputToRootOnly(0);
*out << "WARNING: repartitioning in MueLu is different to ML's. Please refer to the MueLu user's Manual for more information." << std::endl;
}
}
Expand Down
24 changes: 20 additions & 4 deletions packages/muelu/src/MueCentral/MueLu_HierarchyUtils_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ namespace MueLu {
for (ParameterList::ConstIterator levelListEntry = levelList.begin(); levelListEntry != levelList.end(); levelListEntry++) {
const std::string& name = levelListEntry->first;
TEUCHOS_TEST_FOR_EXCEPTION(name != "A" && name != "P" && name != "R" && name != "K" && name != "M" && name != "Mdiag" &&
name != "D0" && name != "M1" && name != "Ms" && name != "M0inv" &&
name != "D0" && name != "Dk_1" &&name != "Dk_2" &&
name != "Mk_one" && name != "Mk_1_one" && name != "M1_beta" && name != "M1_alpha" &&
name != "invMk_1_invBeta" && name != "invMk_2_invAlpha" &&
name != "M1" && name != "Ms" && name != "M0inv" &&
name != "Pnodal" && name != "NodeMatrix" && name != "NodeAggMatrix" &&
name != "Nullspace" && name != "Coordinates" && name != "pcoarsen: element to node map" &&
name != "Node Comm" && name != "DualNodeID2PrimalNodeID" && name != "Primal interface DOF map" &&
Expand Down Expand Up @@ -191,7 +194,11 @@ namespace MueLu {
level->Set(name, mat, NoFactory::get());
}
}
else if (name == "D0" || name == "M1" || name == "Ms" || name == "M0inv" || name == "Pnodal" || name == "NodeMatrix" || name == "NodeAggMatrix") {
else if (name == "D0" || name == "Dk_1" ||name == "Dk_2" ||
name == "Mk_one" || name == "Mk_1_one" || name == "M1_beta" || name == "M1_alpha" ||
name == "invMk_1_invBeta" || name == "invMk_2_invAlpha" ||
name == "M1" || name == "Ms" || name == "M0inv" ||
name == "Pnodal" || name == "NodeMatrix" || name == "NodeAggMatrix") {
level->AddKeepFlag(name,NoFactory::get(),MueLu::UserData);
if (levelListEntry->second.isType<RCP<Operator> >())
level->Set(name, Teuchos::getValue<RCP<Operator> > (levelListEntry->second), NoFactory::get());
Expand Down Expand Up @@ -320,13 +327,22 @@ namespace MueLu {
for (ParameterList::ConstIterator userListEntry = userList.begin(); userListEntry != userList.end(); userListEntry++) {
const std::string& name = userListEntry->first;
TEUCHOS_TEST_FOR_EXCEPTION(name != "P" && name != "R" && name != "K" && name != "M" && name != "Mdiag" &&
name != "D0" && name != "M1" && name != "Ms" && name != "M0inv" &&
name != "D0" && name != "Dk_1" &&name != "Dk_2" &&
name != "Mk_one" && name != "Mk_1_one" && name != "M1_beta" && name != "M1_alpha" &&
name != "invMk_1_invBeta" && name != "invMk_2_invAlpha" &&
name != "M1" && name != "Ms" && name != "M0inv" &&
name != "NodeMatrix" &&
name != "Nullspace" && name != "Coordinates" && name != "pcoarsen: element to node map" &&
name != "Node Comm" && name != "DualNodeID2PrimalNodeID" && name != "Primal interface DOF map" &&
name != "output stream" &&
!IsParamValidVariable(name), Exceptions::InvalidArgument,
std::string("MueLu::Utils::AddNonSerializableDataToHierarchy: user data parameter list contains unknown data type (") + name + ")");
if( name == "P" || name == "R" || name == "K" || name == "M" || name == "D0" || name == "M1" || name == "Ms" || name == "M0inv" ) {
if( name == "P" || name == "R" || name == "K" || name == "M" ||
name == "D0" || name == "Dk_1" ||name == "Dk_2" ||
name == "Mk_one" || name == "Mk_1_one" || name == "M1_beta" || name == "M1_alpha" ||
name == "invMk_1_invBeta" || name == "invMk_2_invAlpha" ||
name == "M1" || name == "Ms" || name == "M0inv" ||
name == "NodeMatrix" ) {
level->AddKeepFlag(name,NoFactory::get(),MueLu::UserData);
level->Set(name, Teuchos::getValue<RCP<Matrix > > (userListEntry->second), NoFactory::get());
} else if (name == "Mdiag") {
Expand Down
1 change: 1 addition & 0 deletions packages/muelu/src/MueCentral/MueLu_MasterList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ namespace MueLu {
std::stringstream temp1; temp1 << "\"" << "1" << "\"";
if (value == temp1.str()) {
RCP<Teuchos::FancyOStream> out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout));
out->setOutputToRootOnly(0);
*out << "WARNING: repartitioning in MueLu is different to MLs. Please refer to the MueLu users Manual for more information." << std::endl;
}
}
Expand Down
10 changes: 10 additions & 0 deletions packages/muelu/src/Operators/MueLu_Maxwell_Utils_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ namespace MueLu {
bool & allEdgesBoundary,
bool & allNodesBoundary);

//! Detect Dirichlet boundary conditions
static void detectBoundaryConditionsSM(RCP<Matrix> & SM_Matrix,
RCP<Matrix> & D0_Matrix,
magnitudeType rowSumTol,
Expand All @@ -108,6 +109,11 @@ namespace MueLu {
bool & allNodesBoundary);

//! Remove explicit zeros
static RCP<Matrix> removeExplicitZeros(const RCP<Matrix> & A,
const magnitudeType tolerance,
const bool keepDiagonal=true,
const size_t expectedNNZperRow=0);

static void removeExplicitZeros(Teuchos::ParameterList &parameterList,
RCP<Matrix> & D0_Matrix,
RCP<Matrix> & SM_Matrix,
Expand All @@ -120,6 +126,10 @@ namespace MueLu {
RCP<Matrix> dummy;
removeExplicitZeros(parameterList,D0_Matrix,SM_Matrix,dummy,dummy);
}

static void thresholdedAbs(const RCP<Matrix> & A,
const magnitudeType thresholded);


//! Sets matvec params on a matrix
static void setMatvecParams(Matrix& A, RCP<ParameterList> matvecParams);
Expand Down
Loading

0 comments on commit c4f035c

Please sign in to comment.