Class GooseFEM::VectorPartitionedTyings#

class VectorPartitionedTyings : public GooseFEM::Vector#

Class to switch between storage types.

In particular:

  • “nodevec”: nodal vectors [nnode, ndim].

  • ”elemvec”: nodal vectors stored per element [nelem, nne, ndim].

  • ”dofval”: DOF values [ndof].

  • ”dofval_u”: DOF values (Unknown), == dofval[iiu], [nnu].

  • ”dofval_p”: DOF values (Prescribed), == dofval[iiu], [nnp].

Public Functions

template<class E, class M>
inline VectorPartitionedTyings(const E &conn, const E &dofs, const M &Cdu, const M &Cdp, const M &Cdi)#

Constructor.

Template Parameters
Parameters
inline size_t nnd() const#
Returns

Number of dependent DOFs.

inline size_t nni() const#
Returns

Number of independent DOFs.

inline size_t nnu() const#
Returns

Number of independent unknown DOFs.

inline size_t nnp() const#
Returns

Number of independent prescribed DOFs.

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

Dependent DOFs (list of DOF numbers).

Returns

Pointer.

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

Independent DOFs (list of DOF numbers).

Returns

Copy.

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

Independent unknown DOFs (list of DOF numbers).

Returns

Pointer.

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

Independent prescribed DOFs (list of DOF numbers).

Returns

Pointer.

template<class T>
inline void copy_p(const T &dofval_src, T &dofval_dest) const#

Copy (part of) “dofval” to another “dofval”: dofval_dest[iip()] = dofval_src[iip()].

Parameters
  • dofval_src – DOF values, iip() updated, [ndof].

  • dofval_dest – DOF values, iip() updated, [ndof].

template<class T>
inline array_type::tensor<double, 1> AsDofs_i(const T &nodevec) const#

Convert to “dofval” (overwrite entries that occur more than once).

Only the independent DOFs are retained.

Parameters

nodevec – nodal vectors [nnode, ndim].

Returns

dofval[iii()] [nni].

template<class T, class R>
inline void asDofs_i(const T &nodevec, R &dofval_i, bool apply_tyings = true) const#

Same as InterpQuad_vector(), but writing to preallocated return.

Parameters
  • nodevec – [nnode, ndim].

  • dofval_i – [nni].

  • apply_tyings – If true the dependent DOFs are eliminated.