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
33952769
Commit
33952769
authored
Apr 30, 2015
by
GILLES Sebastien
Browse files
#531
Clean-up Doxygen comments in GlobalVariationalOperator.
parent
cb9fc80f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Sources/FiniteElement/Operators/Crtp/UnknownAndNumberingSubsetList.hpp
View file @
33952769
...
...
@@ -58,24 +58,20 @@ namespace HappyHeart
///@}
//! Return the list of Unkowns and their associated numbering subset.
const
UnknownAndNumberingSubset
::
vector_const_shared_ptr
&
GetUnknownAndNumberingSubsetList
()
const
;
protected:
/*!
* \brief Access to one of the unknowns.
*
* It is highly recommanded to define an enum class in each instantiation to determine which is called,
* for instance:
* \code
* enum class UnknownIndex
* {
* scalar = 0,
* vectorial = 1
* };
* \attention This method is protected as it should be used with great care: index is the position in
* the local vector, NOT the unique id related to the unknown.
*
* This accessor should probably be dropped at some point; in current state of the code it is still useful.
*/
const
Unknown
&
GetUnknown
(
std
::
size_t
index
=
0
)
const
;
// \todo #531 Remove this accessor I dislike as it could be improperly used very easily
//! Return the list of Unkowns and their associated numbering subset.
const
UnknownAndNumberingSubset
::
vector_const_shared_ptr
&
GetUnknownAndNumberingSubsetList
()
const
;
const
Unknown
&
GetUnknown
(
std
::
size_t
index
=
0
)
const
;
private:
...
...
Sources/FiniteElement/Operators/GlobalVariationalOperator/GlobalVariationalOperator.hpp
View file @
33952769
...
...
@@ -168,81 +168,49 @@ namespace HappyHeart
protected:
/// \name Assemble methods.
///@{
/*!
* \brief
Assemble a global vector
.
* \brief
This method is in charge of computing the elementary linear algebra and assembling it
.
*
*
\internal
This method uses the new C++ 11 feature of variadic template; so that these methods can
* This method uses the new C++ 11 feature of variadic template; so that these methods can
* handle generically all the operators, whatever argument they might require. The drawback is that
* it isn't clear which arguments are expected for a specific global operator; that's the reason the
* following function are NOT called Assemble() and are protected rather than public. When a developer
* introduces a new operator, he must therefore define a public \a Assemble() with the right prototype
* which will call directly one of the AssembleWithVariadicArguments() below (this method should be
* inlined).
* it isn't clear which arguments are expected for a specific global operator; that's the reason the
* following method is NOT called Assemble() and is protected rather than public. When a developer
* introduces a new operator, he must therefore define a public \a Assemble() that calls the present one.
*
*
\param[in] coefficient Coefficient applied during the assembling. For instance if the
*
same a * F + b * G is assembled inside a same GlobalVector, Assemble will be called twice:
*
For instance for TransientSource operator, which requires an additional \a time argument:
*
* \code
* F(a, my_vector, domain);
* G.Assemble(b, my_vector, domain);
* template<class LinearAlgebraTupleT>
* inline void TransientSource::Assemble(LinearAlgebraTupleT&& global_vector_with_coeff_tuple,
* double time,
* const Domain& domain) const
* {
* return Parent::AssembleImpl(std::move(global_vector_with_coeff_tuple),
* domain,
* time); // notice the inversion: time must come last.
* }
* \endcode
* \param[in,out] global_vector GlobalVector into which the assembling is done.
* \param[in] domain Geometric domain onto which the integration is performed.
* \param[in,out] args Potential additional arguments required by a GlobalVariationalOperator. If for instance
* values from another GlobalVector are required, this GlobalVector can be added here. These additional
* arguments are propagated to the PerformElementaryCalculation() method as a tuple; if there are some
* a method named SupplArgumentsComputeEltArray() must be defined in DerivedT class.
*
// */
// template<typename... Args>
// void AssembleWithVariadicArguments(double coefficient, GlobalVector& global_vector, const Domain& domain,
// Args&&... args) const;
/*!
* \brief Assemble a global matrix.
* \tparam LinearAlgebraTupleT A tuple that may include either \a GlobalMatrixAndCoefficient (for bilinear
* operators) or \a GlobalVectorAndCoefficient (for linear operators) objects. Some non linear operators
* may include both types of objects; the ordering doesn't matter.
*
* \param[in] coefficient Coefficient applied during the assembling. For instance if the
* same a * F + b * G is assembled inside a same GlobalMatrix, Assemble will be called twice:
* \code
* F(a, my_vector, domain);
* G.Assemble(b, my_vector, domain);
* \endcode
* \param[in,out] global_matrix Global matrix into which the assembling is done.
* \param[in] domain Geometric domain onto which the integration is performed.
* \param[in,out] args Potential additional arguments required by a GlobalVariationalOperator (See
* overload for vectors for more details).
*/
// template<typename... Args>
// void AssembleWithVariadicArguments(double coefficient, GlobalMatrix& global_matrix, const Domain& domain,
// Args&&... args) const;
/*!
* \brief Assemble a global matrix and a global vector in the same time.
* \param[in] linear_algebra_tuple List of global matrices and/or vectors into which the operator is
* assembled.
* \param[in] domain Domain upon which the assembling takes place. Beware: if this domain is not a subset
* of the finite element space, assembling can only occur in a subset of the domain defined in the finite
* element space; if current \a domain is not a subset of finite element space one, assembling will occur
* upon the intersection of both.
* \param[in] args Variadic template arguments, specific to the operator being implemented. These arguments
* might be global: they are to be given to DerivedT::SupplArgumentsComputeEltArray() which will produce
* the local ones.
*
* \param[in] matrix_coefficient Coefficient applied during the assembling of the matrix.
* \param[in] vector_coefficient Coefficient applied during the assembling of the vector.
* \param[out] global_matrix Global matrix into which the assembling is done.
* \param[out] global_vector Global vector into which the assembling is done.
* \param[in] domain Geometric domain onto which the integration is performed.
* \param[in,out] args Potential additional arguments required by a GlobalVariationalOperator. (See
* overload for vectors for more details).
*/
// template<typename... Args>
// void AssembleWithVariadicArguments(double matrix_coefficient, GlobalMatrix& global_matrix,
// double vector_coefficient, GlobalVector& global_vector,
// const Domain& domain, Args&&... args) const;
template
<
class
LinearAlgebraTupleT
,
typename
...
Args
>
void
AssembleImpl
(
LinearAlgebraTupleT
&&
linear_algebra_tuple
,
const
Domain
&
domain
,
Args
&&
...
args
)
const
;
///@}
protected:
...
...
@@ -274,77 +242,39 @@ namespace HappyHeart
private:
/*!
* \brief Helper method that does the actual assembling work.
*
* This method is called by the \a Assemble() methods that are intended to be used publicly
* (most of the machinery does not have to be exposed).
*
* \tparam LinearAlgebraNatureT Whether assembling occurs in matrix, vector or both.
* \tparam Args Type(s) of the variadic template arguments.
*
* \param[in] global_linear_algebra Global matrix and/or vector (as decided by \a LinearAlgebraNatureT) into
* which assemblong occurs.
* \param[in] domain Domain upon which the assembling takes place. Beware: if this domain is not a subset
* of the finite element space, assembling can only occur in a subset of the domain defined in the finite
* element space; if current \a domain is not a subset of finite element space one, assembling will occur
* upon the intersection of both.
* \param[in] args Variadic template arguments, specific to the operator being implemented. These arguments
* might be global: they are to be given to DerivedT::SupplArgumentsComputeEltArray() which will produce
* the local ones.
*
* \internal This method is templated to that it is possible to call assemble only for the matrix in
* the case of a matrix/vector operator. If I deduced it from the class template parameter, I would
* have been forced to assemble both of them everytime.
*/
// template<MatrixVectorNature LinearAlgebraNatureT, typename... Args>
// void AssembleImpl(Private::GlobalLinearAlgebraHelper<LinearAlgebraNatureT>& global_linear_algebra,
// const Domain& domain,
// std::tuple<Args...>&& args) const;
/*!
* \brief Perform the elementary calculation (more exactly handle the call to the LocalVariationalOperator...)
*
* \internal This method is called in AssembleImpl() and has no business being called elsewhere.
*
* \tparam LinearAlgebraNatureT Whether assembling occurs in matrix, vector or both.
*
* \param[in] local_felt_space Local finite element space considered.
* \param[in,out] local_operator Local operator in charge of the elementary computation.
* \param[in] global_linear_algebra Structure which holds the global matrix and/or vector into which assembling
* is to be done. This is used here solely to recover the coefficients to apply.
*/
void
PerformElementaryCalculation
(
const
LocalFEltSpace
&
local_felt_space
,
LocalVariationalOperatorT
&
local_operator
,
std
::
tuple
<>&&
)
const
;
/*!
* \brief Overload when there variadic arguments to handle.
* \brief Overload when there
are
variadic arguments to handle.
*
* \internal This method is called in AssembleImpl() and has no business being called elsewhere.
*
* \tparam LinearAlgebraNatureT Whether assembling occurs in matrix, vector or both.
* \internal This method is called in AssembleImpl() and has no business being called elsewhere.\
*
* \param[in] local_felt_space Local finite element space considered.
* \param[in,out] local_operator Local operator in charge of the elementary computation.
* \param[in] global_linear_algebra Structure which holds the global matrix and/or vector into which assembling
* is to be done. This is used here solely to recover the coefficients to apply.
* \param[in] args Variadic template arguments, specific to the operator being implemented. These arguments
* might be global: they are to be given to DerivedT::SupplArgumentsComputeEltArray() which will produce
* the local ones.
*
*/
template
<
typename
...
Args
>
void
PerformElementaryCalculation
(
const
LocalFEltSpace
&
local_felt_space
,
LocalVariationalOperatorT
&
local_operator
,
std
::
tuple
<
Args
...
>&&
args
)
const
;
void
PerformElementaryCalculation
(
const
LocalFEltSpace
&
local_felt_space
,
LocalVariationalOperatorT
&
local_operator
,
std
::
tuple
<>&&
)
const
;
/*!
* \brief Fetch the local operator associated to the finite element type.
*
...
...
Sources/FiniteElement/Operators/LocalVariationalOperatorInstances/LinearForm/TransientSource.hpp
View file @
33952769
...
...
@@ -100,8 +100,8 @@ namespace HappyHeart
*
* For current operator, only vector makes sense; so only this specialization is actually defined.
*
* \param[in] coefficient Coefficient applied to the computed vector.
* \param[in] time Current time in seconds.
*
* \internal This parameter is computed by
* GlobalVariationalOperatorNS::TransientSource::SupplArgumentsComputeEltArray() method.
*
...
...
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