diff --git a/src/ocean/Ocean.C b/src/ocean/Ocean.C index 11d8ecf4..c4e67397 100644 --- a/src/ocean/Ocean.C +++ b/src/ocean/Ocean.C @@ -52,38 +52,42 @@ extern "C" _SUBROUTINE_(set_seaice_parameters)(SeaIce::CommPars*); //===================================================================== // Constructor: -Ocean::Ocean(RCP Comm, ParameterList oceanParamList) +Ocean::Ocean(RCP Comm, Model::ParameterList paramListPtr) + : Ocean(Comm, *paramListPtr) +{} + +Ocean::Ocean(RCP Comm, Teuchos::ParameterList& oceanParamList) : solverInitialized_ (false), // Solver needs initialization precInitialized_ (false), // Preconditioner needs initialization recompPreconditioner_ (true), // We need a preconditioner to start with recompMassMat_ (true), // We need a mass matrix to start with - loadSalinityFlux_ (oceanParamList->get("Load salinity flux", false)), - saveSalinityFlux_ (oceanParamList->get("Save salinity flux", true)), - loadTemperatureFlux_ (oceanParamList->get("Load temperature flux", false)), - saveTemperatureFlux_ (oceanParamList->get("Save temperature flux", true)), + loadSalinityFlux_ (oceanParamList.get("Load salinity flux", false)), + saveSalinityFlux_ (oceanParamList.get("Save salinity flux", true)), + loadTemperatureFlux_ (oceanParamList.get("Load temperature flux", false)), + saveTemperatureFlux_ (oceanParamList.get("Save temperature flux", true)), - useFort3_ (oceanParamList->get("Use legacy fort.3 output", false)), - useFort44_ (oceanParamList->get("Use legacy fort.44 output", true)), - saveColumnIntegral_ (oceanParamList->get("Save column integral", false)), - maxMaskFixes_ (oceanParamList->get("Max mask fixes", 5)), + useFort3_ (oceanParamList.get("Use legacy fort.3 output", false)), + useFort44_ (oceanParamList.get("Use legacy fort.44 output", true)), + saveColumnIntegral_ (oceanParamList.get("Save column integral", false)), + maxMaskFixes_ (oceanParamList.get("Max mask fixes", 5)), - landmaskFile_ (oceanParamList->sublist("THCM").get("Land Mask", "none")), + landmaskFile_ (oceanParamList.sublist("THCM").get("Land Mask", "none")), - analyzeJacobian_ (oceanParamList->get("Analyze Jacobian", true)) + analyzeJacobian_ (oceanParamList.get("Analyze Jacobian", true)) { INFO("Ocean: constructor..."); // inherited input/output datamembers - inputFile_ = oceanParamList->get("Input file", "ocean_input.h5"); - outputFile_ = oceanParamList->get("Output file", "ocean_output.h5"); - saveMask_ = oceanParamList->get("Save mask", true); - loadMask_ = oceanParamList->get("Load mask", true); + inputFile_ = oceanParamList.get("Input file", "ocean_input.h5"); + outputFile_ = oceanParamList.get("Output file", "ocean_output.h5"); + saveMask_ = oceanParamList.get("Save mask", true); + loadMask_ = oceanParamList.get("Load mask", true); - loadState_ = oceanParamList->get("Load state", false); - saveState_ = oceanParamList->get("Save state", true); - saveEvery_ = oceanParamList->get("Save frequency", 0); + loadState_ = oceanParamList.get("Load state", false); + saveState_ = oceanParamList.get("Save state", true); + saveEvery_ = oceanParamList.get("Save frequency", 0); // initialize postprocessing counter ppCtr_ = 0; @@ -96,7 +100,7 @@ Ocean::Ocean(RCP Comm, ParameterList oceanParamList) // instance at a time. The Ocean class can access THCM with a call // to THCM::Instance() const Teuchos::ParameterList &thcmList = - oceanParamList->sublist("THCM"); + oceanParamList.sublist("THCM"); thcm_ = rcp(new THCM(thcmList, comm_)); @@ -202,7 +206,7 @@ Ocean::Ocean(RCP Comm, ParameterList oceanParamList) surfaceSimporter_ = Teuchos::rcp(new Epetra_Import(*sIndexMap_, state_->Map())); - INFO(*oceanParamList); + INFO(oceanParamList); INFO("\n"); INFO("Ocean couplings: coupled_T = " << getCoupledT() ); INFO(" coupled_S = " << getCoupledS() ); diff --git a/src/ocean/Ocean.H b/src/ocean/Ocean.H index 92f3e58b..6200d994 100644 --- a/src/ocean/Ocean.H +++ b/src/ocean/Ocean.H @@ -157,8 +157,8 @@ protected: public: //! constructor - Ocean(Teuchos::RCP Comm, - ParameterList oceanParamList); + Ocean(Teuchos::RCP Comm, Model::ParameterList oceanParamList); + Ocean(Teuchos::RCP Comm, Teuchos::ParameterList& oceanParamList); //! destructor ~Ocean();