GooseFEM 1.4.1.dev2+g78f16df
Loading...
Searching...
No Matches
GooseFEM::MatrixBase< D > Class Template Reference

CRTP base class for a matrix. More...

#include <GooseFEM/Matrix.h>

Inheritance diagram for GooseFEM::MatrixBase< D >:
GooseFEM::MatrixPartitionedBase< MatrixDiagonalPartitioned > GooseFEM::MatrixPartitionedBase< MatrixPartitioned > GooseFEM::MatrixPartitionedBase< MatrixPartitionedTyings > GooseFEM::MatrixPartitionedBase< D > GooseFEM::MatrixDiagonalPartitioned GooseFEM::MatrixPartitioned GooseFEM::MatrixPartitionedTyingsBase< MatrixPartitionedTyings > GooseFEM::MatrixPartitionedTyingsBase< D > GooseFEM::MatrixPartitionedTyings

Public Types

using derived_type = D
 Underlying type.
 

Public Member Functions

size_t nelem () const
 Number of elements.
 
size_t nne () const
 Number of nodes per element.
 
size_t nnode () const
 Number of nodes.
 
size_t ndim () const
 Number of dimensions.
 
size_t ndof () const
 Number of DOFs.
 
const array_type::tensor< size_t, 2 > & dofs () const
 DOFs per node.
 
const array_type::tensor< size_t, 2 > & conn () const
 Connectivity.
 
std::array< size_t, 1 > shape_dofval () const
 Shape of "dofval".
 
std::array< size_t, 2 > shape_nodevec () const
 Shape of "nodevec".
 
std::array< size_t, 3 > shape_elemmat () const
 Shape of "elemmat".
 
template<class T >
void assemble (const T &elemmat)
 Assemble from "elemmat".
 
array_type::tensor< double, 2 > Todense () const
 Copy as dense matrix.
 
template<class T >
void todense (T &ret) const
 Copy to dense matrix.
 
array_type::tensor< double, 2 > Dot (const array_type::tensor< double, 2 > &x) const
 Dot-product \( b_i = A_{ij} x_j \).
 
array_type::tensor< double, 1 > Dot (const array_type::tensor< double, 1 > &x) const
 Dot-product \( b_i = A_{ij} x_j \).
 
void dot (const array_type::tensor< double, 2 > &x, array_type::tensor< double, 2 > &b) const
 Dot-product \( b_i = A_{ij} x_j \).
 
void dot (const array_type::tensor< double, 1 > &x, array_type::tensor< double, 1 > &b) const
 Dot-product \( b_i = A_{ij} x_j \).
 

Protected Attributes

array_type::tensor< size_t, 2 > m_conn
 Connectivity [nelem, nne].
 
array_type::tensor< size_t, 2 > m_dofs
 DOF-numbers per node [nnode, ndim].
 
size_t m_nelem
 See nelem().
 
size_t m_nne
 See nne().
 
size_t m_nnode
 See nnode().
 
size_t m_ndim
 See ndim().
 
size_t m_ndof
 See ndof().
 
bool m_changed = true
 Signal changes to data.
 

Detailed Description

template<class D>
class GooseFEM::MatrixBase< D >

CRTP base class for a matrix.

Definition at line 198 of file Matrix.h.

Member Typedef Documentation

◆ derived_type

template<class D >
using GooseFEM::MatrixBase< D >::derived_type = D

Underlying type.

Definition at line 215 of file Matrix.h.

Member Function Documentation

◆ assemble()

template<class D >
template<class T >
void GooseFEM::MatrixBase< D >::assemble ( const T & elemmat)
inline

Assemble from "elemmat".

Parameters
elemmat[nelem, nne * ndim, nne * ndim].

Definition at line 328 of file Matrix.h.

◆ conn()

template<class D >
const array_type::tensor< size_t, 2 > & GooseFEM::MatrixBase< D >::conn ( ) const
inline

Connectivity.

Returns
[nelem, nne].

Definition at line 287 of file Matrix.h.

◆ dofs()

template<class D >
const array_type::tensor< size_t, 2 > & GooseFEM::MatrixBase< D >::dofs ( ) const
inline

DOFs per node.

Returns
[nnode, ndim].

Definition at line 278 of file Matrix.h.

◆ Dot() [1/2]

template<class D >
array_type::tensor< double, 1 > GooseFEM::MatrixBase< D >::Dot ( const array_type::tensor< double, 1 > & x) const
inline

Dot-product \( b_i = A_{ij} x_j \).

Parameters
xdofval [ndof].
Returns
b dofval [ndof].

Definition at line 377 of file Matrix.h.

◆ dot() [1/2]

template<class D >
void GooseFEM::MatrixBase< D >::dot ( const array_type::tensor< double, 1 > & x,
array_type::tensor< double, 1 > & b ) const
inline

Dot-product \( b_i = A_{ij} x_j \).

Parameters
xdofval [ndof].
b(overwritten) dofval [ndof].

Definition at line 404 of file Matrix.h.

◆ Dot() [2/2]

template<class D >
array_type::tensor< double, 2 > GooseFEM::MatrixBase< D >::Dot ( const array_type::tensor< double, 2 > & x) const
inline

Dot-product \( b_i = A_{ij} x_j \).

Parameters
xnodevec [nelem, ndim].
Returns
b nodevec [nelem, ndim].

Definition at line 363 of file Matrix.h.

◆ dot() [2/2]

template<class D >
void GooseFEM::MatrixBase< D >::dot ( const array_type::tensor< double, 2 > & x,
array_type::tensor< double, 2 > & b ) const
inline

Dot-product \( b_i = A_{ij} x_j \).

Parameters
xnodevec [nelem, ndim].
b(overwritten) nodevec [nelem, ndim].

Definition at line 391 of file Matrix.h.

◆ ndim()

template<class D >
size_t GooseFEM::MatrixBase< D >::ndim ( ) const
inline

Number of dimensions.

Returns
Unsigned integer.

Definition at line 260 of file Matrix.h.

◆ ndof()

template<class D >
size_t GooseFEM::MatrixBase< D >::ndof ( ) const
inline

Number of DOFs.

Returns
Unsigned integer.

Definition at line 269 of file Matrix.h.

◆ nelem()

template<class D >
size_t GooseFEM::MatrixBase< D >::nelem ( ) const
inline

Number of elements.

Returns
Unsigned integer.

Definition at line 233 of file Matrix.h.

◆ nne()

template<class D >
size_t GooseFEM::MatrixBase< D >::nne ( ) const
inline

Number of nodes per element.

Returns
Unsigned integer.

Definition at line 242 of file Matrix.h.

◆ nnode()

template<class D >
size_t GooseFEM::MatrixBase< D >::nnode ( ) const
inline

Number of nodes.

Returns
Unsigned integer.

Definition at line 251 of file Matrix.h.

◆ shape_dofval()

template<class D >
std::array< size_t, 1 > GooseFEM::MatrixBase< D >::shape_dofval ( ) const
inline

Shape of "dofval".

Returns
[ndof].

Definition at line 296 of file Matrix.h.

◆ shape_elemmat()

template<class D >
std::array< size_t, 3 > GooseFEM::MatrixBase< D >::shape_elemmat ( ) const
inline

Shape of "elemmat".

Returns
[nelem, nne * ndim, nne * ndim].

Definition at line 314 of file Matrix.h.

◆ shape_nodevec()

template<class D >
std::array< size_t, 2 > GooseFEM::MatrixBase< D >::shape_nodevec ( ) const
inline

Shape of "nodevec".

Returns
[nnode, ndim].

Definition at line 305 of file Matrix.h.

◆ Todense()

template<class D >
array_type::tensor< double, 2 > GooseFEM::MatrixBase< D >::Todense ( ) const
inline

Copy as dense matrix.

Returns
[ndof, ndof].

Definition at line 338 of file Matrix.h.

◆ todense()

template<class D >
template<class T >
void GooseFEM::MatrixBase< D >::todense ( T & ret) const
inline

Copy to dense matrix.

Parameters
retoverwritten [ndof, ndof].

Definition at line 351 of file Matrix.h.

Member Data Documentation

◆ m_changed

template<class D >
bool GooseFEM::MatrixBase< D >::m_changed = true
protected

Signal changes to data.

Definition at line 209 of file Matrix.h.

◆ m_conn

template<class D >
array_type::tensor<size_t, 2> GooseFEM::MatrixBase< D >::m_conn
protected

Connectivity [nelem, nne].

Definition at line 200 of file Matrix.h.

◆ m_dofs

template<class D >
array_type::tensor<size_t, 2> GooseFEM::MatrixBase< D >::m_dofs
protected

DOF-numbers per node [nnode, ndim].

Definition at line 201 of file Matrix.h.

◆ m_ndim

template<class D >
size_t GooseFEM::MatrixBase< D >::m_ndim
protected

See ndim().

Definition at line 206 of file Matrix.h.

◆ m_ndof

template<class D >
size_t GooseFEM::MatrixBase< D >::m_ndof
protected

See ndof().

Definition at line 207 of file Matrix.h.

◆ m_nelem

template<class D >
size_t GooseFEM::MatrixBase< D >::m_nelem
protected

See nelem().

Definition at line 203 of file Matrix.h.

◆ m_nne

template<class D >
size_t GooseFEM::MatrixBase< D >::m_nne
protected

See nne().

Definition at line 204 of file Matrix.h.

◆ m_nnode

template<class D >
size_t GooseFEM::MatrixBase< D >::m_nnode
protected

See nnode().

Definition at line 205 of file Matrix.h.


The documentation for this class was generated from the following file: