waves
Basic FE playground
wContact.h
Go to the documentation of this file.
1 #ifndef KATOPTRON_CONTACT_H
2 #define KATOPTRON_CONTACT_H
3 
4 #include "katoptron.h"
5 #include "wGroup.h"
6 #include <vector>
7 #include <string>
8 #include <Eigen/Dense>
9 
10 namespace katoptron
11 {
12 
16 class KATOPTRON_API Contact : public tbox::Group
17 {
18 public:
19  std::string Contact_name;
20  std::vector<tbox::Element *> slave_elems;
21  std::vector<tbox::Element *> master_elems;
22 
23  std::vector<int> slave_boundary_nodes;
24  std::vector<int> master_boundary_nodes;
25 
26  std::vector<int> slave_dirichlet_nodes;
27  std::vector<int> master_dirichlet_nodes;
28 
29  std::vector<int> initially_closed_nodes = {};
30 
31  bool initial_closed = true;
32  bool standard_shape_functions = true;
33  bool is_Signorini = false;
34  bool no_Update = false;
35  bool sticking = false;
36  bool mesh_tying = false;
37 
38  int nb_Lagrange_multipliers = 1;
39 
40  Eigen::Vector3d slave_normal;
41  Eigen::Vector3d master_normal;
42 
43  double dg;
44 
45  double scale = 1.;
46 
47  std::vector<double> dg_vector;
48 
49  Contact(Problem &pbl, int no, std::string _Contact_name, Eigen::Vector3d _slave_normal, double dg = 0.);
50  Contact(Problem &pbl, std::string const &name, std::string _Contact_name, Eigen::Vector3d _slave_normal, double dg = 0.);
51  Contact(Problem &pbl, int no, std::string _Contact_name, Eigen::Vector3d _slave_normal, std::vector<double> _dg);
52  Contact(Problem &pbl, std::string const &name, std::string _Contact_name, Eigen::Vector3d _slave_normal, std::vector<double> _dg);
53 
54  void setMaster(katoptron::Problem &pbl, int no, Eigen::Vector3d _master_normal);
55  void setMaster(katoptron::Problem &pbl, std::string const &name, Eigen::Vector3d _master_normal);
56 
57  void setSlaveBoundary(std::string const &file_name, std::string const &name);
58  void setMasterBoundary(std::string const &file_name, std::string const &name);
59 
60  void setSlaveDirichlet(std::string const &file_name, std::string const &name);
61  void setMasterDirichlet(std::string const &file_name, std::string const &name);
62 
63  void setInitialyClosed();
64  void setInitialyOpen();
65  void setNoUpdate();
66  void setUpdate();
67  void setMeshTying();
68  void setSticking();
69  void setNoSticking();
70  void setStandardShapeFunctions();
71  void setDualShapeFunctions();
72  void setSignoriniContact();
73  void setTwoBodyContact();
74  void setInitiallyClosedNodes(std::vector<double> _initially_closed_nodes);
75  void setScale(double a);
76 
77 #ifndef SWIG
78  virtual void write(std::ostream &out) const;
79 #endif
80 };
81 
82 } // namespace katoptron
83 
84 #endif //KATOPTRON_CONTACT_H
katoptron::Contact::slave_normal
Eigen::Vector3d slave_normal
Definition: wContact.h:40
katoptron::Contact::Contact_name
std::string Contact_name
Definition: wContact.h:19
katoptron::Contact::slave_boundary_nodes
std::vector< int > slave_boundary_nodes
Definition: wContact.h:23
KATOPTRON_API
#define KATOPTRON_API
Definition: katoptron.h:13
katoptron::Contact
Class used to specify in Python the different contact interfaces.
Definition: wContact.h:16
katoptron::Contact::slave_elems
std::vector< tbox::Element * > slave_elems
Definition: wContact.h:20
katoptron
katoptron namespace
Definition: Algebraic.h:18
katoptron::Contact::dg
double dg
Definition: wContact.h:43
katoptron::Contact::master_boundary_nodes
std::vector< int > master_boundary_nodes
Definition: wContact.h:24
katoptron::Contact::slave_dirichlet_nodes
std::vector< int > slave_dirichlet_nodes
Definition: wContact.h:26
katoptron::Contact::dg_vector
std::vector< double > dg_vector
Definition: wContact.h:47
katoptron::Contact::master_dirichlet_nodes
std::vector< int > master_dirichlet_nodes
Definition: wContact.h:27
katoptron::Problem
Class which is used to specify in Python the thermomechanical to solve.
Definition: wProblem.h:19
katoptron::Contact::master_normal
Eigen::Vector3d master_normal
Definition: wContact.h:41
katoptron.h
katoptron::Contact::master_elems
std::vector< tbox::Element * > master_elems
Definition: wContact.h:21