-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ImproveErrorMessageInTimeLoopParsing' into 'master'
[TimeLoop] Improve error message if end time is smaller than initial time See merge request ogs/ogs!5140
- Loading branch information
Showing
12 changed files
with
236 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* \file | ||
* \copyright | ||
* Copyright (c) 2012-2024, OpenGeoSys Community (http://www.opengeosys.org) | ||
* Distributed under a Modified BSD License. | ||
* See accompanying file LICENSE.txt or | ||
* http://www.opengeosys.org/project/license | ||
* | ||
*/ | ||
|
||
#include "NumLib/TimeStepping/Algorithms/CreateEvolutionaryPIDcontroller.h" | ||
|
||
#include <gtest/gtest.h> | ||
|
||
#include <numeric> | ||
|
||
#include "NumLib/TimeStepping/Algorithms/TimeStepAlgorithm.h" | ||
|
||
TEST(NumLibCreateEvolutionaryPIDcontrollerTimeStepping, | ||
InitialTimeGreaterThanEndTime) | ||
{ | ||
double const t_initial = 1; | ||
double const t_end = 0; | ||
|
||
NumLib::EvolutionaryPIDcontrollerParameters parameters{ | ||
t_initial, t_end, 0, 0, 0, 0, 0, 0}; | ||
EXPECT_ANY_THROW( | ||
auto fixed_time_step_algorithm = | ||
NumLib::createEvolutionaryPIDcontroller(std::move(parameters), {})); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* \file | ||
* \copyright | ||
* Copyright (c) 2012-2024, OpenGeoSys Community (http://www.opengeosys.org) | ||
* Distributed under a Modified BSD License. | ||
* See accompanying file LICENSE.txt or | ||
* http://www.opengeosys.org/project/license | ||
* | ||
*/ | ||
|
||
#include "NumLib/TimeStepping/Algorithms/CreateFixedTimeStepping.h" | ||
|
||
#include <gtest/gtest.h> | ||
|
||
#include <numeric> | ||
|
||
TEST(NumLibCreateFixedTimeStepping, InitialTimeGreaterThanEndTime) | ||
{ | ||
double const t_initial = 1; | ||
double const t_end = 0; | ||
std::vector<NumLib::RepeatDtPair> const repeat_dt_pair; | ||
|
||
NumLib::FixedTimeSteppingParameters const parameters{t_initial, t_end, | ||
repeat_dt_pair}; | ||
EXPECT_ANY_THROW(auto fixed_time_step_algorithm = | ||
NumLib::createFixedTimeStepping(parameters, {})); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* \file | ||
* \copyright | ||
* Copyright (c) 2012-2024, OpenGeoSys Community (http://www.opengeosys.org) | ||
* Distributed under a Modified BSD License. | ||
* See accompanying file LICENSE.txt or | ||
* http://www.opengeosys.org/project/license | ||
* | ||
*/ | ||
|
||
#include "NumLib/TimeStepping/Algorithms/CreateIterationNumberBasedTimeStepping.h" | ||
|
||
#include <gtest/gtest.h> | ||
|
||
#include <numeric> | ||
|
||
#include "NumLib/TimeStepping/Algorithms/TimeStepAlgorithm.h" | ||
|
||
TEST(NumLibCreateIterationNumberBasedTimeStepping, | ||
InitialTimeGreaterThanEndTime) | ||
{ | ||
double const t_initial = 1; | ||
double const t_end = 0; | ||
|
||
NumLib::IterationNumberBasedTimeSteppingParameters parameters{ | ||
t_initial, t_end, 0, 0, 0, {}, {}}; | ||
EXPECT_ANY_THROW(auto fixed_time_step_algorithm = | ||
NumLib::createIterationNumberBasedTimeStepping( | ||
std::move(parameters), {})); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters