GooseFEM 1.4.1.dev2+g78f16df
Loading...
Searching...
No Matches
GooseFEM::VectorPartitionedTyings Class Reference

Class to switch between storage types. More...

#include <GooseFEM/VectorPartitionedTyings.h>

Inheritance diagram for GooseFEM::VectorPartitionedTyings:
GooseFEM::Vector

Public Member Functions

template<class E , class M >
 VectorPartitionedTyings (const E &conn, const E &dofs, const M &Cdu, const M &Cdp, const M &Cdi)
 Constructor.
 
size_t nnd () const
 
size_t nni () const
 
size_t nnu () const
 
size_t nnp () const
 
const array_type::tensor< size_t, 1 > & iid () const
 Dependent DOFs (list of DOF numbers).
 
const array_type::tensor< size_t, 1 > & iii () const
 Independent DOFs (list of DOF numbers).
 
const array_type::tensor< size_t, 1 > & iiu () const
 Independent unknown DOFs (list of DOF numbers).
 
const array_type::tensor< size_t, 1 > & iip () const
 Independent prescribed DOFs (list of DOF numbers).
 
template<class T >
void copy_p (const T &dofval_src, T &dofval_dest) const
 Copy (part of) "dofval" to another "dofval": dofval_dest[iip()] = dofval_src[iip()].
 
template<class T >
array_type::tensor< double, 1 > AsDofs_i (const T &nodevec) const
 Convert to "dofval" (overwrite entries that occur more than once).
 
template<class T , class R >
void asDofs_i (const T &nodevec, R &dofval_i, bool apply_tyings=true) const
 Same as InterpQuad_vector(), but writing to preallocated return.
 
- Public Member Functions inherited from GooseFEM::Vector
template<class S , class T >
 Vector (const S &conn, const T &dofs)
 Constructor.
 
size_t nelem () const
 
size_t nne () const
 
size_t nnode () const
 
size_t ndim () const
 
size_t ndof () const
 
const array_type::tensor< size_t, 2 > & conn () const
 
const array_type::tensor< size_t, 2 > & dofs () const
 
template<class T >
T Copy (const T &nodevec_src, const T &nodevec_dest) const
 Copy "nodevec" to another "nodevec".
 
template<class T >
void copy (const T &nodevec_src, T &nodevec_dest) const
 Copy "nodevec" to another "nodevec".
 
template<class T >
array_type::tensor< double, 1 > AsDofs (const T &arg) const
 Convert "nodevec" or "elemvec" to "dofval" (overwrite entries that occur more than once).
 
template<class T , class R >
void asDofs (const T &arg, R &ret) const
 Convert "nodevec" or "elemvec" to "dofval" (overwrite entries that occur more than once).
 
template<class T >
array_type::tensor< double, 2 > AsNode (const T &arg) const
 Convert "dofval" or "elemvec" to "nodevec" (overwrite entries that occur more than once).
 
template<class T , class R >
void asNode (const T &arg, R &ret) const
 Convert "dofval" or "elemvec" to "nodevec" (overwrite entries that occur more than once).
 
template<class T >
array_type::tensor< double, 3 > AsElement (const T &arg) const
 Convert "dofval" or "nodevec" to "elemvec" (overwrite entries that occur more than once).
 
template<class T , class R >
void asElement (const T &arg, R &ret) const
 Convert "dofval" or "nodevec" to "elemvec" (overwrite entries that occur more than once).
 
template<class T >
array_type::tensor< double, 1 > AssembleDofs (const T &arg) const
 Assemble "nodevec" or "elemvec" to "dofval" (adds entries that occur more that once).
 
template<class T , class R >
void assembleDofs (const T &arg, R &ret) const
 Assemble "nodevec" or "elemvec" to "dofval" (adds entries that occur more that once).
 
