v0.15.0
Loading...
Searching...
No Matches
OpCalculateDisplacement< DIM > Struct Template Reference
Inheritance diagram for OpCalculateDisplacement< DIM >:
[legend]
Collaboration diagram for OpCalculateDisplacement< DIM >:
[legend]

Public Member Functions

 OpCalculateDisplacement (boost::shared_ptr< MatrixDouble > spatial_pos_ptr, boost::shared_ptr< MatrixDouble > reference_pos_ptr, boost::shared_ptr< MatrixDouble > u_ptr)
 
MoFEMErrorCode doWork (int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
 

Private Attributes

boost::shared_ptr< MatrixDoublexPtr
 
boost::shared_ptr< MatrixDoubleXPtr
 
boost::shared_ptr< MatrixDoubleuPtr
 

Detailed Description

template<int DIM>
struct OpCalculateDisplacement< DIM >
Examples
dynamic_first_order_con_law.cpp.

Definition at line 225 of file dynamic_first_order_con_law.cpp.

Constructor & Destructor Documentation

◆ OpCalculateDisplacement()

template<int DIM>
OpCalculateDisplacement< DIM >::OpCalculateDisplacement ( boost::shared_ptr< MatrixDouble > spatial_pos_ptr,
boost::shared_ptr< MatrixDouble > reference_pos_ptr,
boost::shared_ptr< MatrixDouble > u_ptr )
inline
Examples
dynamic_first_order_con_law.cpp.

Definition at line 226 of file dynamic_first_order_con_law.cpp.

229 : ForcesAndSourcesCore::UserDataOperator(NOSPACE, OPLAST),
230 xPtr(spatial_pos_ptr), XPtr(reference_pos_ptr), uPtr(u_ptr) {}
@ NOSPACE
Definition definitions.h:83
boost::shared_ptr< MatrixDouble > XPtr
boost::shared_ptr< MatrixDouble > uPtr
boost::shared_ptr< MatrixDouble > xPtr

Member Function Documentation

◆ doWork()

template<int DIM>
MoFEMErrorCode OpCalculateDisplacement< DIM >::doWork ( int side,
EntityType type,
DataForcesAndSourcesCore::EntData & data )
inline
Examples
dynamic_first_order_con_law.cpp.

Definition at line 232 of file dynamic_first_order_con_law.cpp.

233 {
235 // Define Indicies
236 FTensor::Index<'i', DIM> i;
237
238 // Number of Gauss points
239 const size_t nb_gauss_pts = getGaussPts().size2();
240
241 uPtr->resize(DIM, nb_gauss_pts, false); // ignatios check
242 uPtr->clear();
243
244 // Extract matrix from data matrix
245 auto t_x = getFTensor1FromMat<DIM>(*xPtr);
246 auto t_X = getFTensor1FromMat<DIM>(*XPtr);
247 auto t_u = getFTensor1FromMat<DIM>(*uPtr);
248 for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
249
250 t_u(i) = t_x(i) - t_X(i);
251 ++t_u;
252 ++t_x;
253 ++t_X;
254 }
255
257 }
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Tensor1< FTensor::PackPtr< T *, S >, Tensor_Dim > getFTensor1FromMat(ublas::matrix< T, L, A > &data)
Get tensor rank 1 (vector) form data matrix.

Member Data Documentation

◆ uPtr

template<int DIM>
boost::shared_ptr<MatrixDouble> OpCalculateDisplacement< DIM >::uPtr
private

◆ XPtr

template<int DIM>
boost::shared_ptr<MatrixDouble> OpCalculateDisplacement< DIM >::XPtr
private

◆ xPtr

template<int DIM>
boost::shared_ptr<MatrixDouble> OpCalculateDisplacement< DIM >::xPtr
private

The documentation for this struct was generated from the following file: