diff --git a/Documentation/ProjectFile/prj/time_loop/output/t_specific_times.md b/Documentation/ProjectFile/prj/time_loop/output/t_specific_times.md deleted file mode 100644 index 4677e29eb64d6a59c8590c1fce840a93b7216db3..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/time_loop/output/t_specific_times.md +++ /dev/null @@ -1,2 +0,0 @@ -An option input of specific times, at which the output of the results must be - conducted. diff --git a/Documentation/ProjectFile/prj/time_loop/output/t_specified_times.md b/Documentation/ProjectFile/prj/time_loop/output/t_specified_times.md new file mode 100644 index 0000000000000000000000000000000000000000..be6096be2f3abb406e19592a21de79f04c65dec6 --- /dev/null +++ b/Documentation/ProjectFile/prj/time_loop/output/t_specified_times.md @@ -0,0 +1,2 @@ +An option input of specified times, at which the output of the results must be + conducted. diff --git a/Documentation/ProjectFile/prj/time_loop/processes/process/time_stepping/EvolutionaryPIDcontroller/t_specific_times.md b/Documentation/ProjectFile/prj/time_loop/processes/process/time_stepping/EvolutionaryPIDcontroller/t_specified_times.md similarity index 98% rename from Documentation/ProjectFile/prj/time_loop/processes/process/time_stepping/EvolutionaryPIDcontroller/t_specific_times.md rename to Documentation/ProjectFile/prj/time_loop/processes/process/time_stepping/EvolutionaryPIDcontroller/t_specified_times.md index 92fff5fadbdc54f4f17ebfe9d85beb72be5ee700..d75c95a8ae00edf5862927bff3258490df563e1c 100644 --- a/Documentation/ProjectFile/prj/time_loop/processes/process/time_stepping/EvolutionaryPIDcontroller/t_specific_times.md +++ b/Documentation/ProjectFile/prj/time_loop/processes/process/time_stepping/EvolutionaryPIDcontroller/t_specified_times.md @@ -1,2 +1 @@ The specified times that must be reached in the time stepping. - diff --git a/NumLib/TimeStepping/Algorithms/CreateEvolutionaryPIDcontroller.cpp b/NumLib/TimeStepping/Algorithms/CreateEvolutionaryPIDcontroller.cpp index 4b703b3909a110f3c65e6f9bea4f6a7484b3e6e5..0f3c6db518c3dc3316adf27611773d762d68bade 100644 --- a/NumLib/TimeStepping/Algorithms/CreateEvolutionaryPIDcontroller.cpp +++ b/NumLib/TimeStepping/Algorithms/CreateEvolutionaryPIDcontroller.cpp @@ -42,14 +42,14 @@ std::unique_ptr<TimeStepAlgorithm> createEvolutionaryPIDcontroller( //! \ogs_file_param{prj__time_loop__processes__process__time_stepping__EvolutionaryPIDcontroller__rel_dt_max} auto const rel_h_max = config.getConfigParameter<double>("rel_dt_max"); - auto specific_times = - //! \ogs_file_param{prj__time_loop__processes__process__time_stepping__EvolutionaryPIDcontroller__specific_times} - config.getConfigParameter<std::vector<double>>("specific_times", + auto specified_times = + //! \ogs_file_param{prj__time_loop__processes__process__time_stepping__EvolutionaryPIDcontroller__specified_times} + config.getConfigParameter<std::vector<double>>("specified_times", std::vector<double>{}); - if (!specific_times.empty()) + if (!specified_times.empty()) { // Remove possible duplicated elements and sort in descending order. - BaseLib::makeVectorUnique(specific_times, std::greater<double>()); + BaseLib::makeVectorUnique(specified_times, std::greater<double>()); } //! \ogs_file_param{prj__time_loop__processes__process__time_stepping__EvolutionaryPIDcontroller__tol} @@ -57,6 +57,6 @@ std::unique_ptr<TimeStepAlgorithm> createEvolutionaryPIDcontroller( return std::make_unique<EvolutionaryPIDcontroller>( t0, t_end, h0, h_min, h_max, rel_h_min, rel_h_max, - std::move(specific_times), tol); + std::move(specified_times), tol); } } // end of namespace NumLib diff --git a/NumLib/TimeStepping/Algorithms/EvolutionaryPIDcontroller.cpp b/NumLib/TimeStepping/Algorithms/EvolutionaryPIDcontroller.cpp index d5108a55e8db40c5a0b4bdc7378c63d978d47b79..eda01e4a3ed52165a0ab7729efdbe45cdd6c4dd1 100644 --- a/NumLib/TimeStepping/Algorithms/EvolutionaryPIDcontroller.cpp +++ b/NumLib/TimeStepping/Algorithms/EvolutionaryPIDcontroller.cpp @@ -143,29 +143,29 @@ double EvolutionaryPIDcontroller::limitStepSize( double EvolutionaryPIDcontroller::checkSpecificTimeReached(const double h_new) { - if (_specific_times.empty()) + if (_specified_times.empty()) return h_new; - const double specific_time = _specific_times.back(); + const double specific_time = _specified_times.back(); const double zero_threshold = std::numeric_limits<double>::epsilon(); if ((specific_time > _ts_current.current()) && (_ts_current.current() + h_new - specific_time > zero_threshold)) { - _specific_times.pop_back(); + _specified_times.pop_back(); return specific_time - _ts_current.current(); } return h_new; } -void EvolutionaryPIDcontroller::addSpecificTimes( - std::vector<double> const& extra_specific_times) +void EvolutionaryPIDcontroller::addSpecifiedTimes( + std::vector<double> const& extra_specified_times) { - _specific_times.insert(_specific_times.end(), extra_specific_times.begin(), - extra_specific_times.end()); + _specified_times.insert(_specified_times.end(), extra_specified_times.begin(), + extra_specified_times.end()); // Remove possible duplicated elements and sort in descending order. - BaseLib::makeVectorUnique(_specific_times, std::greater<double>()); + BaseLib::makeVectorUnique(_specified_times, std::greater<double>()); } } // end of namespace NumLib diff --git a/NumLib/TimeStepping/Algorithms/EvolutionaryPIDcontroller.h b/NumLib/TimeStepping/Algorithms/EvolutionaryPIDcontroller.h index 02d18b20dfd9af690c0bb022584fa1fb90967145..961fb6df51f085717194b4292e1903afca9864ff 100644 --- a/NumLib/TimeStepping/Algorithms/EvolutionaryPIDcontroller.h +++ b/NumLib/TimeStepping/Algorithms/EvolutionaryPIDcontroller.h @@ -55,7 +55,7 @@ public: const double h0, const double h_min, const double h_max, const double rel_h_min, const double rel_h_max, - const std::vector<double>&& specific_times, + const std::vector<double>&& specified_times, const double tol) : TimeStepAlgorithm(t0, t_end), _h0(h0), @@ -63,7 +63,7 @@ public: _h_max(h_max), _rel_h_min(rel_h_min), _rel_h_max(rel_h_max), - _specific_times(std::move(specific_times)), + _specified_times(std::move(specified_times)), _tol(tol), _e_n_minus1(0.), _e_n_minus2(0.), @@ -92,8 +92,8 @@ public: /// solution error. bool isSolutionErrorComputationNeeded() override { return true; } /// Add specific times - void addSpecificTimes( - std::vector<double> const& extra_specific_times) override; + void addSpecifiedTimes( + std::vector<double> const& extra_specified_times) override; private: const double _kP = 0.075; ///< Parameter. \see EvolutionaryPIDcontroller @@ -110,7 +110,7 @@ private: const double _rel_h_max; // Given times that steps have to reach. - std::vector<double> _specific_times; + std::vector<double> _specified_times; const double _tol; diff --git a/NumLib/TimeStepping/Algorithms/TimeStepAlgorithm.h b/NumLib/TimeStepping/Algorithms/TimeStepAlgorithm.h index 61b9c1399e8478c540d943997304fd4cdf2cfb1c..1ecfd586510aee4643cdd27a97b203991d008294 100644 --- a/NumLib/TimeStepping/Algorithms/TimeStepAlgorithm.h +++ b/NumLib/TimeStepping/Algorithms/TimeStepAlgorithm.h @@ -87,7 +87,7 @@ public: virtual bool isSolutionErrorComputationNeeded() { return false; } /// Add specific times - virtual void addSpecificTimes(std::vector<double> const& /*specific_times*/) + virtual void addSpecifiedTimes(std::vector<double> const& /*specified_times*/) { } diff --git a/ProcessLib/Output/CreateOutput.cpp b/ProcessLib/Output/CreateOutput.cpp index 8d6ffa01193a6fddd3bd565564e94ed6d8a7fe8e..8ef7c8d88cfe5aef9875cafd2215d49db2cb0509 100644 --- a/ProcessLib/Output/CreateOutput.cpp +++ b/ProcessLib/Output/CreateOutput.cpp @@ -44,7 +44,7 @@ std::unique_ptr<Output> createOutput(const BaseLib::ConfigTree& config, // Construction of output times std::vector<Output::PairRepeatEachSteps> repeats_each_steps; - std::vector<double> specific_times; + std::vector<double> specified_times; //! \ogs_file_param{prj__time_loop__output__timesteps} if (auto const timesteps = config.getConfigSubtreeOptional("timesteps")) @@ -74,15 +74,15 @@ std::unique_ptr<Output> createOutput(const BaseLib::ConfigTree& config, repeats_each_steps.emplace_back(1, 1); } - auto specific_times_ptr = - //! \ogs_file_param{prj__time_loop__output__specific_times} + auto specified_times_ptr = + //! \ogs_file_param{prj__time_loop__output__specified_times} config.getConfigParameterOptional<std::vector<double>>( - "specific_times"); - if (specific_times_ptr) + "specified_times"); + if (specified_times_ptr) { - specific_times = std::move(*specific_times_ptr); + specified_times = std::move(*specified_times_ptr); // Remove possible duplicated elements and sort in descending order. - BaseLib::makeVectorUnique(specific_times, std::greater<double>()); + BaseLib::makeVectorUnique(specified_times, std::greater<double>()); } bool const output_iteration_results = @@ -92,7 +92,7 @@ std::unique_ptr<Output> createOutput(const BaseLib::ConfigTree& config, return std::make_unique<Output>(output_directory, prefix, compress_output, data_mode, output_iteration_results, std::move(repeats_each_steps), - std::move(specific_times)); + std::move(specified_times)); } } // namespace ProcessLib diff --git a/ProcessLib/Output/Output.cpp b/ProcessLib/Output/Output.cpp index e78b773c1bc1d7efaf2d89ea40cb147d4fc235cf..1567191574e49e27ed60e110accc58630f98af59 100644 --- a/ProcessLib/Output/Output.cpp +++ b/ProcessLib/Output/Output.cpp @@ -67,14 +67,14 @@ bool Output::shallDoOutput(unsigned timestep, double const t) bool make_output = timestep % each_steps == 0; - if (_specific_times.empty()) + if (_specified_times.empty()) return make_output; - const double specific_time = _specific_times.back(); + const double specific_time = _specified_times.back(); const double zero_threshold = std::numeric_limits<double>::epsilon(); if (std::fabs(specific_time - t) < zero_threshold) { - _specific_times.pop_back(); + _specified_times.pop_back(); make_output = true; } @@ -85,14 +85,14 @@ Output::Output(std::string output_directory, std::string prefix, bool const compress_output, std::string const& data_mode, bool const output_nonlinear_iteration_results, std::vector<PairRepeatEachSteps> repeats_each_steps, - const std::vector<double>&& specific_times) + const std::vector<double>&& specified_times) : _output_directory(std::move(output_directory)), _output_file_prefix(std::move(prefix)), _output_file_compression(compress_output), _output_file_data_mode(convertVtkDataMode(data_mode)), _output_nonlinear_iteration_results(output_nonlinear_iteration_results), _repeats_each_steps(std::move(repeats_each_steps)), - _specific_times(std::move(specific_times)) + _specified_times(std::move(specified_times)) { } diff --git a/ProcessLib/Output/Output.h b/ProcessLib/Output/Output.h index 47d83033068d85a369e4b0a7d355ac98da2e164f..bf4fc327a009e12ea391f1f5fb495e390f741d79 100644 --- a/ProcessLib/Output/Output.h +++ b/ProcessLib/Output/Output.h @@ -43,7 +43,7 @@ public: bool const compress_output, std::string const& data_mode, bool const output_nonlinear_iteration_results, std::vector<PairRepeatEachSteps> repeats_each_steps, - const std::vector<double>&& specific_times); + const std::vector<double>&& specified_times); //! TODO doc. Opens a PVD file for each process. void addProcess(ProcessLib::Process const& process, const int process_id); @@ -78,7 +78,7 @@ public: GlobalVector const& x, const unsigned iteration); - std::vector<double> getSpecificTimes() {return _specific_times;} + std::vector<double> getSpecifiedTimes() {return _specified_times;} private: struct ProcessData @@ -104,7 +104,7 @@ private: std::vector<PairRepeatEachSteps> _repeats_each_steps; //! Given times that steps have to reach. - std::vector<double> _specific_times; + std::vector<double> _specified_times; std::multimap<Process const*, ProcessData> _process_to_process_data; diff --git a/ProcessLib/UncoupledProcessesTimeLoop.cpp b/ProcessLib/UncoupledProcessesTimeLoop.cpp index d0b1f4ee53c6c17777dd88564245ebe7af1220ba..0f114f0a9f23121957bd34f41db1dacb16a16521 100644 --- a/ProcessLib/UncoupledProcessesTimeLoop.cpp +++ b/ProcessLib/UncoupledProcessesTimeLoop.cpp @@ -537,7 +537,7 @@ bool UncoupledProcessesTimeLoop::loop() // these times. Note: only the adaptive time steppers can have the // the specific times. auto& timestepper = process_data->timestepper; - timestepper->addSpecificTimes(_output->getSpecificTimes()); + timestepper->addSpecifiedTimes(_output->getSpecifiedTimes()); ++process_id; } diff --git a/Tests/Data/Parabolic/HT/StaggeredCoupling/ConstViscosity/square_5500x5500_staggered_scheme_adaptive_dt.prj b/Tests/Data/Parabolic/HT/StaggeredCoupling/ConstViscosity/square_5500x5500_staggered_scheme_adaptive_dt.prj index 0eb5b012447bf38ea90743e637299c5f7b915637..04ed44ae095039b34df7c8833a983a58ac401ca3 100644 --- a/Tests/Data/Parabolic/HT/StaggeredCoupling/ConstViscosity/square_5500x5500_staggered_scheme_adaptive_dt.prj +++ b/Tests/Data/Parabolic/HT/StaggeredCoupling/ConstViscosity/square_5500x5500_staggered_scheme_adaptive_dt.prj @@ -100,7 +100,7 @@ <rel_dt_min> 0.1 </rel_dt_min> <rel_dt_max> 10 </rel_dt_max> <tol> 10.0 </tol> - <specific_times>5.0e9 2.e10</specific_times> + <specified_times>5.0e9 2.e10</specified_times> </time_stepping> </process> <process ref="ConstViscosityThermalConvection"> @@ -128,7 +128,7 @@ <rel_dt_min> 0.1 </rel_dt_min> <rel_dt_max> 10 </rel_dt_max> <tol> 10.0 </tol> - <specific_times>5.0e9 2.e10</specific_times> + <specified_times>5.0e9 2.e10</specified_times> </time_stepping> </process> </processes> diff --git a/Tests/Data/Parabolic/Richards/RichardsFlow_2d_small_adaptive_dt.prj b/Tests/Data/Parabolic/Richards/RichardsFlow_2d_small_adaptive_dt.prj index 5329404a0e52321f31b3b75929384cc51ea4e801..932fce40aa55685db7b1f960e67d5e5c11effc18 100644 --- a/Tests/Data/Parabolic/Richards/RichardsFlow_2d_small_adaptive_dt.prj +++ b/Tests/Data/Parabolic/Richards/RichardsFlow_2d_small_adaptive_dt.prj @@ -109,7 +109,7 @@ <each_steps>100000000</each_steps> </pair> </timesteps> - <specific_times> 50.0 100.0 500.</specific_times> + <specified_times> 50.0 100.0 500.</specified_times> <output_iteration_results>false</output_iteration_results> </output> </time_loop>