template<class T >
array_type::tensor< double, 2 > AssembleNode (const T &arg) const
 Assemble "elemvec" to "nodevec" (adds entries that occur more that once.
 
template<class T , class R >
void assembleNode (const T &arg, R &ret) const
 Assemble "elemvec" to "nodevec" (adds entries that occur more that once.
 
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_elemvec () const
 Shape of "elemvec".
 
std::array< size_t, 3 > shape_elemmat () const
 Shape of "elemmat".
 
array_type::tensor< double, 1 > allocate_dofval () const
 Allocated "dofval".
 
array_type::tensor< double, 1 > allocate_dofval (double val) const
 Allocated and initialised "dofval".
 
array_type::tensor< double, 2 > allocate_nodevec () const
 Allocated "nodevec".
 
array_type::tensor< double, 2 > allocate_nodevec (double val) const
 Allocated and initialised "nodevec".
 
array_type::tensor< double, 3 > allocate_elemvec () const
 Allocated "elemvec".
 
array_type::tensor< double, 3 > allocate_elemvec (double val) const
 Allocated and initialised "elemvec".
 
array_type::tensor< double, 3 > allocate_elemmat () const
 Allocated "elemmat".
 
array_type::tensor< double, 3 > allocate_elemmat (double val) const
 Allocated and initialised "elemmat".
 

Additional Inherited Members

- Protected Attributes inherited from GooseFEM::Vector
array_type::tensor< size_t, 2 > m_conn
 See conn()
 
array_type::tensor< size_t, 2 > m_dofs
 See dofs()
 
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.
 

Detailed Description

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

Definition at line 32 of file VectorPartitionedTyings.h.

Constructor & Destructor Documentation

◆ VectorPartitionedTyings()

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

Constructor.

Template Parameters
Ee.g. array_type::tensor<size_t, 2>
Me.g. Eigen::SparseMatrix<double>
Parameters
connconnectivity [nelem, nne].
dofsDOFs per node [nnode, ndim].
CduSee Tyings::Periodic::Cdu().
CdpSee Tyings::Periodic::Cdp().
CdiSee Tyings::Periodic::Cdi().

Definition at line 91 of file VectorPartitionedTyings.h.

Member Function Documentation

◆ AsDofs_i()

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

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

Only the independent DOFs are retained.

Parameters
nodevecnodal vectors [nnode, ndim].
Returns
dofval[iii()] [nni].

Definition at line 209 of file VectorPartitionedTyings.h.

◆ asDofs_i()

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

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

Parameters
nodevec[nnode, ndim].
dofval_i[nni].
apply_tyingsIf true the dependent DOFs are eliminated.

Definition at line 224 of file VectorPartitionedTyings.h.

◆ copy_p()

template<class T >
void GooseFEM::VectorPartitionedTyings::copy_p ( const T & dofval_src,
T & dofval_dest ) const
inline

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

Parameters
dofval_srcDOF values, iip() updated, [ndof].
dofval_destDOF values, iip() updated, [ndof].

Definition at line 188 of file VectorPartitionedTyings.h.

◆ iid()

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

Dependent DOFs (list of DOF numbers).

Returns
Pointer.

Definition at line 149 of file VectorPartitionedTyings.h.

◆ iii()

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

Independent DOFs (list of DOF numbers).

Returns
Copy.

Definition at line 158 of file VectorPartitionedTyings.h.

◆ iip()

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

Independent prescribed DOFs (list of DOF numbers).

Returns
Pointer.

Definition at line 176 of file VectorPartitionedTyings.h.

◆ iiu()

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

Independent unknown DOFs (list of DOF numbers).

Returns
Pointer.

Definition at line 167 of file VectorPartitionedTyings.h.

◆ nnd()

size_t GooseFEM::VectorPartitionedTyings::nnd ( ) const
inline
Returns
Number of dependent DOFs.

Definition at line 116 of file VectorPartitionedTyings.h.

◆ nni()

size_t GooseFEM::VectorPartitionedTyings::nni ( ) const
inline
Returns
Number of independent DOFs.

Definition at line 124 of file VectorPartitionedTyings.h.

◆ nnp()

size_t GooseFEM::VectorPartitionedTyings::nnp ( ) const
inline
Returns
Number of independent prescribed DOFs.

Definition at line 140 of file VectorPartitionedTyings.h.

◆ nnu()

size_t GooseFEM::VectorPartitionedTyings::nnu ( ) const
inline
Returns
Number of independent unknown DOFs.

Definition at line 132 of file VectorPartitionedTyings.h.


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