Class GooseFEM::MatrixDiagonalBase#

template<class D>
class MatrixDiagonalBase#

CRTP base class for a partitioned matrix with tying.

Public Types

using derived_type = D#

Underlying type.

Public Functions

inline array_type::tensor<double, 2> Solve(const array_type::tensor<double, 2> &b)#

Solve \( x = A^{-1} b \).

Note that this does not involve a conversion to DOFs.

In case of GooseFEM::MatrixDiagonalPartitioned under the hood, schematically: \( x_u = A_{uu}^{-1} (b_u - A_{up} * x_p) \equiv A_{uu}^{-1} b_u \) (again, no conversion to DOFs is needed). Use GooseFEM::MatrixDiagonalPartitioned::Reaction() to get reaction forces.

Parameters

b – nodevec [nelem, ndim].

Returns

x nodevec [nelem, ndim].

inline array_type::tensor<double, 1> Solve(const array_type::tensor<double, 1> &b)#

Solve \( x = A^{-1} b \).

For GooseFEM::MatrixDiagonalPartitioned under the hood solved \( x_u = A_{uu}^{-1} (b_u - A_{up} * x_p) \equiv A_{uu}^{-1} b_u \). Use GooseFEM::MatrixDiagonalPartitioned::Reaction() to get reaction forces.

Parameters

b – dofval [ndof].

Returns

x dofval [ndof].

inline void solve(const array_type::tensor<double, 2> &b, array_type::tensor<double, 2> &x)#

Solve \( x = A^{-1} b \).

For GooseFEM::MatrixDiagonalPartitioned under the hood solved \( x_u = A_{uu}^{-1} (b_u - A_{up} * x_p) \equiv A_{uu}^{-1} b_u \). Use GooseFEM::MatrixDiagonalPartitioned::Reaction() to get reaction forces.

Parameters
  • b – nodevec [nelem, ndim].

  • x – (overwritten) nodevec [nelem, ndim].

inline void solve(const array_type::tensor<double, 1> &b, array_type::tensor<double, 1> &x)#

Solve \( x = A^{-1} b \).

For GooseFEM::MatrixDiagonalPartitioned under the hood solved \( x_u = A_{uu}^{-1} (b_u - A_{up} * x_p) \equiv A_{uu}^{-1} b_u \). Use GooseFEM::MatrixDiagonalPartitioned::Reaction() to get reaction forces.

Parameters
  • b – nodevec [nelem, ndim].

  • x – (overwritten) nodevec [nelem, ndim].