Class GooseFEM::MatrixPartitionedBase#

template<class D>
class MatrixPartitionedBase : public GooseFEM::MatrixBase<D>#

CRTP base class for a partitioned matrix.

Subclassed by GooseFEM::MatrixPartitionedTyingsBase< MatrixPartitionedTyings >, GooseFEM::MatrixPartitionedTyingsBase< D >

Public Types

using derived_type = D#

Underlying type.

Public Functions

inline size_t nnu() const#

Number of unknown DOFs.

Returns

Unsigned integer.

inline size_t nnp() const#

Number of prescribed DOFs.

Returns

Unsigned integer.

inline const array_type::tensor<size_t, 1> &iiu() const#

Unknown DOFs.

Returns

[nnu].

inline const array_type::tensor<size_t, 1> &iip() const#

Prescribed DOFs.

Returns

[nnp].

inline 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:

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

and assemble them to the appropriate places in “nodevec”.

Parameters
Returns

Copy of b with \( b_p \) overwritten.

inline 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.

Parameters
  • x – “dofval” [ndof].

  • b – “dofval” [ndof].

Returns

Copy of b with \( b_p \) overwritten.

inline 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.

Parameters
  • x – “nodevec” [nnode, ndim].

  • b – “nodevec” [nnode, ndim], \( b_p \) overwritten.

inline 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.

Parameters
  • x – “dofval” [ndof].

  • b – “dofval” [ndof], \( b_p \) overwritten.

inline 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.

Parameters
  • x_u – unknown “dofval” [nnu].

  • x_p – prescribed “dofval” [nnp].

Returns

b_p prescribed “dofval” [nnp].

inline 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.

Parameters
  • x_u – unknown “dofval” [nnu].

  • x_p – prescribed “dofval” [nnp].

  • b_p – (overwritten) prescribed “dofval” [nnp].