v0.13.1
Public Member Functions | Private Attributes | List of all members
OpRotatingFrameTools::OpCalculateJumpOnSkeleton Struct Reference

#include <users_modules/multifield_plasticity/src/RotatingFrameOperators.hpp>

Inheritance diagram for OpRotatingFrameTools::OpCalculateJumpOnSkeleton:
[legend]
Collaboration diagram for OpRotatingFrameTools::OpCalculateJumpOnSkeleton:
[legend]

Public Member Functions

 OpCalculateJumpOnSkeleton (const std::string field_name, boost::shared_ptr< CommonData > common_data_ptr, boost::shared_ptr< DomainSideEle > side_op_fe)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 

Private Attributes

boost::shared_ptr< CommonDatacommonDataPtr
 
boost::shared_ptr< DomainSideEle > sideOpFe
 

Detailed Description

Definition at line 90 of file RotatingFrameOperators.hpp.

Constructor & Destructor Documentation

◆ OpCalculateJumpOnSkeleton()

OpRotatingFrameTools::OpCalculateJumpOnSkeleton::OpCalculateJumpOnSkeleton ( const std::string  field_name,
boost::shared_ptr< CommonData common_data_ptr,
boost::shared_ptr< DomainSideEle side_op_fe 
)

Definition at line 383 of file RotatingFrameOperators.cpp.

386 : SkeletonEleOp(field_name, field_name, SkeletonEleOp::OPROW),
387 commonDataPtr(common_data_ptr), sideOpFe(side_op_fe) {
388 std::fill(&doEntities[MBVERTEX], &doEntities[MBMAXTYPE], false);
389 doEntities[MBTRI] = doEntities[MBQUAD] = true;
390}
SkeletonEle::UserDataOperator SkeletonEleOp
constexpr auto field_name

Member Function Documentation

◆ doWork()

MoFEMErrorCode OpRotatingFrameTools::OpCalculateJumpOnSkeleton::doWork ( int  side,
EntityType  type,
EntData data 
)

Definition at line 392 of file RotatingFrameOperators.cpp.

393 {
395 // if (skipEnts.find(getFEEntityHandle()) != skipEnts.end())
396 // MoFEMFunctionReturnHot(0);
397 if ((type == MBTRI || type == MBQUAD) && side == 0) {
398 const size_t nb_dofs = data.getIndices().size();
399 // if (nb_dofs == 0)
400 // MoFEMFunctionReturnHot(0);
401
402 const size_t nb_integration_pts = data.getN().size1();
403 const size_t nb_base_functions = data.getN().size2();
404 commonDataPtr->plasticStrainSideMap.clear();
405 CHKERR loopSideVolumes("dFE", *sideOpFe);
406 const int check_size = commonDataPtr->plasticStrainSideMap.size();
407
408 if (commonDataPtr->plasticStrainSideMap.size() == 1)
409 if (static_cast<int>(
410 commonDataPtr->plasticStrainSideMap.begin()->second.size2()) !=
411 nb_integration_pts)
412 SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY,
413 "wrong number of integration points");
414
415 auto &plastic_mat_l = commonDataPtr->plasticStrainSideMap.at(-1);
416 auto &plastic_mat_r = commonDataPtr->plasticStrainSideMap.at(1);
417 auto t_plastic_strain_l = getFTensor2SymmetricFromMat<3>(plastic_mat_l);
418 auto t_plastic_strain_r = getFTensor2SymmetricFromMat<3>(plastic_mat_r);
419 auto &tau_vec_l = commonDataPtr->plasticTauSideMap.at(-1);
420 auto &tau_vec_r = commonDataPtr->plasticTauSideMap.at(1);
421 auto t_tau_l = getFTensor0FromVec(tau_vec_l);
422 auto t_tau_r = getFTensor0FromVec(tau_vec_r);
423
424 auto t_w = getFTensor0IntegrationWeight();
425 auto t_base = data.getFTensor0N();
426 auto t_coords = getFTensor1CoordsAtGaussPts();
427 commonDataPtr->plasticTauJumpPtr->resize(nb_integration_pts, false);
428 commonDataPtr->plasticStrainJumpPtr->resize(6, nb_integration_pts, false);
429 auto t_plastic_strain_jump =
430 getFTensor2SymmetricFromMat<3>(*commonDataPtr->plasticStrainJumpPtr);
431 auto t_tau_jump = getFTensor0FromVec(*commonDataPtr->plasticTauJumpPtr);
432
433 for (size_t gg = 0; gg != nb_integration_pts; ++gg) {
434 double alpha = getMeasure() * t_w;
435
436 // Tensor2_symmetric<PackPtr<double *, 6>, 3> t_nf{&nf[0], &nf[1],
437 // &nf[2],
438 // &nf[3], &nf[4],
439 // &nf[5]};
440 // this is just work in progress
441 t_plastic_strain_jump(i, j) =
442 t_plastic_strain_l(i, j) - t_plastic_strain_r(i, j);
443 t_tau_jump = t_tau_l - t_tau_r;
444
445 // size_t bb = 0;
446 // for (; bb != nb_dofs / 6; ++bb) {
447 // t_nf(i, j) += alpha * t_base;
448 // ++t_base;
449 // ++t_nf;
450 // }
451
452 // for (; bb < nb_base_functions; ++bb)
453 // ++t_base;
454
455 ++t_plastic_strain_jump;
456 ++t_tau_jump;
457 ++t_plastic_strain_l;
458 ++t_plastic_strain_r;
459 ++t_tau_l;
460 ++t_tau_r;
461 ++t_w;
462 }
463
464 // CHKERR VecSetValues(getTSf(), data, nf.data(), ADD_VALUES);
465 }
466
468}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:44
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
#define CHKERR
Inline error check.
Definition: definitions.h:548
constexpr double alpha
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:149
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
const VectorInt & getIndices() const
Get global indices of dofs on entity.

Member Data Documentation

◆ commonDataPtr

boost::shared_ptr<CommonData> OpRotatingFrameTools::OpCalculateJumpOnSkeleton::commonDataPtr
private

Definition at line 97 of file RotatingFrameOperators.hpp.

◆ sideOpFe

boost::shared_ptr<DomainSideEle> OpRotatingFrameTools::OpCalculateJumpOnSkeleton::sideOpFe
private

Definition at line 98 of file RotatingFrameOperators.hpp.


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