Class GooseFEM::MatrixDiagonalPartitioned#

class MatrixDiagonalPartitioned : public GooseFEM::MatrixPartitionedBase<MatrixDiagonalPartitioned>, public GooseFEM::MatrixDiagonalBase<MatrixDiagonalPartitioned>#

Diagonal and partitioned matrix.

See Vector() for bookkeeping definitions.

Public Functions

inline MatrixDiagonalPartitioned(const array_type::tensor<size_t, 2> &conn, const array_type::tensor<size_t, 2> &dofs, const array_type::tensor<size_t, 1> &iip)#

Constructor.

Parameters
  • conn – connectivity [nelem, nne].

  • dofs – DOFs per node [nnode, ndim].

  • iip – prescribed DOFs [nnp].

inline void set(const array_type::tensor<double, 1> &A)#

Set all (diagonal) matrix components.

Parameters

A – The matrix [ndof].

inline array_type::tensor<double, 1> data() const#

Assemble to diagonal matrix (involves copies).

Returns

[ndof].

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

Pointer to data.

Returns

[nnu].

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

Pointer to data.

Returns

[nnu].

inline array_type::tensor<double, 1> Todiagonal() const#

Pointer to data.

Returns

[nnu].

inline array_type::tensor<double, 1> Dot_u(const array_type::tensor<double, 1> &x_u, const array_type::tensor<double, 1> &x_p) const#

Todo:

Decide if this function should be kept.

Parameters
  • x_u – dofval [nnu].

  • x_p – dofval [nnp].

Returns

b_u dofval [nnu].

inline void dot_u(const array_type::tensor<double, 1> &x_u, const array_type::tensor<double, 1> &x_p, array_type::tensor<double, 1> &b_u) const#

Todo:

Decide if this function should be kept.

Parameters
  • x_u – dofval [nnu].

  • x_p – dofval [nnp].

  • b_u – (overwritten) dofval [nnu].

inline array_type::tensor<double, 1> Dot_p(const array_type::tensor<double, 1> &x_u, const array_type::tensor<double, 1> &x_p) const#

Todo:

Decide if this function should be kept.

Parameters
  • x_u – dofval [nnu].

  • x_p – dofval [nnp].

Returns

b_p dofval [nnp].

inline void dot_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#

Todo:

Decide if this function should be kept.

Parameters
  • x_u – dofval [nnu].

  • x_p – dofval [nnp].

  • b_p – (overwritten) dofval [nnp].

inline array_type::tensor<double, 1> Solve_u(const array_type::tensor<double, 1> &b_u, const array_type::tensor<double, 1> &x_p)#
Parameters
  • b_u – dofval [nnu].

  • x_p – dofval [nnp].

Returns

x_u dofval [nnu].

inline void solve_u(const array_type::tensor<double, 1> &b_u, const array_type::tensor<double, 1> &x_p, array_type::tensor<double, 1> &x_u)#
Parameters
  • b_u – dofval [nnu].

  • x_p – dofval [nnp].

  • x_u – (overwritten) dofval [nnu].