v0.14.0
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) {}

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 }

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:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
FTensor::Tensor1
Definition: Tensor1_value.hpp:8
MoFEM::EntitiesFieldData::EntData::getFieldData
const VectorDouble & getFieldData() const
get dofs values
Definition: EntitiesFieldData.hpp:1254
convert.type
type
Definition: convert.py:64
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPCOL
@ OPCOL
operator doWork function is executed on FE columns
Definition: ForcesAndSourcesCore.hpp:568
MoFEM::getFTensor0FromVec
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:135
SimpleContactProblem::OpGetAugmentedLambdaSlave::commonDataSimpleContact
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact
Definition: SimpleContact.hpp:931
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 >
convert.n
n
Definition: convert.py:82
SimpleContactProblem::ContactOp
ContactPrismElementForcesAndSourcesCore::UserDataOperator ContactOp
Definition: SimpleContact.hpp:30
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:1318
MoFEM::Types::VectorDouble
UBlasVector< double > VectorDouble
Definition: Types.hpp:68
SimpleContactProblem::OpGetAugmentedLambdaSlave::cN
const double cN
Definition: SimpleContact.hpp:932
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359