Skip to content

Commit

Permalink
Start adding member functions to Forumulation for BMI queries
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldwj committed Apr 17, 2024
1 parent 2817f11 commit fa1187a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion extern/SoilMoistureProfiles/SoilMoistureProfiles
Submodule SoilMoistureProfiles updated 47 files
+9 −0 .gitignore
+42 −0 CMakeLists.txt
+42 −45 README.md
+6 −6 config/config_layered.txt
+0 −6 config/config_mapping.txt
+7 −0 config/config_topmodel.txt
+8 −3 config/realization_config_smp.json
+0 −69 config/realization_config_smp_macos.json
+110 −0 config/realization_config_smp_topmodel.json
+7 −0 config/topmod.run
+99 −82 include/bmi_soil_moisture_profile.hxx
+74 −88 include/soil_moisture_profile.hxx
+0 −3 make_bmi_mapper.sh
+0 −3 make_bmi_smp.sh
+27 −0 regridder/README.md
+84 −0 regridder/bmi/bmi.hxx
+11 −0 regridder/config/config_mapping.txt
+2 −0 regridder/config/config_syn.txt
+21,999 −0 regridder/data/cat_params.dat
+0 −0 regridder/data/grid_mapping.csv
+21,999 −0 regridder/data/grid_mapping_nextgen_01_ext.dat
+17 −0 regridder/data/synthetic/grid_mapping_syn2x2_case0.csv
+15 −0 regridder/data/synthetic/grid_mapping_syn2x2_case1.csv
+44 −0 regridder/data/synthetic/grid_mapping_syn2x2_case2.csv
+44 −0 regridder/data/synthetic/grid_mapping_syn2x2_case3.csv
+ regridder/data/synthetic_data_example.xlsx
+22,000 −0 regridder/data/twi-nextgen_01_ext.dat
+0 −0 regridder/data/twi_data.csv
+1 −1 regridder/include/bmi_regridder.hxx
+27 −7 regridder/include/soil_moisture_regridding.hxx
+3 −0 regridder/make_bmi_mapper.sh
+ regridder/run_bmi_mapper
+4 −2 regridder/src/bmi_main_regridder.cxx
+2 −2 regridder/src/bmi_regridder.cxx
+815 −0 regridder/src/soil_moisture_regridding.cxx
+29 −0 run_smp.sh
+120 −45 src/bmi_soil_moisture_profile.cxx
+171 −0 src/main_smp_topmodel.cxx
+14 −11 src/main_soil_moisture.cxx
+0 −485 src/soil_moisture_mapping.cxx
+621 −208 src/soil_moisture_profile.cxx
+1 −1 test/configs/unittest_conceptual.txt
+9 −0 test/configs/unittest_layered_constant.txt
+9 −0 test/configs/unittest_layered_linear.txt
+0 −461 test/main_unit_test_bmi.cxx
+695 −0 test/main_unittest.cxx
+2 −2 test/run_unittest.sh
14 changes: 14 additions & 0 deletions include/core/DomainLayer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@ namespace ngen
formulation->write_output("Time Step,""Time,"+formulation->get_output_header_line(",")+"\n");
}

/**
* @brief Get a list of output variables names for this layer
*
* @return vector of output variable names
*/

virtual std::vector<std::string>&& get_output_variable_names()
{
std::vector<std::string> output_variables;


return std::move(output_variables);

This comment has been minimized.

Copy link
@PhilMiller

PhilMiller Apr 17, 2024

Contributor

Drop the std::move around return values. It's counterproductive: https://devblogs.microsoft.com/oldnewthing/20231124-00/?p=109059

}

/***
* @brief Run one simulation timestep for this model associated with the domain
*
Expand Down
11 changes: 11 additions & 0 deletions include/core/Layer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ namespace ngen
*/
virtual int class_id() { return LayerClass::kLayer; }

/**
* @brief Get a list of output variables names for this layer
*
* @return vector of output variable names
*/

virtual std::vector<std::string>&& get_output_variable_names()
{
return std::move(std::vector<std::string>());
}

/***
* @brief Return the next timestep that will be processed by this layer in epoch time units
*/
Expand Down

0 comments on commit fa1187a

Please sign in to comment.