v0.13.2
Loading...
Searching...
No Matches
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 }
constexpr auto field_name
boost::shared_ptr< CommonDataSimpleContact > commonDataSimpleContact
ContactPrismElementForcesAndSourcesCore::UserDataOperator ContactOp

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}
#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
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
static constexpr double TOL

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: