11#ifndef GOOSEFEM_VECTORPARTITIONED_H
12#define GOOSEFEM_VECTORPARTITIONED_H
130#pragma omp parallel for
151#pragma omp parallel for
206#pragma omp parallel for
259#pragma omp parallel for
305#pragma omp parallel for
306 for (
size_t d = 0;
d <
m_nnu; ++
d) {
310#pragma omp parallel for
311 for (
size_t d = 0;
d <
m_nnp; ++
d) {
354#pragma omp parallel for
405#pragma omp parallel for
407 for (
size_t m = 0;
m <
m_nne; ++
m) {
451#pragma omp parallel for
452 for (
size_t d = 0;
d <
m_nnu; ++
d) {
488#pragma omp parallel for
529#pragma omp parallel for
531 for (
size_t m = 0;
m <
m_nne; ++
m) {
572#pragma omp parallel for
573 for (
size_t d = 0;
d <
m_nnp; ++
d) {
609#pragma omp parallel for
650#pragma omp parallel for
652 for (
size_t m = 0;
m <
m_nne; ++
m) {
Methods to switch between storage types based on a mesh.
Reorder to lowest possible index, in specific order.
Class to switch between storage types, based on a mesh and DOFs that are partitioned in:
const array_type::tensor< size_t, 1 > & iip() const
array_type::tensor< double, 1 > AsDofs_u(const array_type::tensor< double, 3 > &elemvec) const
Convert "elemvec" to "dofval" (overwrite entries that occur more than once) and extract the unknown "...
void asDofs_u(const array_type::tensor< double, 1 > &dofval, array_type::tensor< double, 1 > &dofval_u) const
Extract the unknown "dofval":
void asDofs_p(const array_type::tensor< double, 3 > &elemvec, array_type::tensor< double, 1 > &dofval_p) const
Convert "elemvec" to "dofval" (overwrite entries that occur more than once) and extract the prescribe...
array_type::tensor< double, 1 > AsDofs_u(const array_type::tensor< double, 1 > &dofval) const
Extract the unknown "dofval":
void asDofs_p(const array_type::tensor< double, 1 > &dofval, array_type::tensor< double, 1 > &dofval_p) const
Extract the prescribed "dofval":
array_type::tensor< double, 1 > DofsFromParitioned(const array_type::tensor< double, 1 > &dofval_u, const array_type::tensor< double, 1 > &dofval_p) const
Combine unknown and prescribed "dofval" into a single "dofval" list.
void elementFromPartitioned(const array_type::tensor< double, 1 > &dofval_u, const array_type::tensor< double, 1 > &dofval_p, array_type::tensor< double, 3 > &elemvec) const
Combine unknown and prescribed "dofval" into a single "dofval" list and directly convert to "elemvec"...
array_type::tensor< bool, 2 > dofs_is_u() const
Per DOF (see Vector::dofs()) list if unknown ("u").
void asDofs_p(const array_type::tensor< double, 2 > &nodevec, array_type::tensor< double, 1 > &dofval_p) const
Convert "nodevec" to "dofval" (overwrite entries that occur more than once) and extract the prescribe...
array_type::tensor< double, 1 > AsDofs_p(const array_type::tensor< double, 3 > &elemvec) const
Convert "elemvec" to "dofval" (overwrite entries that occur more than once) and extract the prescribe...
VectorPartitioned(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.
void copy_p(const array_type::tensor< double, 2 > &nodevec_src, array_type::tensor< double, 2 > &nodevec_dest) const
Copy prescribed DOFs from "nodevec" to another "nodvec":
void dofsFromParitioned(const array_type::tensor< double, 1 > &dofval_u, const array_type::tensor< double, 1 > &dofval_p, array_type::tensor< double, 1 > &dofval) const
Combine unknown and prescribed "dofval" into a single "dofval" list.
void copy_u(const array_type::tensor< double, 2 > &nodevec_src, array_type::tensor< double, 2 > &nodevec_dest) const
Copy unknown DOFs from "nodevec" to another "nodvec":
const array_type::tensor< size_t, 1 > & iiu() const
array_type::tensor< size_t, 1 > m_iiu
See iiu()
array_type::tensor< size_t, 2 > m_part
Renumbered DOFs per node, such that.
array_type::tensor< double, 2 > Copy_u(const array_type::tensor< double, 2 > &nodevec_src, const array_type::tensor< double, 2 > &nodevec_dest) const
Copy unknown DOFs from "nodevec" to another "nodvec":
array_type::tensor< double, 2 > NodeFromPartitioned(const array_type::tensor< double, 1 > &dofval_u, const array_type::tensor< double, 1 > &dofval_p) const
Combine unknown and prescribed "dofval" into a single "dofval" list and directly convert to "nodeval"...
array_type::tensor< size_t, 1 > m_iip
See iip()
void asDofs_u(const array_type::tensor< double, 3 > &elemvec, array_type::tensor< double, 1 > &dofval_u) const
Convert "elemvec" to "dofval" (overwrite entries that occur more than once) and extract the unknown "...
array_type::tensor< double, 1 > AsDofs_p(const array_type::tensor< double, 1 > &dofval) const
Extract the prescribed "dofval":
void asDofs_u(const array_type::tensor< double, 2 > &nodevec, array_type::tensor< double, 1 > &dofval_u) const
Convert "nodevec" to "dofval" (overwrite entries that occur more than once) and extract the unknown "...
array_type::tensor< double, 2 > Copy_p(const array_type::tensor< double, 2 > &nodevec_src, const array_type::tensor< double, 2 > &nodevec_dest) const
Copy prescribed DOFs from "nodevec" to another "nodvec":
void nodeFromPartitioned(const array_type::tensor< double, 1 > &dofval_u, const array_type::tensor< double, 1 > &dofval_p, array_type::tensor< double, 2 > &nodevec) const
Combine unknown and prescribed "dofval" into a single "dofval" list and directly convert to "nodeval"...
array_type::tensor< bool, 2 > dofs_is_p() const
Per DOF (see Vector::dofs()) list if prescribed ("p").
array_type::tensor< double, 3 > ElementFromPartitioned(const array_type::tensor< double, 1 > &dofval_u, const array_type::tensor< double, 1 > &dofval_p) const
Combine unknown and prescribed "dofval" into a single "dofval" list and directly convert to "elemvec"...
array_type::tensor< double, 1 > AsDofs_u(const array_type::tensor< double, 2 > &nodevec) const
Convert "nodevec" to "dofval" (overwrite entries that occur more than once) and extract the unknown "...
array_type::tensor< double, 1 > AsDofs_p(const array_type::tensor< double, 2 > &nodevec) const
Convert "nodevec" to "dofval" (overwrite entries that occur more than once) and extract the prescribe...
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
std::array< size_t, 2 > shape_nodevec() const
Shape of "nodevec".
array_type::tensor< size_t, 2 > m_conn
See conn()
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.
bool is_unique(const T &arg)
Returns true is a list is unique (has not duplicate items).
auto AsTensor(const T &arg, const S &shape)
"Broadcast" a scalar stored in an array (e.g.