NuTo
Numerics Tool
DynamicMomentumBalance.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 namespace NuTo
6 {
7 namespace Integrands
8 {
9 
10 template <int TDim>
12 {
14 
15 public:
17  : MomentumBalance<TDim>(dofType, law)
18  , mRho(rho)
19  {
20  }
21 
23  {
24 
25  Eigen::MatrixXd N = cellIpData.N(mDofType);
26  DofMatrix<double> hessian2;
27 
28  hessian2(mDofType, mDofType) = N.transpose() * N * mRho;
29  return hessian2;
30  }
31 
32 private:
33  double mRho;
34 };
35 } /* Integrand */
36 } /* NuTo */
DynamicMomentumBalance(DofType dofType, const Laws::MechanicsInterface< TDim > &law, double rho)
Definition: DynamicMomentumBalance.h:16
Definition: MomentumBalance.h:17
float rho
Definition: TimeIntegrationResultForce.py:10
Similar to NuTo::CellData.
Definition: CellIpData.h:14
Definition: DofType.h:8
DofType mDofType
Definition: MomentumBalance.h:49
dof container that is also capable of performing calculations.
Definition: DofMatrixContainer.h:13
Definition: DynamicMomentumBalance.h:11
Definition: Exception.h:6
const Eigen::MatrixXd & N(DofType dofType) const
Returns a memoized copy of the N matrix for a given dof type.
Definition: CellIpData.h:77
DofMatrix< double > Hessian2(const CellIpData &cellIpData)
Definition: DynamicMomentumBalance.h:22
Eigen::MatrixXd N(const Eigen::VectorXd &shapeFunctions, int numNodes, int dim)
Definition: Matrix.h:8
Definition: MechanicsInterface.h:13