v0.14.0
Public Member Functions | Public Attributes | List of all members
SimpleContactProblem::OpGetPositionAtGaussPtsMaster Struct Reference

Operator for the simple contact element. More...

#include <users_modules/mortar_contact/src/SimpleContact.hpp>

Inheritance diagram for SimpleContactProblem::OpGetPositionAtGaussPtsMaster:
[legend]
Collaboration diagram for SimpleContactProblem::OpGetPositionAtGaussPtsMaster:
[legend]

Public Member Functions

 OpGetPositionAtGaussPtsMaster (const string field_name, boost::shared_ptr< CommonDataSimpleContact > common_data_contact)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 

Public Attributes

boost::shared_ptr< CommonDataSimpleContactcommonDataSimpleContact
 

Detailed Description

Operator for the simple contact element.

Calculates the spacial coordinates of the gauss points of master triangle.

Definition at line 755 of file SimpleContact.hpp.

Constructor & Destructor Documentation

◆ OpGetPositionAtGaussPtsMaster()

SimpleContactProblem::OpGetPositionAtGaussPtsMaster::OpGetPositionAtGaussPtsMaster ( const string  field_name,
boost::shared_ptr< CommonDataSimpleContact common_data_contact 
)
inline

Definition at line 758 of file SimpleContact.hpp.

761  : ContactOp(field_name, UserDataOperator::OPCOL, ContactOp::FACEMASTER),
762  commonDataSimpleContact(common_data_contact) {}

Member Function Documentation

◆ doWork()

MoFEMErrorCode SimpleContactProblem::OpGetPositionAtGaussPtsMaster::doWork ( int  side,
EntityType  type,
EntData data 
)

Definition at line 453 of file SimpleContact.cpp.

454  {
456  const int nb_dofs = data.getFieldData().size();
457 
458  if (nb_dofs == 0)
460 
461  const int nb_gauss_pts = data.getN().size1();
462 
463  if (type == MBVERTEX) {
464  commonDataSimpleContact->positionAtGaussPtsMasterPtr.get()->resize(
465  3, nb_gauss_pts, false);
466 
467  commonDataSimpleContact->positionAtGaussPtsMasterPtr.get()->clear();
468  }
469 
470  auto t_position_master = getFTensor1FromMat<3>(
471  *commonDataSimpleContact->positionAtGaussPtsMasterPtr);
472 
473  int nb_base_fun_col = data.getFieldData().size() / 3;
474 
476 
477  for (int gg = 0; gg != nb_gauss_pts; ++gg) {
478  FTensor::Tensor0<double *> t_base_master(&data.getN()(gg, 0));
479 
480  FTensor::Tensor1<double *, 3> t_field_data_master(
481  &data.getFieldData()[0], &data.getFieldData()[1],
482  &data.getFieldData()[2], 3);
483 
484  for (int bb = 0; bb != nb_base_fun_col; ++bb) {
485  t_position_master(i) += t_base_master * t_field_data_master(i);
486 
487  ++t_base_master;
488  ++t_field_data_master;
489  }
490  ++t_position_master;
491  }
492 
494 }

Member Data Documentation

◆ commonDataSimpleContact

boost::shared_ptr<CommonDataSimpleContact> SimpleContactProblem::OpGetPositionAtGaussPtsMaster::commonDataSimpleContact

Definition at line 757 of file SimpleContact.hpp.


The documentation for this struct was generated from the following files:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
FTensor::Tensor1
Definition: Tensor1_value.hpp:8
MoFEM::EntitiesFieldData::EntData::getFieldData
const VectorDouble & getFieldData() const
get dofs values
Definition: EntitiesFieldData.hpp:1241
SimpleContactProblem::OpGetPositionAtGaussPtsMaster::commonDataSimpleContact
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact
Definition: SimpleContact.hpp:757
convert.type
type
Definition: convert.py:64
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPCOL
@ OPCOL
operator doWork function is executed on FE columns
Definition: ForcesAndSourcesCore.hpp:568
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
FTensor::Index< 'i', 3 >
SimpleContactProblem::ContactOp
ContactPrismElementForcesAndSourcesCore::UserDataOperator ContactOp
Definition: SimpleContact.hpp:30
FTensor::Tensor0
Definition: Tensor0.hpp:16
MoFEM::EntitiesFieldData::EntData::getN
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
Definition: EntitiesFieldData.hpp:1305
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346