v0.14.0
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
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< MatrixDouble > xPtr
 
boost::shared_ptr< MatrixDouble > XPtr
 
boost::shared_ptr< MatrixDouble > uPtr
 

Detailed Description

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

Definition at line 226 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

Definition at line 227 of file dynamic_first_order_con_law.cpp.

230 : ForcesAndSourcesCore::UserDataOperator(NOSPACE, OPLAST),
231 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 233 of file dynamic_first_order_con_law.cpp.

234 {
236 // Define Indicies
238
239 // Number of Gauss points
240 const size_t nb_gauss_pts = getGaussPts().size2();
241
242 uPtr->resize(DIM, nb_gauss_pts, false); // ignatios check
243 uPtr->clear();
244
245 // Extract matrix from data matrix
246 auto t_x = getFTensor1FromMat<DIM>(*xPtr);
247 auto t_X = getFTensor1FromMat<DIM>(*XPtr);
248 auto t_u = getFTensor1FromMat<DIM>(*uPtr);
249 for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
250
251 t_u(i) = t_x(i) - t_X(i);
252 ++t_u;
253 ++t_x;
254 ++t_X;
255 }
256
258 }
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
FTensor::Index< 'i', SPACE_DIM > i

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: