Nektar++
LinearElasticSystem.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File LinearElasticSystem.h
4 //
5 // For more information, please see: http://www.nektar.info
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // Permission is hereby granted, free of charge, to any person obtaining a
14 // copy of this software and associated documentation files (the "Software"),
15 // to deal in the Software without restriction, including without limitation
16 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 // and/or sell copies of the Software, and to permit persons to whom the
18 // Software is furnished to do so, subject to the following conditions:
19 //
20 // The above copyright notice and this permission notice shall be included
21 // in all copies or substantial portions of the Software.
22 //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 // DEALINGS IN THE SOFTWARE.
30 //
31 // Description: Linear elasticity equation system
32 //
33 ///////////////////////////////////////////////////////////////////////////////
34 
35 #ifndef NEKTAR_SOLVERS_LINEARELASTICSOLVER_EQUATIONSYSTEMS_LINELASSYSTEM_H
36 #define NEKTAR_SOLVERS_LINEARELASTICSOLVER_EQUATIONSYSTEMS_LINELASSYSTEM_H
37 
40 
41 using namespace Nektar::SolverUtils;
42 
43 namespace Nektar
44 {
45 
46 /**
47  * @brief Base class for linear elastic system.
48  */
50 {
51 public:
52  /// Class may only be instantiated through the MemoryManager.
54 
55  /// Creates an instance of this class
59  {
61  LinearElasticSystem>::AllocateSharedPtr(pSession, pGraph);
62  p->InitObject();
63  return p;
64  }
65 
66  /// Name of class
67  static std::string className;
68 
69  void BuildMatrixSystem();
70 
71  void SetStaticCondBlock(
72  const int n,
75 
76  DNekMatSharedPtr BuildLaplacianIJMatrix(
77  const int k1,
78  const int k2,
79  const NekDouble scale,
81 
82 protected:
86 
87  /// Poisson ratio.
89  /// Young's modulus.
91  /// Parameter dictating amount of thermal stress to add.
93  /// Assembly map for the coupled (u,v,w) system.
95  /// Schur complement boundary-boundary matrix.
97  /// Matrix of elemental \f$ B^{-1}D \f$ components
99  /// Matrix of elemental \f$ C \f$ components
101  /// Matrix of elemental \f$ D^{-1} \f$ components
103  /// Boundary maps for each of the fields.
105  /// Interior maps for each of the fields.
107  /// Storage for the temperature terms.
109  /// Storage for the thermal stress terms.
111 
112  virtual void v_InitObject();
113  virtual void v_GenerateSummary(SolverUtils::SummaryList& s);
114  virtual void v_DoSolve();
115  virtual void v_ExtraFldOutput(
116  std::vector<Array<OneD, NekDouble> > &fieldcoeffs,
117  std::vector<std::string> &variables);
118 };
119 
120 }
121 
122 #endif
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:163
A base class for describing how to solve specific equations.
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:73
std::vector< std::pair< std::string, std::string > > SummaryList
Definition: Misc.h:46
NekDouble m_nu
Poisson ratio.
NekDouble m_beta
Parameter dictating amount of thermal stress to add.
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:69
DNekScalBlkMatSharedPtr m_BinvD
Matrix of elemental components.
Array< OneD, Array< OneD, NekDouble > > m_temperature
Storage for the temperature terms.
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_stress
Storage for the thermal stress terms.
Base class for linear elastic system.
std::shared_ptr< CoupledAssemblyMap > CoupledAssemblyMapSharedPtr
static EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Creates an instance of this class.
static std::string className
Name of class.
DNekScalBlkMatSharedPtr m_Dinv
Matrix of elemental components.
double NekDouble
Array< OneD, Array< OneD, unsigned int > > m_imap
Interior maps for each of the fields.
DNekScalBlkMatSharedPtr m_schurCompl
Schur complement boundary-boundary matrix.
DNekScalBlkMatSharedPtr m_C
Matrix of elemental components.
NekDouble m_E
Young&#39;s modulus.
std::shared_ptr< Expansion > ExpansionSharedPtr
Definition: Expansion.h:65
CoupledAssemblyMapSharedPtr m_assemblyMap
Assembly map for the coupled (u,v,w) system.
Array< OneD, Array< OneD, unsigned int > > m_bmap
Boundary maps for each of the fields.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.