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 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: Linear elasticity equation system
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef NEKTAR_SOLVERS_LINEARELASTICSOLVER_EQUATIONSYSTEMS_LINELASSYSTEM_H
37 #define NEKTAR_SOLVERS_LINEARELASTICSOLVER_EQUATIONSYSTEMS_LINELASSYSTEM_H
38 
41 
42 using namespace Nektar::SolverUtils;
43 
44 namespace Nektar
45 {
46 
47 /**
48  * @brief Base class for linear elastic system.
49  */
51 {
52 public:
53  /// Class may only be instantiated through the MemoryManager.
55 
56  /// Creates an instance of this class
59  {
61  LinearElasticSystem>::AllocateSharedPtr(pSession);
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:
84  const LibUtilities::SessionReaderSharedPtr& pSession);
85 
86  /// Poisson ratio.
88  /// Young's modulus.
90  /// Parameter dictating amount of thermal stress to add.
92  /// Assembly map for the coupled (u,v,w) system.
94  /// Schur complement boundary-boundary matrix.
96  /// Matrix of elemental \f$ B^{-1}D \f$ components
98  /// Matrix of elemental \f$ C \f$ components
100  /// Matrix of elemental \f$ D^{-1} \f$ components
102  /// Boundary maps for each of the fields.
104  /// Interior maps for each of the fields.
106  /// Storage for the temperature terms.
108  /// Storage for the thermal stress terms.
110 
111  virtual void v_InitObject();
112  virtual void v_GenerateSummary(SolverUtils::SummaryList& s);
113  virtual void v_DoSolve();
114  virtual void v_ExtraFldOutput(
115  std::vector<Array<OneD, NekDouble> > &fieldcoeffs,
116  std::vector<std::string> &variables);
117 };
118 
119 }
120 
121 #endif
static EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession)
Creates an instance of this class.
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::vector< std::pair< std::string, std::string > > SummaryList
Definition: Misc.h:47
NekDouble m_nu
Poisson ratio.
boost::shared_ptr< CoupledAssemblyMap > CoupledAssemblyMapSharedPtr
NekDouble m_beta
Parameter dictating amount of thermal stress to add.
DNekScalBlkMatSharedPtr m_BinvD
Matrix of elemental components.
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:50
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.
boost::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.
static std::string className
Name of class.
DNekScalBlkMatSharedPtr m_Dinv
Matrix of elemental components.
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:74
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's modulus.
boost::shared_ptr< Expansion > ExpansionSharedPtr
Definition: Expansion.h:68
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.