GEOS
SolidMechanicsPenaltyContact.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University
7  * Copyright (c) 2018-2020 TotalEnergies
8  * Copyright (c) 2019- GEOSX Contributors
9  * All rights reserved
10  *
11  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
12  * ------------------------------------------------------------------------------------------------------------
13  */
14 
20 #ifndef GEOS_PHYSICSSOLVERS_CONTACT_SOLIDMECHANICSPENALTYCONTACT_HPP_
21 #define GEOS_PHYSICSSOLVERS_CONTACT_SOLIDMECHANICSPENALTYCONTACT_HPP_
22 
23 #include "physicsSolvers/contact/ContactSolverBase.hpp"
24 #include "../../linearAlgebra/DofManager.hpp"
25 #include "../../common/DataTypes.hpp"
26 
27 namespace geos
28 {
29 
30 class SolidMechanicsLagrangianFEM;
31 
33 {
34 public:
35 
36  SolidMechanicsPenaltyContact( const string & name,
37  Group * const parent );
38 
39  ~SolidMechanicsPenaltyContact() override;
40 
45  static string catalogName()
46  {
47  return "SolidMechanicsPenaltyContact";
48  }
52  string getCatalogName() const override { return catalogName(); }
53 
55  static string coupledSolverAttributePrefix() { return "PenaltyContact"; }
56 
57  virtual void
59  DofManager & dofManager,
61  ParallelVector & rhs,
62  ParallelVector & solution,
63  bool const setSparsity = true ) override final;
64 
65  virtual void
66  assembleSystem( real64 const time,
67  real64 const dt,
68  DomainPartition & domain,
69  DofManager const & dofManager,
70  CRSMatrixView< real64, globalIndex const > const & localMatrix,
71  arrayView1d< real64 > const & localRhs ) override;
72 
73  void assembleContact( DomainPartition & domain,
74  DofManager const & dofManager,
75  CRSMatrixView< real64, globalIndex const > const & localMatrix,
76  arrayView1d< real64 > const & localRhs );
77 
78 protected:
79 
80 private:
81 
82  struct viewKeyStruct : ContactSolverBase::viewKeyStruct
83  {
84  constexpr static char const * contactPenaltyStiffnessString() { return "contactPenaltyStiffness"; }
85  };
86 
87  real64 m_contactPenaltyStiffness;
88 };
89 
90 } /* namespace geos */
91 
92 #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.