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

Operator for the simple contact element for Augmented Lagrangian Method. More...

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

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

Public Member Functions

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

Private Attributes

boost::shared_ptr< CommonDataSimpleContactcommonDataSimpleContact
 
const double cN
 

Detailed Description

Operator for the simple contact element for Augmented Lagrangian Method.

Calculates Augmented Lagrange Multipliers at the gauss points on the slave triangle.

Definition at line 918 of file SimpleContact.hpp.

Constructor & Destructor Documentation

◆ OpGetAugmentedLambdaSlave()

SimpleContactProblem::OpGetAugmentedLambdaSlave::OpGetAugmentedLambdaSlave ( const string  field_name,
boost::shared_ptr< CommonDataSimpleContact common_data_contact,
const double  cn 
)
inline

Definition at line 921 of file SimpleContact.hpp.

925 : ContactOp(field_name, UserDataOperator::OPCOL, ContactOp::FACESLAVE),
926 commonDataSimpleContact(common_data_contact), cN(cn) {}
double cn
Definition: contact.cpp:124
constexpr auto field_name
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact
ContactPrismElementForcesAndSourcesCore::UserDataOperator ContactOp

Member Function Documentation

◆ doWork()

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

Definition at line 763 of file SimpleContact.cpp.

764 {
766
767 if (data.getFieldData().size() == 0)
769
770 if (type != MBVERTEX)
772
773 auto get_tensor_vec = [](VectorDouble &n) {
774 return FTensor::Tensor1<double *, 3>(&n(0), &n(1), &n(2));
775 };
776
777 const int nb_gauss_pts = data.getN().size1();
778
779 commonDataSimpleContact->augmentedLambdasPtr.get()->resize(nb_gauss_pts);
780 commonDataSimpleContact->augmentedLambdasPtr.get()->clear();
781
783
784 auto t_aug_lambda_ptr =
785 getFTensor0FromVec(*commonDataSimpleContact->augmentedLambdasPtr);
786
787 auto t_gap_ptr = getFTensor0FromVec(*commonDataSimpleContact->gapPtr);
788
789 auto t_lagrange_slave =
790 getFTensor0FromVec(*commonDataSimpleContact->lagMultAtGaussPtsPtr);
791
792 for (int gg = 0; gg != nb_gauss_pts; ++gg) {
793 t_aug_lambda_ptr += t_lagrange_slave + cN * t_gap_ptr;
794 ++t_aug_lambda_ptr;
795 ++t_lagrange_slave;
796 ++t_gap_ptr;
797 } // for gauss points
798
800}
#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< 'n', SPACE_DIM > n
FTensor::Index< 'i', SPACE_DIM > i
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:135
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

◆ cN

const double SimpleContactProblem::OpGetAugmentedLambdaSlave::cN
private

Definition at line 932 of file SimpleContact.hpp.

◆ commonDataSimpleContact

boost::shared_ptr<CommonDataSimpleContact> SimpleContactProblem::OpGetAugmentedLambdaSlave::commonDataSimpleContact
private

Definition at line 931 of file SimpleContact.hpp.


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