Smith  0.1
Smith is an implicit thermal structural mechanics simulation code.
contact_interaction.hpp
Go to the documentation of this file.
1 // Copyright (c) Lawrence Livermore National Security, LLC and
2 // other Smith Project Developers. See the top-level LICENSE file for
3 // details.
4 //
5 // SPDX-License-Identifier: (BSD-3-Clause)
6 
13 #pragma once
14 
15 #include "smith/smith_config.hpp"
16 
17 #ifdef SMITH_USE_TRIBOL
18 
19 #include <memory>
20 #include <set>
21 
22 #include "mfem.hpp"
23 #include "tribol/common/Parameters.hpp"
24 
28 
29 namespace smith {
30 
39 class ContactInteraction {
40  public:
52  ContactInteraction(int interaction_id, const mfem::ParMesh& mesh, const std::set<int>& bdry_attr_surf1,
53  const std::set<int>& bdry_attr_surf2, const mfem::ParGridFunction& current_coords,
54  ContactOptions contact_opts);
55 
61  int getInteractionId() const { return interaction_id_; }
62 
68  const ContactOptions& getContactOptions() const { return contact_opts_; }
69 
75  FiniteElementDual forces() const;
76 
86  FiniteElementState pressure() const;
87 
97  FiniteElementDual gaps() const;
98 
110  std::unique_ptr<mfem::BlockOperator> jacobian() const;
111 
124  std::unique_ptr<mfem::BlockOperator> jacobianContribution() const;
125 
131  mfem::ParFiniteElementSpace& pressureSpace() const;
132 
138  void setPressure(const FiniteElementState& pressure) const;
139 
145  int numPressureDofs() const;
146 
152  const mfem::Array<int>& inactiveDofs() const;
153 
160  const mfem::Array<int>& inactiveDofs(const FiniteElementState& pressure) const;
161 
167  void evalJacobian(bool eval) const;
168 
169  private:
175  tribol::ContactMethod getMethod() const;
176 
180  int interaction_id_;
181 
185  ContactOptions contact_opts_;
186 
190  const mfem::ParGridFunction& current_coords_;
191 
195  mutable mfem::Array<int> inactive_tdofs_;
196 };
197 
198 } // namespace smith
199 
200 #endif
This file contains enumerations and record types for contact configuration.
This contains a class that represents the dual of a finite element vector space, i....
This file contains the declaration of structure that manages the MFEM objects that make up the state ...
Accelerator functionality.
Definition: smith.cpp:36
ContactMethod
Methodology for enforcing contact constraints (i.e. how you form the constraint equations)