10#include <jem/numeric/algebra/MatmulChain.h>
11#include <jem/util/Properties.h>
12#include <jive/Array.h>
13#include <jive/geom/ParametricLine.h>
14#include <jive/geom/Shape.h>
15#include <jive/geom/StdShape.h>
19using jem::numeric::MatmulChain;
20using jem::util::Properties;
24using jive::geom::ParametricLine;
25using jive::geom::Shape;
55 explicit Line3D(
const String &name,
56 const Properties &conf,
57 const Properties &props);
100 const Matrix &c)
const override;
116 const Matrix &c)
const override;
124 const Matrix &c)
const;
130 const Cubix &Rn)
const;
137 void getXi(
const Quadix &Xi,
140 const Matrix &c)
const;
146 void getXi(
const Quadix &Xi,
148 const Matrix &phiP)
const;
154 void getPsi(
const Quadix &Psi,
156 const Matrix &c)
const;
162 void getPi(
const Cubix &Pi,
164 const Cubix &Rn)
const;
169 void getPi(
const Cubix &Pi,
170 const Cubix &Rn)
const;
180 const Cubix &nodeLambda)
const;
188 const Cubix &LambdaP,
190 const Cubix &nodeLambda)
const;
199 const Vector &u)
const override;
207 const Vector &u)
const;
217 const Vector &u)
const;
224 void getRotations_(
const Cubix &Ri,
225 const Matrix &node_psi,
226 const Matrix &Lambda_r)
const;
234 void getRotationGradients_(
const Cubix &LambdaP,
236 const Matrix &ip_psi,
237 const Matrix &node_psi,
238 const Matrix &Lambda_r)
const;
243 void getRefRot_(
const Matrix Lambda_r,
244 const Cubix Rn)
const;
250 void getNodeRotVecs_(
const Matrix psi,
251 const Matrix Lambda_r,
252 const Cubix Rn)
const;
338 return intLine_->getIntegrationScheme();
346 return intLine_->containsLocalPoint(u);
353 return intLine_->getVertexFunctions();
360 const Vector &u)
const
362 JEM_ASSERT2(u.size() ==
localRank(),
"internal coordinates do not match the rank");
372 const Vector &u)
const
374 JEM_ASSERT2(u.size() ==
localRank(),
"internal coordinates do not match the rank");
375 Matrix g_dummy(1, g.size());
376 intLine_->getSShape()->evalShapeGradients(h, g_dummy, u);
388 const Vector &u)
const
390 JEM_ASSERT2(u.size() ==
localRank(),
"internal coordinates do not match the rank");
391 Matrix g_dummy(1, g.size());
392 Matrix gg_dummy(1, gg.size());
393 intLine_->getSShape()->evalShapeGradGrads(h, g_dummy, gg_dummy, u);
395 gg = gg_dummy(0, ALL);
402 return intLine_->getShapeFunctions();
Shape function for 1D line elements in 3D space.
Definition Line3D.h:42
idx_t shapeFuncCount() const override
Get the number of shape functions.
Definition Line3D.h:322
idx_t globalRank() const override
Get the global rank (spatial dimension).
Definition Line3D.h:287
Matrix getVertexCoords() const override
Get the local coordinates of the vertices.
Definition Line3D.h:329
void getPi(const Cubix &Pi, const Cubix &Ri, const Cubix &Rn) const
Get the Pi at the integration points.
Definition Line3D.cpp:240
void evalShapeFunctions(const Vector &h, const Vector &u) const override
Evaluate shape functions at given local coordinates.
Definition Line3D.h:359
void getXi(const Quadix &Xi, const Vector &w, const Matrix &u, const Matrix &c) const
Get the Xi at the integration points.
Definition Line3D.cpp:174
Vector phiIJ_
relative rotation vector between the reference nodes
Definition Line3D.h:267
void getRotationGradients(const Cubix &LambdaP, const Vector &w, const Matrix &c, const Cubix &nodeLambda) const
Get the rotation gradients at the integration points from the rotations (Crisfield/Jelenic)
Definition Line3D.cpp:254
Matrix getVertexFunctions() const override
Get shape function values at the integration points.
Definition Line3D.h:351
void getRotationsAndGradients(const Cubix &Ri, const Cubix &LambdaP, const Matrix &grads, const Cubix &nodeLambda) const
Get the rotations and the rotation gradients at the integration points using one evaluation of the no...
Definition Line3D.cpp:274
static const String PROP_INT
Property name for integration scheme.
Definition Line3D.h:45
void getShapeGradients(const Matrix &g, const Vector &w, const Matrix &c) const
get the gradients of the shape functions at the integration points
Definition Line3D.cpp:111
MatmulChain< double, 2 > matmul_
matrix products without allocations
Definition Line3D.h:264
Matrix gradMemoCoords_
Definition Line3D.h:276
static const String PROP_LOCAL
Property name for local coordinates.
Definition Line3D.h:46
bool containsLocalPoint(const Vector &u) const override
Check whether a local point is inside the element.
Definition Line3D.h:344
idx_t localRank() const override
Get the local rank of the line element.
Definition Line3D.h:294
idx_t nodeCount() const override
Get the number of nodes in the line element.
Definition Line3D.h:301
Matrix lambdaR_
reference rotation, 3 x 3
Definition Line3D.h:262
Vector gradMemoWeights_
Definition Line3D.h:278
Matrix getIntegrationScheme() const override
Get the integration scheme.
Definition Line3D.h:336
void getIntegrationWeights(const Vector &w, const Matrix &c) const override
Compute integration weights for numerical integration.
Definition Line3D.cpp:100
void getPsi(const Quadix &Psi, const Vector &w, const Matrix &c) const
Get the Psi at the integration points.
Definition Line3D.cpp:209
Matrix nodePsi_
relative rotation vectors of the nodes, 3 x nodeCount
Definition Line3D.h:261
Matrix relRot_
relative rotation, 3 x 3
Definition Line3D.h:265
Matrix getShapeFunctions() const override
Get shape function values at the integration points.
Definition Line3D.h:400
void evalShapeGradients(const Vector &h, const Vector &g, const Vector &u) const
Evaluate shape functions and their gradients at local coordinates.
Definition Line3D.h:370
Matrix gradMemoGrads_
Definition Line3D.h:277
Matrix ipPsi_
rotation vectors at the integration points, 3 x ipointCount
Definition Line3D.h:263
void getRotations(const Cubix &Ri, const Cubix &Rn) const
return the rotations at the integration points
Definition Line3D.cpp:143
void getGlobalPoint(const Vector &x, const Vector &u, const Matrix &c) const override
Transform local coordinates to global coordinates.
Definition Line3D.cpp:90
static const String PROP_NODES
Property name for number of nodes.
Definition Line3D.h:44
jem::Ref< ParametricLine > intLine_
internal line element for some standard functions
Definition Line3D.h:255
idx_t vertexCount() const override
Get the number of vertices in the line element.
Definition Line3D.h:308
bool gradMemoValid_
Definition Line3D.h:275
static const idx_t GLOB_RANK
Global rank (always 3 for 3D space)
Definition Line3D.h:47
idx_t ipointCount() const override
Get the number of integration points.
Definition Line3D.h:315
Matrix skewP_
skew symmetric matrix of the tangent, 3 x 3
Definition Line3D.h:266
void evalShapeGradGrads(const Vector &h, const Vector &g, const Vector &gg, const Vector &u) const
Evaluate shape functions, gradients, and second derivatives.
Definition Line3D.h:385
file containing some basic helper functions
Array< double, 4 > Quadix
Definition helpers.h:47