Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MoReFEM
CoreLibrary
MoReFEM
Commits
133711d2
Commit
133711d2
authored
Mar 31, 2016
by
GILLES Sebastien
Browse files
#873
-
#9
Parameters: improve comments.
parent
1a4e016d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Sources/Parameters/Parameter.hpp
View file @
133711d2
...
...
@@ -60,7 +60,7 @@ namespace HappyHeart
* \endverbatim
*
* In this case, g(t) is stored as a function and is recomputed at each \a TimeUpdate() calls (such calls
* should therefore be located in Model::InitializeStep()
or Model::FinalizeStep()
).
* should therefore be located in Model::InitializeStep()
where the time update actually occur
).
*/
...
...
Sources/Parameters/TimeDependency/Private/ApplyTimeFactor.hpp
View file @
133711d2
...
...
@@ -35,16 +35,46 @@ namespace HappyHeart
{
/*!
* \class doxygen_hide_apply_time_factor
*
* \brief Update the \a value_with_time_factor obtained after multiplying the time factor by the
* purely spatial component.
*
* Or in short, compute f(x) * g(t) given both parts.
*
* \copydoc doxygen_hide_param_time_dependancy
*
* The difficulty is that f(x) might be a scalar, a vector or a matrix; the different overloads here
* take care of each of this case.
*
*/
/*!
* \copydoc doxygen_hide_apply_time_factor
*
* <b>Overload for TypeT == Type::scalar.</b>
*/
void
ApplyTimeFactor
(
double
value_without_time_factor
,
double
time_factor
,
double
&
value_with_time_factor
)
noexcept
;
/*!
* \copydoc doxygen_hide_apply_time_factor
*
* <b>Overload for TypeT == Type::vector.</b>
*/
void
ApplyTimeFactor
(
const
LocalVector
&
value_without_time_factor
,
double
time_factor
,
LocalVector
&
value_with_time_factor
);
/*!
* \copydoc doxygen_hide_apply_time_factor
*
* <b>Overload for TypeT == Type::matrix.</b>
*/
void
ApplyTimeFactor
(
const
LocalMatrix
&
value_without_time_factor
,
double
time_factor
,
LocalMatrix
&
value_with_time_factor
);
...
...
Sources/Parameters/TimeDependency/TimeDependency.hpp
View file @
133711d2
...
...
@@ -32,7 +32,19 @@ namespace HappyHeart
namespace
TimeDependencyNS
{
/*!
* \brief Base class when there is a decoupled time dependency.
*
* \copydoc doxygen_hide_param_time_dependancy
*
* \tparam FunctorT A function with takes as argument a double (the time in seconds) and returns
* the time-related factor (g(t) in the explanation above).
* \tparam TypeT Whether the parameter at a quadrature point yields a scalar, a vector or a matrix.
*/
template
<
ParameterNS
::
Type
TypeT
,
...
...
@@ -68,7 +80,7 @@ namespace HappyHeart
* \brief Constructor.
*
* \param[in] time_manager Object that keeps track of the time within the Model.
* \param[in] funct
ion
Functor which returns the time-dependent factor given the current time.
* \param[in] funct
or
Functor which returns the time-dependent factor given the current time.
*/
explicit
Base
(
const
TimeManager
&
time_manager
,
FunctorT
&&
functor
);
...
...
@@ -113,6 +125,14 @@ namespace HappyHeart
//! Constant accessor to the object that keeps track of the time within the Model.
const
TimeManager
&
GetTimeManager
()
const
noexcept
;
/*!
* \brief Return the full value of the Parameter, once the time factor has been taken into account.
*
* \param[in] value_without_time_factor Value computed at the quadrature point when only the spatial
* contribution has been taken into account (f(x) in the class explanation).
* \return Value once the time contribution has been taken into account (f(x) * g(t) in the class
* explanation).
*/
return_type
ApplyTimeFactor
(
return_type
value_without_time_factor
)
const
;
private:
...
...
@@ -142,6 +162,9 @@ namespace HappyHeart
* new object.
*
* The method is marked const as it acts solely upon a mutable data attribute.
*
* \return Reference to the object in which full value of the parameter at a given quadrature point is
* stored.
*/
storage_type
&
GetNonCstValueWithTimeFactor
()
const
noexcept
;
...
...
@@ -186,7 +209,11 @@ namespace HappyHeart
}
// namespace TimeDependencyNS
/*!
* \brief An instantiation of \a TimeDependencyNS::Base where the function is given by a mere std::function.
*
* \tparam TypeT Whether the parameter at a quadrature point yields a scalar, a vector or a matrix.
*/
template
<
ParameterNS
::
Type
TypeT
>
using
TimeDependency
=
TimeDependencyNS
::
Base
<
TypeT
,
std
::
function
<
double
(
double
)
>>
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment