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 #include "mesh/NodeManager.hpp"
27 
28 namespace geos
29 {
30 
31 class TableFunction;
32 
38 {
39 public:
41  TractionBoundaryCondition( string const & name, Group * parent );
42 
45 
47  virtual ~TractionBoundaryCondition() = default;
48 
51 
54 
57 
60 
61 
66  static string catalogName() { return "Traction"; }
67 
68 
79  void launch( real64 const time,
80  arrayView1d< globalIndex const > const blockLocalDofNumber,
81  globalIndex const dofRankOffset,
82  FaceManager const & faceManager,
84  SortedArrayView< localIndex const > const & targetSet,
85  arrayView1d< real64 > const & localRhs ) const;
86 
94  void reinitScaleSet( FaceManager const & faceManager,
95  SortedArrayView< localIndex const > const & targetSet,
96  arrayView1d< real64 const > const nodalScaleSet );
97 
102  {
104  constexpr static char const * tractionTypeString() { return "tractionType"; }
105 
107  constexpr static char const * inputStressString() { return "inputStress"; }
108 
109 // /// @return The key for the function describing the components of stress.
110 // constexpr static char const * stressFunctionString() { return "stressFunctions"; }
111 
113  constexpr static char const * scaleSetString() { return "scaleSet"; }
114 
116  constexpr static char const * nodalScaleFlagString() { return "nodalScaleFlag"; }
117 
118  };
119 
123  enum class TractionType : integer
124  {
125  vector,
126  normal,
127  stress
128  };
129 
130 protected:
131 
132  virtual void postInputInitialization() override final;
133 
134  virtual void initializePreSubGroups() override final;
135 
138 
141 
144 
147 
148 // /// names of the functions used to specify stress for the generation of tractions.
149 // string_array m_stressFunctionNames;
150 //
151 // bool m_useStressFunctions;
152 //
153 // TableFunction const * m_stressFunctions[6]; // if this line is re-enabled, ensure that those pointers are initialized
154 
155 };
156 
159  "vector",
160  "normal",
161  "stress" );
162 
163 } /* namespace geos */
164 
165 #endif /* GEOS_FIELDSPECIFICATION_TRACTIONBOUNDARYCONDITION_HPP */
The FaceManager class provides an interface to ObjectManagerBase in order to manage face data.
Definition: FaceManager.hpp:44
void reinitScaleSet(FaceManager const &faceManager, SortedArrayView< localIndex const > const &targetSet, arrayView1d< real64 const > const nodalScaleSet)
Reinitialize the nodal set of scaling variable on traction magnitude. One use is to reduce the nodal ...
integer m_nodalScaleFlag
The flag for applying the nodal scale.
virtual ~TractionBoundaryCondition()=default
default destructor
TractionBoundaryCondition & operator=(TractionBoundaryCondition const &)=delete
deleted copy assignment operator
array1d< real64 > m_scaleSet
Array of scale values.
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
void launch(real64 const time, arrayView1d< globalIndex const > const blockLocalDofNumber, globalIndex const dofRankOffset, FaceManager const &faceManager, arrayView2d< real64 const, nodes::REFERENCE_POSITION_USD > const nodePositions, SortedArrayView< localIndex const > const &targetSet, arrayView1d< real64 > const &localRhs) const
Setup and Launche of the traction BC kernel.
TractionType m_tractionType
The type of traction to be applied, i.e. how to generate the traction.
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:179
GEOS_GLOBALINDEX_TYPE globalIndex
Global index type (for indexing objects across MPI partitions).
Definition: DataTypes.hpp:87
double real64
64-bit floating point type.
Definition: DataTypes.hpp:98
LvArray::SortedArrayView< T, localIndex, LvArray::ChaiBuffer > SortedArrayView
A sorted array view of local indices.
Definition: DataTypes.hpp:270
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
Definition: DataTypes.hpp:195
int integer
Signed integer type.
Definition: DataTypes.hpp:81
Array< T, 1 > array1d
Alias for 1D array.
Definition: DataTypes.hpp:175
ENUM_STRINGS(LinearSolverParameters::SolverType, "direct", "cg", "gmres", "fgmres", "bicgstab", "richardson", "preconditioner")
Declare strings associated with enumeration values.