v0.14.0
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ContactOps::CommonData Struct Reference

[Common data] More...

#include <users_modules/tutorials/adv-1/src/ContactOps.hpp>

Inheritance diagram for ContactOps::CommonData:
[legend]
Collaboration diagram for ContactOps::CommonData:
[legend]

Public Member Functions

auto contactTractionPtr ()
 
auto contactDispPtr ()
 
auto sdfPtr ()
 
auto gradSdfPtr ()
 
auto hessSdfPtr ()
 
auto constraintPtr ()
 

Static Public Member Functions

static auto createTotalTraction (MoFEM::Interface &m_field)
 
static auto getFTensor1TotalTraction ()
 

Public Attributes

MatrixDouble contactTraction
 
MatrixDouble contactDisp
 
VectorDouble sdfVals
 size is equal to number of gauss points on element More...
 
MatrixDouble gradsSdf
 
MatrixDouble hessSdf
 
VectorDouble constraintVals
 

Static Public Attributes

static SmartPetscObj< Vec > totalTraction
 

Detailed Description

[Common data]

Definition at line 14 of file ContactOps.hpp.

Member Function Documentation

◆ constraintPtr()

auto ContactOps::CommonData::constraintPtr ( )
inline
Examples
ContactOps.hpp.

Definition at line 76 of file ContactOps.hpp.

76  {
77  return boost::shared_ptr<VectorDouble>(shared_from_this(), &constraintVals);
78  }

◆ contactDispPtr()

auto ContactOps::CommonData::contactDispPtr ( )
inline
Examples
ContactOps.hpp.

Definition at line 60 of file ContactOps.hpp.

60  {
61  return boost::shared_ptr<MatrixDouble>(shared_from_this(), &contactDisp);
62  }

◆ contactTractionPtr()

auto ContactOps::CommonData::contactTractionPtr ( )
inline
Examples
ContactOps.hpp.

Definition at line 55 of file ContactOps.hpp.

55  {
56  return boost::shared_ptr<MatrixDouble>(shared_from_this(),
58  }

◆ createTotalTraction()

static auto ContactOps::CommonData::createTotalTraction ( MoFEM::Interface m_field)
inlinestatic
Examples
ContactOps.hpp.

Definition at line 30 of file ContactOps.hpp.

30  {
31  constexpr int ghosts[] = {0, 1, 2};
33  createGhostVector(m_field.get_comm(),
34 
35  (m_field.get_comm_rank() == 0) ? 3 : 0, 3,
36 
37  (m_field.get_comm_rank() == 0) ? 0 : 3, ghosts);
38  return totalTraction;
39  }

◆ getFTensor1TotalTraction()

static auto ContactOps::CommonData::getFTensor1TotalTraction ( )
inlinestatic
Examples
ContactOps.hpp.

Definition at line 41 of file ContactOps.hpp.

41  {
43  const double *t_ptr;
44  CHK_THROW_MESSAGE(VecGetArrayRead(CommonData::totalTraction, &t_ptr),
45  "get array");
46  FTensor::Tensor1<double, 3> t{t_ptr[0], t_ptr[1], t_ptr[2]};
47  CHK_THROW_MESSAGE(VecRestoreArrayRead(CommonData::totalTraction, &t_ptr),
48  "restore array");
49  return t;
50  } else {
51  return FTensor::Tensor1<double, 3>{0., 0., 0.};
52  }
53  }

◆ gradSdfPtr()

auto ContactOps::CommonData::gradSdfPtr ( )
inline
Examples
ContactOps.hpp.

Definition at line 68 of file ContactOps.hpp.

68  {
69  return boost::shared_ptr<MatrixDouble>(shared_from_this(), &gradsSdf);
70  }

◆ hessSdfPtr()

auto ContactOps::CommonData::hessSdfPtr ( )
inline
Examples
ContactOps.hpp.

Definition at line 72 of file ContactOps.hpp.

72  {
73  return boost::shared_ptr<MatrixDouble>(shared_from_this(), &hessSdf);
74  }

◆ sdfPtr()

auto ContactOps::CommonData::sdfPtr ( )
inline
Examples
ContactOps.hpp.

Definition at line 64 of file ContactOps.hpp.

64  {
65  return boost::shared_ptr<VectorDouble>(shared_from_this(), &sdfVals);
66  }

Member Data Documentation

◆ constraintVals

VectorDouble ContactOps::CommonData::constraintVals
Examples
ContactOps.hpp.

Definition at line 25 of file ContactOps.hpp.

◆ contactDisp

MatrixDouble ContactOps::CommonData::contactDisp
Examples
ContactOps.hpp.

Definition at line 17 of file ContactOps.hpp.

◆ contactTraction

MatrixDouble ContactOps::CommonData::contactTraction
Examples
ContactOps.hpp.

Definition at line 16 of file ContactOps.hpp.

◆ gradsSdf

MatrixDouble ContactOps::CommonData::gradsSdf

nb of rows is equals to dimension, and nb of cols is equals to number of gauss points on element

Examples
ContactOps.hpp.

Definition at line 20 of file ContactOps.hpp.

◆ hessSdf

MatrixDouble ContactOps::CommonData::hessSdf

nb of rows is equals to nb of element of symmetric matrix, and nb of cols is equals to number of gauss points on element

Examples
ContactOps.hpp.

Definition at line 22 of file ContactOps.hpp.

◆ sdfVals

VectorDouble ContactOps::CommonData::sdfVals

size is equal to number of gauss points on element

Examples
ContactOps.hpp.

Definition at line 19 of file ContactOps.hpp.

◆ totalTraction

SmartPetscObj< Vec > CommonData::totalTraction
static
Examples
ContactOps.hpp.

Definition at line 28 of file ContactOps.hpp.


The documentation for this struct was generated from the following file:
ContactOps::CommonData::constraintVals
VectorDouble constraintVals
Definition: ContactOps.hpp:25
ContactOps::CommonData::contactDisp
MatrixDouble contactDisp
Definition: ContactOps.hpp:17
FTensor::Tensor1< double, 3 >
MoFEM::CoreInterface::get_comm
virtual MPI_Comm & get_comm() const =0
CHK_THROW_MESSAGE
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
Definition: definitions.h:596
MoFEM::CoreInterface::get_comm_rank
virtual int get_comm_rank() const =0
MoFEM::createGhostVector
auto createGhostVector(MPI_Comm comm, PetscInt n, PetscInt N, PetscInt nghost, const PetscInt ghosts[])
Create smart ghost vector.
Definition: PetscSmartObj.hpp:175
ContactOps::CommonData::totalTraction
static SmartPetscObj< Vec > totalTraction
Definition: ContactOps.hpp:28
ContactOps::CommonData::hessSdf
MatrixDouble hessSdf
Definition: ContactOps.hpp:22
ContactOps::CommonData::sdfVals
VectorDouble sdfVals
size is equal to number of gauss points on element
Definition: ContactOps.hpp:19
ContactOps::CommonData::gradsSdf
MatrixDouble gradsSdf
Definition: ContactOps.hpp:20
t
constexpr double t
plate stiffness
Definition: plate.cpp:59
ContactOps::CommonData::contactTraction
MatrixDouble contactTraction
Definition: ContactOps.hpp:16