v0.15.0
Loading...
Searching...
No Matches
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
 
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 }
VectorDouble constraintVals

◆ 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 }
MatrixDouble contactDispGrad

◆ 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 }
MatrixDouble contactDisp

◆ 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 }
MatrixDouble contactTraction

◆ createTotalTraction()

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

Definition at line 31 of file ContactOps.hpp.

31 {
32 constexpr int ghosts[] = {0, 1, 2, 3, 4};
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 }
auto createGhostVector(MPI_Comm comm, PetscInt n, PetscInt N, PetscInt nghost, const PetscInt ghosts[])
Create smart ghost vector.
static SmartPetscObj< Vec > totalTraction
virtual MPI_Comm & get_comm() const =0
virtual int get_comm_rank() const =0

◆ 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 }
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
constexpr double t
plate stiffness
Definition plate.cpp:58

◆ 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 }
VectorDouble sdfVals
size is equal to number of gauss points on element

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
ContactOps.hpp, and adolc_plasticity.cpp.

Definition at line 29 of file ContactOps.hpp.


The documentation for this struct was generated from the following file: