Skip to content

Commit 989dc8e

Browse files
committed
define TimeStepStage in a dedicated header
1 parent 915863f commit 989dc8e

3 files changed

Lines changed: 27 additions & 8 deletions

File tree

include/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ mgis_header(MGIS/MaterialProperty OutOfBoundsPolicy.hxx)
3131
mgis_header(MGIS/MaterialProperty MaterialPropertyFctPtr.hxx)
3232
mgis_header(MGIS/MaterialProperty MaterialProperty.hxx)
3333
mgis_header(MGIS/Behaviour Hypothesis.hxx)
34+
mgis_header(MGIS/Behaviour TimeStepStage.hxx)
3435
mgis_header(MGIS/Behaviour RotationMatrix.hxx)
3536
mgis_header(MGIS/Behaviour RotationMatrix.ixx)
3637
mgis_header(MGIS/Behaviour Variable.hxx)

include/MGIS/Behaviour/MaterialFunctionManager.hxx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "MGIS/Function/SpaceConcept.hxx"
1717
#include "MGIS/Function/SharedSpace.hxx"
1818
#include "MGIS/Function/Function.hxx"
19+
#include "MGIS/Behaviour/TimeStepStage.hxx"
1920
#include "MGIS/Behaviour/MaterialDataManager.hxx"
2021

2122
namespace mgis::behaviour {
@@ -95,14 +96,6 @@ namespace mgis::behaviour {
9596
std::shared_ptr<const Behaviour> behaviour_ptr;
9697
};
9798

98-
enum TimeStepStage {
99-
BEGINNING_OF_TIME_STEP,
100-
END_OF_TIME_STEP,
101-
};
102-
103-
inline constexpr auto bts = TimeStepStage::BEGINNING_OF_TIME_STEP;
104-
inline constexpr auto ets = TimeStepStage::END_OF_TIME_STEP;
105-
10699
// this variable is a workaround Visual Studio 2022 limitation
107100
// on defining default value for non-type template argument
108101
template <size_type N>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*!
2+
* \file MGIS/Behaviour/TimeStepStage.hxx
3+
* \brief
4+
* \author Thomas Helfer
5+
* \date 24/01/2026
6+
*/
7+
8+
#ifndef LIB_MGIS_BEHAVIOUR_TIMESTEPSTAGE_HXX
9+
#define LIB_MGIS_BEHAVIOUR_TIMESTEPSTAGE_HXX
10+
11+
namespace mgis::behaviour {
12+
13+
/*!
14+
* \brief an enumeration describing either the beginning of the time step or
15+
* the end of the time step
16+
*/
17+
enum struct TimeStepStage { BEGINNING_OF_TIME_STEP, END_OF_TIME_STEP };
18+
//! \brief variable associated with the beginning of the time step
19+
inline constexpr auto bts = TimeStepStage::BEGINNING_OF_TIME_STEP;
20+
//! \brief variable associated with the end of the time step
21+
inline constexpr auto ets = TimeStepStage::END_OF_TIME_STEP;
22+
23+
} // end of namespace mgis::behaviour
24+
25+
#endif /* LIB_MGIS_BEHAVIOUR_TIMESTEPSTAGE_HXX */

0 commit comments

Comments
 (0)