Skip to content

Commit

Permalink
Removing Rythmos dependency from Albany. Remaining TODO: change 'Tran…
Browse files Browse the repository at this point in the history
…sientTempus'

to 'Transient' for Solution Method.

Adding 1DCost source term for PHAL::ThermalSource. Needs testing.
  • Loading branch information
ikalash committed May 19, 2020
1 parent 2f4a578 commit 216e8e7
Show file tree
Hide file tree
Showing 17 changed files with 134 additions and 549 deletions.
9 changes: 0 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -473,15 +473,6 @@ ELSE()
SET(ALBANY_FROSCH FALSE)
ENDIF()

LIST(FIND Trilinos_PACKAGE_LIST Rythmos Rythmos_List_ID)
IF (Rythmos_List_ID GREATER -1)
MESSAGE("-- Looking for Rythmos: Found.")
SET(ALBANY_RYTHMOS TRUE)
ELSE()
MESSAGE("-- Looking for Rythmos: NOT found.")
SET(ALBANY_RYTHMOS FALSE)
ENDIF()

# Check if Trilinos has ROL
LIST(FIND Trilinos_PACKAGE_LIST ROL ROL_List_ID)
IF (ROL_List_ID GREATER -1)
Expand Down
55 changes: 2 additions & 53 deletions src/Albany_Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,44 +334,11 @@ Application::initialSetUp(const RCP<Teuchos::ParameterList>& params)

