12#ifndef GOOSEFEM_VECTORPARTITIONEDTYINGS_H
13#define GOOSEFEM_VECTORPARTITIONEDTYINGS_H
19#include <Eigen/Sparse>
42 Eigen::SparseMatrix<double> m_Cdu;
43 Eigen::SparseMatrix<double> m_Cdp;
44 Eigen::SparseMatrix<double> m_Cdi;
45 Eigen::SparseMatrix<double> m_Cud;
46 Eigen::SparseMatrix<double> m_Cpd;
47 Eigen::SparseMatrix<double> m_Cid;
58 Eigen::VectorXd Eigen_asDofs_d(
const T&
nodevec)
const
64#pragma omp parallel for
90 template <
class E,
class M>
97 m_nnu =
static_cast<size_t>(m_Cdu.cols());
98 m_nnp =
static_cast<size_t>(m_Cdp.cols());
99 m_nnd =
static_cast<size_t>(m_Cdp.rows());
100 m_nni = m_nnu + m_nnp;
101 m_iiu = xt::arange<size_t>(m_nnu);
102 m_iip = xt::arange<size_t>(m_nnu, m_nnu + m_nnp);
103 m_iii = xt::arange<size_t>(m_nni);
104 m_iid = xt::arange<size_t>(m_nni, m_nni + m_nnd);
105 m_Cud = m_Cdu.transpose();
106 m_Cpd = m_Cdp.transpose();
107 m_Cid = m_Cdi.transpose();
195#pragma omp parallel for
196 for (
size_t i = m_nnu;
i < m_nni; ++
i) {
223 template <
class T,
class R>
231#pragma omp parallel for
247#pragma omp parallel for
248 for (
size_t i = 0;
i < m_nni; ++
i) {
Methods to switch between storage types based on a mesh.
Class to switch between storage types.
void asDofs_i(const T &nodevec, R &dofval_i, bool apply_tyings=true) const
Same as InterpQuad_vector(), but writing to preallocated return.
array_type::tensor< double, 1 > AsDofs_i(const T &nodevec) const
Convert to "dofval" (overwrite entries that occur more than once).
const array_type::tensor< size_t, 1 > & iip() const
Independent prescribed 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 > & iid() const
Dependent DOFs (list of DOF numbers).
const array_type::tensor< size_t, 1 > & iiu() const
Independent unknown DOFs (list of DOF numbers).
void copy_p(const T &dofval_src, T &dofval_dest) const
Copy (part of) "dofval" to another "dofval": dofval_dest[iip()] = dofval_src[iip()].
VectorPartitionedTyings(const E &conn, const E &dofs, const M &Cdu, const M &Cdp, const M &Cdi)
Constructor.
Class to switch between storage types.
array_type::tensor< size_t, 2 > m_dofs
See dofs()
const array_type::tensor< size_t, 2 > & conn() const
const array_type::tensor< size_t, 2 > & dofs() const
#define GOOSEFEM_ASSERT(expr)
All assertions are implementation as::
xt::xtensor< T, N > tensor
Fixed (static) rank array.
Toolbox to perform finite element computations.
auto AsTensor(const T &arg, const S &shape)
"Broadcast" a scalar stored in an array (e.g.