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 <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 contactDispGradPtr ()
 
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
 
MatrixDouble contactDispGrad
 
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 83 of file ContactOps.hpp.

83  {
84  return boost::shared_ptr<VectorDouble>(shared_from_this(), &constraintVals);
85  }

◆ contactDispGradPtr()

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

Definition at line 66 of file ContactOps.hpp.

66  {
67  return boost::shared_ptr<MatrixDouble>(shared_from_this(),
69  }

◆ contactDispPtr()

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

Definition at line 62 of file ContactOps.hpp.

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

◆ contactTractionPtr()

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

Definition at line 57 of file ContactOps.hpp.

57  {
58  return boost::shared_ptr<MatrixDouble>(shared_from_this(),
60  }

◆ createTotalTraction()

static auto ContactOps::CommonData::createTotalTraction ( MoFEM::Interface m_field)
inlinestatic
Examples
adolc_plasticity.cpp, and ContactOps.hpp.

Definition at line 31 of file ContactOps.hpp.

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

◆ getFTensor1TotalTraction()

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

Definition at line 42 of file ContactOps.hpp.

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

◆ gradSdfPtr()

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

Definition at line 75 of file ContactOps.hpp.

75  {
76  return boost::shared_ptr<MatrixDouble>(shared_from_this(), &gradsSdf);
77  }

◆ hessSdfPtr()

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

Definition at line 79 of file ContactOps.hpp.

79  {
80  return boost::shared_ptr<MatrixDouble>(shared_from_this(), &hessSdf);
81  }

◆ sdfPtr()

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

Definition at line 71 of file ContactOps.hpp.

71  {
72  return boost::shared_ptr<VectorDouble>(shared_from_this(), &sdfVals);
73  }

Member Data Documentation

◆ constraintVals

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

Definition at line 26 of file ContactOps.hpp.

◆ contactDisp

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

Definition at line 17 of file ContactOps.hpp.

◆ contactDispGrad

MatrixDouble ContactOps::CommonData::contactDispGrad
Examples
ContactOps.hpp.

Definition at line 18 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 21 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 23 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 20 of file ContactOps.hpp.

◆ totalTraction

SmartPetscObj< Vec > CommonData::totalTraction
static
Examples
adolc_plasticity.cpp, and ContactOps.hpp.

Definition at line 29 of file ContactOps.hpp.


The documentation for this struct was generated from the following file:
ContactOps::CommonData::constraintVals
VectorDouble constraintVals
Definition: ContactOps.hpp:26
ContactOps::CommonData::contactDisp
MatrixDouble contactDisp
Definition: ContactOps.hpp:17
FTensor::Tensor1
Definition: Tensor1_value.hpp:8
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:609
ContactOps::CommonData::contactDispGrad
MatrixDouble contactDispGrad
Definition: ContactOps.hpp:18
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:179
ContactOps::CommonData::totalTraction
static SmartPetscObj< Vec > totalTraction
Definition: ContactOps.hpp:29
ContactOps::CommonData::hessSdf
MatrixDouble hessSdf
Definition: ContactOps.hpp:23
ContactOps::CommonData::sdfVals
VectorDouble sdfVals
size is equal to number of gauss points on element
Definition: ContactOps.hpp:20
ContactOps::CommonData::gradsSdf
MatrixDouble gradsSdf
Definition: ContactOps.hpp:21
t
constexpr double t
plate stiffness
Definition: plate.cpp:58
ContactOps::CommonData::contactTraction
MatrixDouble contactTraction
Definition: ContactOps.hpp:16