v0.13.2
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
SimpleContactProblem::OpGetPositionAtGaussPtsSlave Struct Reference

Operator for the simple contact element. More...

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

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

Public Member Functions

 OpGetPositionAtGaussPtsSlave (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 slave triangle.

Definition at line 809 of file SimpleContact.hpp.

Constructor & Destructor Documentation

◆ OpGetPositionAtGaussPtsSlave()

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

Definition at line 812 of file SimpleContact.hpp.

815 : ContactOp(field_name, UserDataOperator::OPCOL, ContactOp::FACESLAVE),
816 commonDataSimpleContact(common_data_contact) {}
constexpr auto field_name
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact
ContactPrismElementForcesAndSourcesCore::UserDataOperator ContactOp

Member Function Documentation

◆ doWork()

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

Definition at line 570 of file SimpleContact.cpp.

571 {
573 const int nb_dofs = data.getFieldData().size();
574
575 if (nb_dofs == 0)
577
578 const int nb_gauss_pts = data.getN().size1();
579
580 if (type == MBVERTEX) {
581 commonDataSimpleContact->positionAtGaussPtsSlavePtr.get()->resize(
582 3, nb_gauss_pts, false);
583
584 commonDataSimpleContact->positionAtGaussPtsSlavePtr.get()->clear();
585 }
586
587 auto t_position_slave = getFTensor1FromMat<3>(
588 *commonDataSimpleContact->positionAtGaussPtsSlavePtr);
589
590 int nb_base_fun_col = data.getFieldData().size() / 3;
591
593
594 for (int gg = 0; gg != nb_gauss_pts; ++gg) {
595 FTensor::Tensor0<double *> t_base_slave(&data.getN()(gg, 0));
596
597 FTensor::Tensor1<double *, 3> t_field_data_slave(
598 &data.getFieldData()[0], &data.getFieldData()[1],
599 &data.getFieldData()[2], 3);
600
601 for (int bb = 0; bb != nb_base_fun_col; ++bb) {
602 t_position_slave(i) += t_base_slave * t_field_data_slave(i);
603
604 ++t_base_slave;
605 ++t_field_data_slave;
606 }
607 ++t_position_slave;
608 }
609
611}
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#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
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
const VectorDouble & getFieldData() const
get dofs values

Member Data Documentation

◆ commonDataSimpleContact

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

Definition at line 811 of file SimpleContact.hpp.


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