Serac  0.1
Serac is an implicit thermal strucural mechanics simulation code.
contact_interaction.hpp
Go to the documentation of this file.
1 // Copyright (c) Lawrence Livermore National Security, LLC and
2 // other Serac 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 "serac/serac_config.hpp"
16 
17 #ifdef SERAC_USE_TRIBOL
18 
19 #include <memory>
20 #include <set>
21 
22 #include "mfem.hpp"
23 #include "tribol/common/Parameters.hpp"
24 
28 
29 namespace serac {
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 
117  mfem::ParFiniteElementSpace& pressureSpace() const;
118 
124  void setPressure(const FiniteElementState& pressure) const;
125 
131  int numPressureDofs() const;
132 
138  const mfem::Array<int>& inactiveDofs() const;
139 
146  const mfem::Array<int>& inactiveDofs(const FiniteElementState& pressure) const;
147 
153  void evalJacobian(bool eval) const;
154 
155  private:
161  tribol::ContactMethod getMethod() const;
162 
166  int interaction_id_;
167 
171  ContactOptions contact_opts_;
172 
176  const mfem::ParGridFunction& current_coords_;
177 
181  mutable mfem::Array<int> inactive_tdofs_;
182 };
183 
184 } // namespace serac
185 
186 #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: serac.cpp:36
ContactMethod
Methodology for enforcing contact constraints (i.e. how you form the constraint equations)