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.
◆ OpCalculateDisplacement()
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) {}
boost::shared_ptr< MatrixDouble > XPtr
boost::shared_ptr< MatrixDouble > uPtr
boost::shared_ptr< MatrixDouble > xPtr
◆ doWork()
- Examples
- dynamic_first_order_con_law.cpp.
Definition at line 232 of file dynamic_first_order_con_law.cpp.
233 {
235
237
238
239 const size_t nb_gauss_pts = getGaussPts().size2();
240
241 uPtr->resize(DIM, nb_gauss_pts,
false);
243
244
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
◆ uPtr
◆ xPtr
◆ XPtr
The documentation for this struct was generated from the following file: