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

CRTP base class for a partitioned matrix. More...

#include <GooseFEM/Matrix.h>

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

Public Types

using derived_type = D
 Underlying type.
 
- Public Types inherited from GooseFEM::MatrixBase< D >
using derived_type = D
 Underlying type.
 

Public Member Functions

size_t nnu () const
 Number of unknown DOFs.
 
size_t nnp () const
 Number of prescribed DOFs.
 
const array_type::tensor< size_t, 1 > & iiu () const
 Unknown DOFs.
 
const array_type::tensor< size_t, 1 > & iip () const
 Prescribed DOFs.
 
array_type::tensor< double, 2 > Reaction (const array_type::tensor< double, 2 > &x, const array_type::tensor< double, 2 > &b) const
 Right-hand-size for corresponding to the prescribed DOFs:
 
array_type::tensor< double, 1 > Reaction (const array_type::tensor< double, 1 > &x, const array_type::tensor< double, 1 > &b) const
 Same as Reaction(const array_type::tensor<double, 2>&, const array_type::tensor<double, 2>&), but of "dofval" input and output.
 
void reaction (const array_type::tensor< double, 2 > &x, array_type::tensor< double, 2 > &b) const
 Same as Reaction(const array_type::tensor<double, 2>&, const array_type::tensor<double, 2>&), but inserting in-place.
 
void reaction (const array_type::tensor< double, 1 > &x, array_type::tensor< double, 1 > &b) const
 Same as Reaction(const array_type::tensor<double, 1>&, const array_type::tensor<double, 1>&), but inserting in-place.
 
array_type::tensor< double, 1 > Reaction_p (const array_type::tensor< double, 1 > &x_u, const array_type::tensor< double, 1 > &x_p) const
 Same as Reaction(const array_type::tensor<double, 1>&, const array_type::tensor<double, 1>&), but with partitioned input and output.
 
void reaction_p (const array_type::tensor< double, 1 > &x_u, const array_type::tensor< double, 1 > &x_p, array_type::tensor< double, 1 > &b_p) const
 Same as Reaction_p(const array_type::tensor<double, 1>&, const array_type::tensor<double, 1>&), but writing to preallocated output.
 
- Public Member Functions inherited from GooseFEM::MatrixBase< D >
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, 1 > m_iiu
 See iiu()
 
array_type::tensor< size_t, 1 > m_iip
 See iip()
 
size_t m_nnu
 See nnu.
 
size_t m_nnp
 See nnp.
 
- Protected Attributes inherited from GooseFEM::MatrixBase< D >
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::MatrixPartitionedBase< D >

CRTP base class for a partitioned matrix.

Definition at line 416 of file Matrix.h.

Member Typedef Documentation

◆ derived_type

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

Underlying type.

Definition at line 428 of file Matrix.h.

Member Function Documentation

◆ iip()

template<class D >
const array_type::tensor< size_t, 1 > & GooseFEM::MatrixPartitionedBase< D >::iip ( ) const
inline

Prescribed DOFs.

Returns
[nnp].

Definition at line 473 of file Matrix.h.

◆ iiu()

template<class D >
const array_type::tensor< size_t, 1 > & GooseFEM::MatrixPartitionedBase< D >::iiu ( ) const
inline

Unknown DOFs.

Returns
[nnu].

Definition at line 464 of file Matrix.h.

◆ nnp()

template<class D >
size_t GooseFEM::MatrixPartitionedBase< D >::nnp ( ) const
inline

Number of prescribed DOFs.

Returns
Unsigned integer.

Definition at line 455 of file Matrix.h.

◆ nnu()

template<class D >
size_t GooseFEM::MatrixPartitionedBase< D >::nnu ( ) const
inline

Number of unknown DOFs.

Returns
Unsigned integer.

Definition at line 446 of file Matrix.h.

◆ reaction() [1/2]

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

Same as Reaction(const array_type::tensor<double, 1>&, const array_type::tensor<double, 1>&), but inserting in-place.

Parameters
x"dofval" [ndof].
b"dofval" [ndof], \( b_p \) overwritten.

Definition at line 538 of file Matrix.h.

◆ Reaction() [1/2]

template<class D >
array_type::tensor< double, 1 > GooseFEM::MatrixPartitionedBase< D >::Reaction ( const array_type::tensor< double, 1 > & x,
const array_type::tensor< double, 1 > & b ) const
inline

Same as Reaction(const array_type::tensor<double, 2>&, const array_type::tensor<double, 2>&), but of "dofval" input and output.

Parameters
x"dofval" [ndof].
b"dofval" [ndof].
Returns
Copy of b with \( b_p \) overwritten.

Definition at line 508 of file Matrix.h.

◆ reaction() [2/2]

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

Same as Reaction(const array_type::tensor<double, 2>&, const array_type::tensor<double, 2>&), but inserting in-place.

Parameters
x"nodevec" [nnode, ndim].
b"nodevec" [nnode, ndim], \( b_p \) overwritten.

Definition at line 524 of file Matrix.h.

◆ Reaction() [2/2]

template<class D >
array_type::tensor< double, 2 > GooseFEM::MatrixPartitionedBase< D >::Reaction ( const array_type::tensor< double, 2 > & x,
const array_type::tensor< double, 2 > & b ) const
inline

Right-hand-size for corresponding to the prescribed DOFs:

\( b_p = A_{pu} * x_u + A_{pp} * x_p \)

and assemble them to the appropriate places in "nodevec".

Parameters
x"nodevec" [nnode, ndim].
b"nodevec" [nnode, ndim].
Returns
Copy of b with \( b_p \) overwritten.

Definition at line 490 of file Matrix.h.

◆ Reaction_p()

template<class D >
array_type::tensor< double, 1 > GooseFEM::MatrixPartitionedBase< D >::Reaction_p ( const array_type::tensor< double, 1 > & x_u,
const array_type::tensor< double, 1 > & x_p ) const
inline

Same as Reaction(const array_type::tensor<double, 1>&, const array_type::tensor<double, 1>&), but with partitioned input and output.

Parameters
x_uunknown "dofval" [nnu].
x_pprescribed "dofval" [nnp].
Returns
b_p prescribed "dofval" [nnp].

Definition at line 553 of file Matrix.h.

◆ reaction_p()

template<class D >
void GooseFEM::MatrixPartitionedBase< D >::reaction_p ( const array_type::tensor< double, 1 > & x_u,
const array_type::tensor< double, 1 > & x_p,
array_type::tensor< double, 1 > & b_p ) const
inline

Same as Reaction_p(const array_type::tensor<double, 1>&, const array_type::tensor<double, 1>&), but writing to preallocated output.

Parameters
x_uunknown "dofval" [nnu].
x_pprescribed "dofval" [nnp].
b_p(overwritten) prescribed "dofval" [nnp].

Definition at line 571 of file Matrix.h.

Member Data Documentation

◆ m_iip

template<class D >
array_type::tensor<size_t, 1> GooseFEM::MatrixPartitionedBase< D >::m_iip
protected

See iip()

Definition at line 419 of file Matrix.h.

◆ m_iiu

template<class D >
array_type::tensor<size_t, 1> GooseFEM::MatrixPartitionedBase< D >::m_iiu
protected

See iiu()

Definition at line 418 of file Matrix.h.

◆ m_nnp

template<class D >
size_t GooseFEM::MatrixPartitionedBase< D >::m_nnp
protected

See nnp.

Definition at line 422 of file Matrix.h.

◆ m_nnu

template<class D >
size_t GooseFEM::MatrixPartitionedBase< D >::m_nnu
protected

See nnu.

Definition at line 421 of file Matrix.h.


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