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

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

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

Public Member Functions

 OpMakeTestTextFile (MoFEM::Interface &m_field, string field_name, boost::shared_ptr< CommonDataSimpleContact > common_data, ofstream &_my_split)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 

Public Attributes

MoFEM::InterfacemField
 
boost::shared_ptr< CommonDataSimpleContactcommonDataSimpleContact
 
ofstream & mySplit
 

Detailed Description

Examples
mortar_contact.cpp.

Definition at line 2207 of file SimpleContact.hpp.

Constructor & Destructor Documentation

◆ OpMakeTestTextFile()

SimpleContactProblem::OpMakeTestTextFile::OpMakeTestTextFile ( MoFEM::Interface m_field,
string  field_name,
boost::shared_ptr< CommonDataSimpleContact common_data,
ofstream &  _my_split 
)
inline

Definition at line 2213 of file SimpleContact.hpp.

2216  : ContactOp(field_name, UserDataOperator::OPROW, ContactOp::FACESLAVE),
2217  mField(m_field), commonDataSimpleContact(common_data),
2218  mySplit(_my_split) {
2219  mySplit << fixed << setprecision(8);
2220  mySplit << "[0] Lagrange multiplier [1] Gap" << endl;
2221  }

Member Function Documentation

◆ doWork()

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

Definition at line 2369 of file SimpleContact.cpp.

2371  {
2373 
2374  if (type != MBVERTEX)
2376 
2377  int nb_dofs = data.getFieldData().size();
2378  if (nb_dofs == 0)
2380  int nb_gauss_pts = data.getN().size1();
2381 
2382  auto t_gap_ptr = getFTensor0FromVec(*commonDataSimpleContact->gapPtr);
2383 
2384  auto t_lagrange_slave =
2385  getFTensor0FromVec(*commonDataSimpleContact->lagMultAtGaussPtsPtr);
2386  double d_gap;
2387  for (int gg = 0; gg != nb_gauss_pts; ++gg) {
2388  const double d_lambda =
2389  std::abs(t_lagrange_slave) < TOL ? 0.0 : t_lagrange_slave;
2390  d_gap = std::abs(t_gap_ptr) < TOL ? 0.0 : t_gap_ptr;
2391  mySplit << d_lambda << " " << d_gap << " " << std::endl;
2392 
2393  ++t_gap_ptr;
2394  ++t_lagrange_slave;
2395  }
2397 }

Member Data Documentation

◆ commonDataSimpleContact

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

Definition at line 2210 of file SimpleContact.hpp.

◆ mField

MoFEM::Interface& SimpleContactProblem::OpMakeTestTextFile::mField

Definition at line 2209 of file SimpleContact.hpp.

◆ mySplit

ofstream& SimpleContactProblem::OpMakeTestTextFile::mySplit

Definition at line 2211 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
SimpleContactProblem::OpMakeTestTextFile::mySplit
ofstream & mySplit
Definition: SimpleContact.hpp:2211
MoFEM::EntitiesFieldData::EntData::getFieldData
const VectorDouble & getFieldData() const
get dofs values
Definition: EntitiesFieldData.hpp:1254
convert.type
type
Definition: convert.py:64
MoFEM::getFTensor0FromVec
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:135
SimpleContactProblem::OpMakeTestTextFile::commonDataSimpleContact
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact
Definition: SimpleContact.hpp:2210
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
SimpleContactProblem::OpMakeTestTextFile::mField
MoFEM::Interface & mField
Definition: SimpleContact.hpp:2209
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
SimpleContactProblem::TOL
static constexpr double TOL
Definition: SimpleContact.hpp:61
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
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPROW
@ OPROW
operator doWork function is executed on FE rows
Definition: ForcesAndSourcesCore.hpp:567