From fa6c223ab379ff507755b94af14ea0383e5a2730 Mon Sep 17 00:00:00 2001 From: Phil Miller Date: Fri, 23 Aug 2024 09:17:55 -0700 Subject: [PATCH] Square away virtual method implementation --- .../coastal/SchismFormulation.hpp | 6 ++- .../coastal/SchismFormulation.cpp | 52 +++++++++++++++++++ 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/include/realizations/coastal/SchismFormulation.hpp b/include/realizations/coastal/SchismFormulation.hpp index 83a8cf395c..b914a23298 100644 --- a/include/realizations/coastal/SchismFormulation.hpp +++ b/include/realizations/coastal/SchismFormulation.hpp @@ -9,7 +9,7 @@ #include #include -class SchismFormulation : public CoastalFormulation +class SchismFormulation final : public CoastalFormulation { public: using MeshPointsDataProvider = data_access::DataProvider; @@ -33,7 +33,6 @@ class SchismFormulation : public CoastalFormulation size_t get_ts_index_for_time(const time_t &epoch_time) const override; data_type get_value(const selection_type& selector, data_access::ReSampleMethod m) override; - std::vector get_values(const selection_type& selector, data_access::ReSampleMethod m) override; // Implementation of CoastalFormulation void initialize() override; @@ -42,6 +41,9 @@ class SchismFormulation : public CoastalFormulation void get_values(const selection_type& selector, boost::span data) override; +protected: + size_t mesh_size(std::string const& variable_name) override; + private: std::unique_ptr bmi_; diff --git a/src/realizations/coastal/SchismFormulation.cpp b/src/realizations/coastal/SchismFormulation.cpp index a10e7210f2..3e01324ee8 100644 --- a/src/realizations/coastal/SchismFormulation.cpp +++ b/src/realizations/coastal/SchismFormulation.cpp @@ -41,6 +41,8 @@ SchismFormulation::SchismFormulation( ); } +SchismFormulation::~SchismFormulation() = default; + void SchismFormulation::initialize() { bmi_->Initialize(); @@ -83,6 +85,8 @@ void SchismFormulation::update() // TMP2m - temperature at 2m // UU10m, VV10m - wind velocity components at 10m + //auto rain_points = MeshPointsSelector{"RAINRATE", current_time_, time_step_length_, input_variable_units_["RAINRATE"], all_points}; + // ETA2_bnd - water surface elevation at the boundaries // Q_bnd - flows at boundaries @@ -90,4 +94,52 @@ void SchismFormulation::update() bmi_->Update(); } +boost::span SchismFormulation::get_available_variable_names() const +{ + throw std::runtime_error(__func__); + return {}; +} + +long SchismFormulation::get_data_start_time() const +{ + throw std::runtime_error(__func__); + return 0; +} + +long SchismFormulation::get_data_stop_time() const +{ + throw std::runtime_error(__func__); + return 0; +} + +long SchismFormulation::record_duration() const +{ + throw std::runtime_error(__func__); + return 0; +} + +size_t SchismFormulation::get_ts_index_for_time(const time_t &epoch_time) const +{ + throw std::runtime_error(__func__); + return 0; +} + +SchismFormulation::data_type SchismFormulation::get_value(const selection_type& selector, data_access::ReSampleMethod m) +{ + throw std::runtime_error(__func__); + return 0.0; +} + +void SchismFormulation::get_values(const selection_type& selector, boost::span data) +{ + throw std::runtime_error(__func__); +} + +size_t SchismFormulation::mesh_size(std::string const& variable_name) +{ + throw std::runtime_error(__func__); + return 0; +} + + #endif // NGEN_WITH_BMI_FORTRAN && NGEN_WITH_MPI