bool expl = false;
std::string stepperType;
if (solMethod == Transient) {
if (solMethod == TransientTempus) {
// Get Piro PL
Teuchos::RCP<Teuchos::ParameterList> piroParams =
Teuchos::sublist(params, "Piro", true);
// Check if there is Rythmos Solver sublist, and get the stepper type
if (piroParams->isSublist("Rythmos Solver")) {
Teuchos::RCP<Teuchos::ParameterList> rythmosSolverParams =
Teuchos::sublist(piroParams, "Rythmos Solver", true);
if (rythmosSolverParams->isSublist("Rythmos")) {
Teuchos::RCP<Teuchos::ParameterList> rythmosParams =
Teuchos::sublist(rythmosSolverParams, "Rythmos", true);
if (rythmosParams->isSublist("Stepper Settings")) {
Teuchos::RCP<Teuchos::ParameterList> stepperSettingsParams =
Teuchos::sublist(rythmosParams, "Stepper Settings", true);
if (stepperSettingsParams->isSublist("Stepper Selection")) {
Teuchos::RCP<Teuchos::ParameterList> stepperSelectionParams =
Teuchos::sublist(
stepperSettingsParams, "Stepper Selection", true);
stepperType =
stepperSelectionParams->get("Stepper Type", "Backward Euler");
}
}
}
}
// Check if there is Rythmos sublist, and get the stepper type
else if (piroParams->isSublist("Rythmos")) {
Teuchos::RCP<Teuchos::ParameterList> rythmosParams =
Teuchos::sublist(piroParams, "Rythmos", true);
stepperType = rythmosParams->get("Stepper Type", "Backward Euler");
}
// Search for "Explicit" in the stepperType name. If it's found, set expl
// to true.
if (stepperType.find("Explicit") != std::string::npos) expl = true;
} else if (solMethod == TransientTempus) {
// Get Piro PL
Teuchos::RCP<Teuchos::ParameterList> piroParams =
Teuchos::sublist(params, "Piro", true);
// Check if there is Rythmos Solver sublist, and get the stepper type
// Check if there is Tempus Solver sublist, and get the stepper type
if (piroParams->isSublist("Tempus")) {
Teuchos::RCP<Teuchos::ParameterList> rythmosSolverParams =
Teuchos::sublist(piroParams, "Tempus", true);
Expand Down Expand Up @@ -2412,8 +2379,6 @@ Application::determinePiroSolver(
piroSolverToken = "NOX";
} else if (solMethod == Continuation) {
piroSolverToken = "LOCA";
} else if (solMethod == Transient) {
piroSolverToken = (secondOrder == "No") ? "Rythmos" : secondOrder;
} else if (solMethod == TransientTempus) {
piroSolverToken = (secondOrder == "No") ? "Tempus" : secondOrder;
} else {
Expand Down Expand Up @@ -2793,22 +2758,6 @@ Application::removeEpetraRelatedPLs(
{
if (params->isSublist("Piro")) {
Teuchos::ParameterList& piroPL = params->sublist("Piro", true);
if (piroPL.isSublist("Rythmos")) {
Teuchos::ParameterList& rytPL = piroPL.sublist("Rythmos", true);
if (rytPL.isSublist("Stratimikos")) {
Teuchos::ParameterList& strataPL = rytPL.sublist("Stratimikos", true);
if (strataPL.isSublist("Linear Solver Types")) {
Teuchos::ParameterList& lsPL =
strataPL.sublist("Linear Solver Types", true);
if (lsPL.isSublist("AztecOO")) { lsPL.remove("AztecOO", true); }
if (strataPL.isSublist("Preconditioner Types")) {
Teuchos::ParameterList& precPL =
strataPL.sublist("Preconditioner Types", true);
if (precPL.isSublist("ML")) { precPL.remove("ML", true); }
}
}
}
}
if (piroPL.isSublist("NOX")) {
Teuchos::ParameterList& noxPL = piroPL.sublist("NOX", true);
if (noxPL.isSublist("Direction")) {
Expand Down
16 changes: 0 additions & 16 deletions src/Albany_ObserverFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
#include "Albany_NOXObserver.hpp"
#include "Albany_NOXStatelessObserver.hpp"
#endif
#if defined(ALBANY_EPETRA) && defined(ALBANY_RYTHMOS)
#include "Albany_RythmosObserver.hpp"
#endif

#include "Teuchos_ParameterList.hpp"

Expand Down Expand Up @@ -43,17 +40,4 @@ NOXStatelessObserverFactory::createInstance () {
}
#endif

#if defined(ALBANY_EPETRA) && defined(ALBANY_RYTHMOS)
RythmosObserverFactory::RythmosObserverFactory(const Teuchos::RCP<Application> &app) :
app_(app)
{}

Teuchos::RCP<Rythmos::IntegrationObserverBase<double> >
RythmosObserverFactory::createInstance()
{
Teuchos::RCP<Rythmos::IntegrationObserverBase<double> > result(new RythmosObserver(app_));
return result;
}
#endif

} // namespace Albany
15 changes: 0 additions & 15 deletions src/Albany_ObserverFactory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
#include "Albany_config.h"

#include "NOX_Epetra_Observer.H"
#if defined(ALBANY_EPETRA) && defined(ALBANY_RYTHMOS)
#include "Rythmos_IntegrationObserverBase.hpp"
#endif
#include "Teuchos_RCP.hpp"
#include "Teuchos_ParameterList.hpp"

Expand Down Expand Up @@ -39,18 +36,6 @@ class NOXStatelessObserverFactory {
Teuchos::RCP<Application> app_;
};

#if defined(ALBANY_EPETRA) && defined(ALBANY_RYTHMOS)
class RythmosObserverFactory {
public:
explicit RythmosObserverFactory(const Teuchos::RCP<Application> &app);

Teuchos::RCP<Rythmos::IntegrationObserverBase<double> > createInstance();

private:
Teuchos::RCP<Application> app_;
};
#endif

} // namespace Albany

#endif /* ALBANY_OBSERVERFACTORY_HPP */
129 changes: 0 additions & 129 deletions src/Albany_RythmosObserver.cpp

This file was deleted.

54 changes: 0 additions & 54 deletions src/Albany_RythmosObserver.hpp

This file was deleted.

8 changes: 0 additions & 8 deletions src/Albany_SolverFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@
#include "Teuchos_XMLParameterListHelpers.hpp"
#include "Teuchos_YamlParameterListHelpers.hpp"

#if defined(ALBANY_RYTHMOS)
#include "Rythmos_IntegrationObserverBase.hpp"
#endif

namespace {

void
Expand Down Expand Up @@ -191,10 +187,6 @@ createSolver (const Teuchos::RCP<ModelEvaluator>& model,
std::string piroSolverToken;
if (solutionMethod == "Steady") {
piroSolverToken = "NOX";
#ifdef ALBANY_RYTHMOS
} else if (solutionMethod == "Transient") {
piroSolverToken = "Rythmos";
#endif
#ifdef ALBANY_TEMPUS
} else if (solutionMethod == "Transient Tempus") {
piroSolverToken = "Tempus";
Expand Down
1 change: 0 additions & 1 deletion src/Albany_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#cmakedefine ALBANY_PANZER_EXPR_EVAL
#cmakedefine ALBANY_RBGEN
#cmakedefine ALBANY_ROL
#cmakedefine ALBANY_RYTHMOS
#cmakedefine ALBANY_SEACAS
#cmakedefine ALBANY_STOKHOS
#cmakedefine ALBANY_STK_REBALANCE
Expand Down
6 changes: 0 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ if(ALBANY_EPETRA)
Albany_NOXObserver.cpp
Albany_NOXStatelessObserver.cpp
)
if(ALBANY_RYTHMOS)
list (APPEND SOURCES Albany_RythmosObserver.cpp)
endif()
endif()

set(HEADERS
Expand Down Expand Up @@ -118,9 +115,6 @@ if(ALBANY_EPETRA)
Albany_ObserverFactory.hpp
Petra_Converters.hpp
)
if(ALBANY_RYTHMOS)
list (APPEND SOURCES Albany_RythmosObserver.hpp)
endif()
endif()

#adapt
Expand Down
2 changes: 1 addition & 1 deletion src/PHAL_Workset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ struct Workset
double m_coeff; // d(x_dot)/dx_{new}
double n_coeff; // d(x_dotdot)/dx_{new}

// Current Time as defined by Rythmos
// Current Time as defined by Tempus
double current_time;
// amb Nowhere set. We should either set it or remove it.
double previous_time;
Expand Down
Loading

0 comments on commit 216e8e7

Please sign in to comment.