NuTo
Numerics Tool
Matrix.h
Go to the documentation of this file.
1 #pragma once
3 
4 namespace NuTo
5 {
6 namespace Matrix
7 {
8 inline Eigen::MatrixXd N(const Eigen::VectorXd& shapeFunctions, int numNodes, int dim)
9 {
10  Eigen::MatrixXd n(dim, dim * numNodes);
11  for (int i = 0; i < numNodes; ++i)
12  n.block(0, i * dim, dim, dim) = Eigen::MatrixXd::Identity(dim, dim) * shapeFunctions[i];
13  return n;
14 }
15 } /*Matrix */
16 } /* NuTo */
Definition: Exception.h:6
constexpr int dim
Definition: ConstraintNodeToElement2D.cpp:24
Eigen::MatrixXd N(const Eigen::VectorXd &shapeFunctions, int numNodes, int dim)
Definition: Matrix.h:8