GEOS
TractionBoundaryCondition.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_FIELDSPECIFICATION_TRACTIONBOUNDARYCONDITION_HPP
22 #define GEOS_FIELDSPECIFICATION_TRACTIONBOUNDARYCONDITION_HPP
23 
25 #include "mesh/FaceManager.hpp"
26 
27 namespace geos
28 {
29 
30 class TableFunction;
31 
37 {
38 public:
40  TractionBoundaryCondition( string const & name, Group * parent );
41 
44 
46  virtual ~TractionBoundaryCondition() = default;
47 
50 
53 
56 
59 
60 
65  static string catalogName() { return "Traction"; }
66 
67 
77  void launch( real64 const time,
78  arrayView1d< globalIndex const > const blockLocalDofNumber,
79  globalIndex const dofRankOffset,
80  FaceManager const & faceManager,
81  SortedArrayView< localIndex const > const & targetSet,
82  arrayView1d< real64 > const & localRhs ) const;
83 
88  {
90  constexpr static char const * tractionTypeString() { return "tractionType"; }
91 
93  constexpr static char const * inputStressString() { return "inputStress"; }
94 
95 // /// @return The key for the function describing the components of stress.
96 // constexpr static char const * stressFunctionString() { return "stressFunctions"; }
97 
98  };
99 
103  enum class TractionType : integer
104  {
105  vector,
106  normal,
107  stress
108  };
109 
110 protected:
111 
112  virtual void postInputInitialization() override final;
113 
114  virtual void initializePreSubGroups() override final;
115 
118 
121 
122 // /// names of the functions used to specify stress for the generation of tractions.
123 // array1d<string> m_stressFunctionNames;
124 //
125 // bool m_useStressFunctions;
126 //
127 // TableFunction const * m_stressFunctions[6];
128 
129 };
130 
133  "vector",
134  "normal",
135  "stress" );
136 
137 } /* namespace geos */
138 
139 #endif /* GEOS_FIELDSPECIFICATION_TRACTIONBOUNDARYCONDITION_HPP */
The FaceManager class provides an interface to ObjectManagerBase in order to manage face data.
Definition: FaceManager.hpp:44
virtual ~TractionBoundaryCondition()=default
default destructor
TractionBoundaryCondition & operator=(TractionBoundaryCondition const &)=delete
deleted copy assignment operator
TractionBoundaryCondition()=delete
deleted default constructor
TractionBoundaryCondition(TractionBoundaryCondition const &)=delete
deleted copy constructor
TractionBoundaryCondition & operator=(TractionBoundaryCondition &&)=delete
deleted move assignment operator
TractionBoundaryCondition(string const &name, Group *parent)
constructor
TractionType
Type of traction boundary condition.
@ vector
traction is applied to the faces as specified from the scale and direction
@ stress
traction is applied to the faces as specified by the inner product of input stress and face normal
@ normal
traction is applied to the faces as a pressure specified from the product of scale and the outward fa...
static string catalogName()
Static Factory Catalog Functions.
R2SymTensor m_inputStress
single specified value for stress used to generate the traction if m_tractionType == stress.
virtual void postInputInitialization() override final
TractionType m_tractionType
The type of traction to be applied, i.e. how to generate the traction.
void launch(real64 const time, arrayView1d< globalIndex const > const blockLocalDofNumber, globalIndex const dofRankOffset, FaceManager const &faceManager, SortedArrayView< localIndex const > const &targetSet, arrayView1d< real64 > const &localRhs) const
Setup and Launche of the traction BC kernel.
virtual void initializePreSubGroups() override final
Called by Initialize() prior to initializing sub-Groups.
TractionBoundaryCondition(TractionBoundaryCondition &&)=default
defaulted move constructor
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Definition: DataTypes.hpp:180
GEOS_GLOBALINDEX_TYPE globalIndex
Global index type (for indexing objects across MPI partitions).
Definition: DataTypes.hpp:88
ENUM_STRINGS(LinearSolverParameters::SolverType, "direct", "cg", "gmres", "fgmres", "bicgstab", "preconditioner")
Declare strings associated with enumeration values.
double real64
64-bit floating point type.
Definition: DataTypes.hpp:99
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:82
LvArray::SortedArrayView< T, localIndex, LvArray::ChaiBuffer > SortedArrayView
A sorted array view of local indices.
Definition: DataTypes.hpp:271