GEOS
SolidMechanicsPenaltyContact.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2024 TotalEnergies
7  * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
8  * Copyright (c) 2023-2024 Chevron
9  * Copyright (c) 2019- GEOS/GEOSX Contributors
10  * All rights reserved
11  *
12  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
13  * ------------------------------------------------------------------------------------------------------------
14  */
15 
21 #ifndef GEOS_PHYSICSSOLVERS_CONTACT_SOLIDMECHANICSPENALTYCONTACT_HPP_
22 #define GEOS_PHYSICSSOLVERS_CONTACT_SOLIDMECHANICSPENALTYCONTACT_HPP_
23 
24 #include "physicsSolvers/contact/ContactSolverBase.hpp"
25 #include "../../linearAlgebra/DofManager.hpp"
26 #include "../../common/DataTypes.hpp"
27 
28 namespace geos
29 {
30 
31 class SolidMechanicsLagrangianFEM;
32 
34 {
35 public:
36 
37  SolidMechanicsPenaltyContact( const string & name,
38  Group * const parent );
39 
40  ~SolidMechanicsPenaltyContact() override;
41 
46  static string catalogName()
47  {
48  return "SolidMechanicsPenaltyContact";
49  }
53  string getCatalogName() const override { return catalogName(); }
54 
56  static string coupledSolverAttributePrefix() { return "PenaltyContact"; }
57 
58  virtual void
60  DofManager & dofManager,
62  ParallelVector & rhs,
63  ParallelVector & solution,
64  bool const setSparsity = true ) override final;
65 
66  virtual void
67  assembleSystem( real64 const time,
68  real64 const dt,
69  DomainPartition & domain,
70  DofManager const & dofManager,
71  CRSMatrixView< real64, globalIndex const > const & localMatrix,
72  arrayView1d< real64 > const & localRhs ) override;
73 
74  void assembleContact( DomainPartition & domain,
75  DofManager const & dofManager,
76  CRSMatrixView< real64, globalIndex const > const & localMatrix,
77  arrayView1d< real64 > const & localRhs );
78 
79 protected:
80 
81 private:
82 
83  struct viewKeyStruct : ContactSolverBase::viewKeyStruct
84  {
85  constexpr static char const * contactPenaltyStiffnessString() { return "contactPenaltyStiffness"; }
86  };
87 
88  real64 m_contactPenaltyStiffness;
89 };
90 
91 } /* namespace geos */
92 
93 #endif /* GEOS_PHYSICSSOLVERS_CONTACT_SOLIDMECHANICSPENALTYCONTACT_HPP_ */
The DoFManager is responsible for allocating global dofs, constructing sparsity patterns,...
Definition: DofManager.hpp:44
Partition of the decomposed physical domain. It also manages the connexion information to its neighbo...
static string coupledSolverAttributePrefix()
String used to form the solverName used to register single-physics solvers in CoupledSolver.
static string catalogName()
name of the node manager in the object catalog
virtual void setupSystem(DomainPartition &domain, DofManager &dofManager, CRSMatrix< real64, globalIndex > &localMatrix, ParallelVector &rhs, ParallelVector &solution, bool const setSparsity=true) override final
Set up the linear system (DOF indices and sparsity patterns)
virtual void assembleSystem(real64 const time, real64 const dt, DomainPartition &domain, DofManager const &dofManager, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs) override
function to assemble the linear system matrix and rhs
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Definition: DataTypes.hpp:180
LvArray::CRSMatrixView< T, COL_INDEX, localIndex const, LvArray::ChaiBuffer > CRSMatrixView
Alias for CRS Matrix View.
Definition: DataTypes.hpp:310
GEOS_GLOBALINDEX_TYPE globalIndex
Global index type (for indexing objects across MPI partitions).
Definition: DataTypes.hpp:88
double real64
64-bit floating point type.
Definition: DataTypes.hpp:99
LvArray::CRSMatrix< T, COL_INDEX, localIndex, LvArray::ChaiBuffer > CRSMatrix
Alias for CRS Matrix class.
Definition: DataTypes.hpp:306
LAInterface::ParallelVector ParallelVector
Alias for ParallelVector.