v0.14.0
Loading...
Searching...
No Matches
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 ()
 
auto contactTractionPtr ()
 
auto contactDispPtr ()
 
auto sdfPtr ()
 
auto gradSdfPtr ()
 
auto hessSdfPtr ()
 

Static Public Member Functions

static auto createTotalTraction (MoFEM::Interface &m_field)
 
static auto getFTensor1TotalTraction ()
 
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

Definition at line 76 of file ContactOps.hpp.

76 {
77 return boost::shared_ptr<VectorDouble>(shared_from_this(), &constraintVals);
78 }
VectorDouble constraintVals
Definition: ContactOps.hpp:25

◆ contactDispPtr() [1/2]

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 }
MatrixDouble contactDisp
Definition: ContactOps.hpp:17

◆ contactDispPtr() [2/2]

auto ContactOps::CommonData::contactDispPtr ( )
inline

Definition at line 59 of file ContactOps.hpp.

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

◆ contactTractionPtr() [1/2]

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 }
MatrixDouble contactTraction
Definition: ContactOps.hpp:16

◆ contactTractionPtr() [2/2]

auto ContactOps::CommonData::contactTractionPtr ( )
inline

Definition at line 54 of file ContactOps.hpp.

54 {
55 return boost::shared_ptr<MatrixDouble>(shared_from_this(),
57 }

◆ createTotalTraction() [1/2]

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};
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 }
auto createGhostVector(MPI_Comm comm, PetscInt n, PetscInt N, PetscInt nghost, const PetscInt ghosts[])
Create smart ghost vector.
static SmartPetscObj< Vec > totalTraction
Definition: ContactOps.hpp:28
virtual MPI_Comm & get_comm() const =0
virtual int get_comm_rank() const =0

◆ createTotalTraction() [2/2]

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

Definition at line 29 of file ContactOps.hpp.

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

◆ getFTensor1TotalTraction() [1/2]

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

◆ getFTensor1TotalTraction() [2/2]

static auto ContactOps::CommonData::getFTensor1TotalTraction ( )
inlinestatic

Definition at line 40 of file ContactOps.hpp.

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

◆ gradSdfPtr() [1/2]

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 }
MatrixDouble gradsSdf
Definition: ContactOps.hpp:20

◆ gradSdfPtr() [2/2]

auto ContactOps::CommonData::gradSdfPtr ( )
inline

Definition at line 67 of file ContactOps.hpp.

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

◆ hessSdfPtr() [1/2]

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 }
MatrixDouble hessSdf
Definition: ContactOps.hpp:22

◆ hessSdfPtr() [2/2]

auto ContactOps::CommonData::hessSdfPtr ( )
inline

Definition at line 71 of file ContactOps.hpp.

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

◆ sdfPtr() [1/2]

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 }
VectorDouble sdfVals
size is equal to number of gauss points on element
Definition: ContactOps.hpp:19

◆ sdfPtr() [2/2]

auto ContactOps::CommonData::sdfPtr ( )
inline

Definition at line 63 of file ContactOps.hpp.

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

Member Data Documentation

◆ constraintVals

VectorDouble ContactOps::CommonData::constraintVals

Definition at line 25 of file ContactOps.hpp.

◆ contactDisp

MatrixDouble CommonData::contactDisp
Examples
ContactOps.hpp.

Definition at line 17 of file ContactOps.hpp.

◆ contactTraction

MatrixDouble CommonData::contactTraction
Examples
ContactOps.hpp.

Definition at line 16 of file ContactOps.hpp.

◆ gradsSdf

MatrixDouble 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 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 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 files: