This class is responsible for the mapping of hypernodes to global degrees of freedom.
More...
|
| HyperNodeFactory (const hyNode_index_t n_hyNodes) |
| Construct HyperNodeFactory from total number of hypernodes. More...
|
|
| HyperNodeFactory (const HyperNodeFactory< n_dofs_per_nodeT > &hnf) |
| Copy constructot for HypernodeFactory. More...
|
|
HyperNodeFactory< n_dofs_per_nodeT > & | operator= (const HyperNodeFactory< n_dofs_per_nodeT > &other) |
| Copy assignment. More...
|
|
HyperNodeFactory< n_dofs_per_nodeT > & | operator= (HyperNodeFactory< n_dofs_per_nodeT > &&other) noexcept |
| Move assignment. More...
|
|
hyNode_index_t | n_hyNodes () const |
| Returns the total amount of hypernodes in the considered hypergraph. More...
|
|
template<typename dof_index_t = hyNode_index_t> |
dof_index_t | n_global_dofs () const |
| Returns the total amount of degrees of freedom in the considered hypergraph. More...
|
|
template<typename SmallVecT > |
SmallVecT & | get_dof_indices (const hyNode_index_t hyNode_index, SmallVecT &dof_indices) const |
| Calculate global indices of degrees of freedom related to a hypernode. More...
|
|
template<typename dof_index_t > |
hyNode_index_t | get_hyNode_from_dof_index (const dof_index_t dof_index) const |
| Calculate index of hypernode holding a special degree of freedom. More...
|
|
template<typename dof_index_t = hyNode_index_t, typename SmallVecT , typename LargeVecT > |
SmallVecT & | get_dof_values (const hyNode_index_t hyNode_index, const LargeVecT &global_dof_vector, SmallVecT &local_dof_values) const |
| Evaluate values of degrees of freedom related to a hypernode. More...
|
|
template<typename dof_index_t = hyNode_index_t, typename SmallVecT , typename LargeVecT > |
LargeVecT & | add_to_dof_values (const hyNode_index_t hyNode_index, LargeVecT &global_dof_vector, const SmallVecT &local_dof_vector) const |
| Add different values to values of degrees of freedom related to a hypernode. More...
|
|
template<typename dof_index_t = hyNode_index_t, typename SmallVecT , typename LargeVecT > |
LargeVecT & | set_dof_values (const hyNode_index_t hyNode_index, LargeVecT &global_dof_vector, const SmallVecT &local_dof_vector) const |
| Set different values of degrees of freedom related to a hypernode. More...
|
|
template<typename dof_index_t = hyNode_index_t, typename LargeVecT > |
LargeVecT & | set_dof_values (const hyNode_index_t hyNode_index, LargeVecT &global_dof_vector, const typename LargeVecT::value_type value) const |
| Set all values of degrees of freedom of a hypernode to a predefined value. More...
|
|
template<unsigned int n_dofs_per_nodeT, typename hyNode_index_t = unsigned int>
class HyperNodeFactory< n_dofs_per_nodeT, hyNode_index_t >
This class is responsible for the mapping of hypernodes to global degrees of freedom.
This class administrates the mapping of topological information (i.e. a hypernode) to information related to the approximation of solutions to PDEs. Thus, it is capable of mapping an hypernode index to the indices and values of degrees of freedom. It is the only class to manage the access to the global vectors comprising degrees of freedom and is universal to (almost) all kinds of possible equations.
- Template Parameters
-
n_dofs_per_nodeT | Amount of degrees of freedom associated to an hypernode. This is the number of local trial functions for the skeletal variable. |
hyNode_index_t | Unsigned integer type specification. Default is unsigned int. |
- Authors
- Andreas Rupp, Heidelberg University, 2019–2020.
template<unsigned int n_dofs_per_nodeT, typename hyNode_index_t = unsigned int>
Copy constructot for HypernodeFactory.
Function that evaluates the condensed, matrix-free version of the matrix-vector product \(A x = y\), where \(A\) is the condensed matrix of the LDG-H method, \(x\) is the vector of parameters to define the skeletal variable \(\lambda\), and \(y\) is the resulting vector, which has the same size as the input vector \(x\).
- Parameters
-
template<unsigned int n_dofs_per_nodeT, typename hyNode_index_t = unsigned int>
template<typename dof_index_t = hyNode_index_t, typename SmallVecT , typename LargeVecT >
LargeVecT& HyperNodeFactory< n_dofs_per_nodeT, hyNode_index_t >::add_to_dof_values |
( |
const hyNode_index_t |
hyNode_index, |
|
|
LargeVecT & |
global_dof_vector, |
|
|
const SmallVecT & |
local_dof_vector |
|
) |
| const |
|
inline |
Add different values to values of degrees of freedom related to a hypernode.
Add local values of the small vector local_dof_vector
to the respective values of the large vector global_dof_vector
comprising all degrees of freedom.
- Template Parameters
-
dof_index_t | Unsigned integer type specification. Default is hyNode_index_t. |
SmallVecT | The typename of a small vector to be filled. Needs to provide the operator [] for random access and size(). |
LargeVecT | The typename of a large vector to be filled. Needs to provide the operator [] for random access and size(). |
- Parameters
-
hyNode_index | Index of the considered hypernode. |
global_dof_vector | Large vector containing the values of all degrees of freedom. |
local_dof_vector | Small vector containing the local values to be added to the global ones. |
- Return values
-
global_dof_vector | Large vector containing the values of all degrees of freedom. |
template<unsigned int n_dofs_per_nodeT, typename hyNode_index_t = unsigned int>
template<typename dof_index_t = hyNode_index_t, typename SmallVecT , typename LargeVecT >
SmallVecT& HyperNodeFactory< n_dofs_per_nodeT, hyNode_index_t >::get_dof_values |
( |
const hyNode_index_t |
hyNode_index, |
|
|
const LargeVecT & |
global_dof_vector, |
|
|
SmallVecT & |
local_dof_values |
|
) |
| const |
|
inline |
Evaluate values of degrees of freedom related to a hypernode.
- Template Parameters
-
dof_index_t | Unsigned integer type specification. Default is hyNode_index_t. |
SmallVecT | The typename of a small vector to be filled. Needs to provide the operator [] for random access and size(). |
LargeVecT | The typename of a large vector to be filled. Needs to provide the operator [] for random access and size(). |
- Parameters
-
hyNode_index | Index of the considered hypernode. |
global_dof_vector | Global vector of degrees of freedom. |
local_dof_values | Reference to small vector to be filled. |
- Return values
-
local_dof_values | Reference to small vector containing the values of related degrees of freedom. |
template<unsigned int n_dofs_per_nodeT, typename hyNode_index_t = unsigned int>
template<typename dof_index_t = hyNode_index_t, typename SmallVecT , typename LargeVecT >
LargeVecT& HyperNodeFactory< n_dofs_per_nodeT, hyNode_index_t >::set_dof_values |
( |
const hyNode_index_t |
hyNode_index, |
|
|
LargeVecT & |
global_dof_vector, |
|
|
const SmallVecT & |
local_dof_vector |
|
) |
| const |
|
inline |
Set different values of degrees of freedom related to a hypernode.
Set local values of the std::array
local_dof_vector
as the respective values of the std::vector
global_dof_vector
comprising all degrees of freedom.
- Template Parameters
-
dof_index_t | Unsigned integer type specification. Default is hyNode_index_t. |
SmallVecT | The typename of a small vector to be filled. Needs to provide the operator [] for random access and size(). |
LargeVecT | The typename of a large vector to be filled. Needs to provide the operator [] for random access and size(). |
- Parameters
-
hyNode_index | Index of the considered hypernode. |
global_dof_vector | Large vector containing the values of all degrees of freedom. |
local_dof_vector | Small vector containing the local values to be set at the global ones. |
- Return values
-
global_dof_vector | Large vector containing the values of all degrees of freedom. |
template<unsigned int n_dofs_per_nodeT, typename hyNode_index_t = unsigned int>
Amount of hypernodes within hypergraph.
The number of hypernodes within the considered hypergraph is needed to construct vectors of the correct size, to check whether a vector has the appropriate size, and to check whether a degree of freedom has a valid index.