G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsElasticityAssembler.h
Go to the documentation of this file.
1 
16 #pragma once
17 
21 
22 namespace gismo
23 {
24 
30 template <class T>
32 {
33 public:
34  typedef gsBaseAssembler<T> Base;
35 
38  const gsMultiBasis<T> & basis,
39  const gsBoundaryConditions<T> & bconditions,
40  const gsFunction<T> & body_force);
41 
43  gsElasticityAssembler(const gsMultiPatch<T> & patches,
44  const gsMultiBasis<T> & basisDisp,
45  const gsMultiBasis<T> & basisPres,
46  const gsBoundaryConditions<T> & bconditions,
47  const gsFunction<T> & body_force);
48 
51 
53  virtual void refresh();
54 
55  //--------------------- SYSTEM ASSEMBLY ----------------------------------//
56 
59  virtual void assemble(bool saveEliminationMatrix = false);
60 
64  virtual bool assemble(const gsMatrix<T> & solutionVector,
65  const std::vector<gsMatrix<T> > & fixedDoFs);
66 protected:
70  virtual void assemble(const gsMultiPatch<T> & displacement);
71 
75  virtual void assemble(const gsMultiPatch<T> & displacement, const gsMultiPatch<T> & pressure);
76 
77  //--------------------- SOLUTION CONSTRUCTION ----------------------------------//
78 
79 public:
81  virtual void constructSolution(const gsMatrix<T> & solVector,
82  const std::vector<gsMatrix<T> > & fixedDoFs,
83  gsMultiPatch<T> & displacement) const;
84 
86  virtual void constructSolution(const gsMatrix<T> & solVector,
87  const std::vector<gsMatrix<T> > & fixedDoFs,
88  gsMultiPatch<T> & displacement,
89  gsMultiPatch<T> & pressure) const;
90 
92  virtual void constructPressure(const gsMatrix<T> & solVector,
93  const std::vector<gsMatrix<T> > & fixedDoFs,
94  gsMultiPatch<T> & pressure) const;
95 
96  //--------------------- SPECIALS ----------------------------------//
97 
99  virtual void constructCauchyStresses(const gsMultiPatch<T> & displacement,
100  gsPiecewiseFunction<T> & result,
101  stress_components::components component = stress_components::von_mises) const;
102 
104  virtual void constructCauchyStresses(const gsMultiPatch<T> & displacement,
105  const gsMultiPatch<T> & pressure,
106  gsPiecewiseFunction<T> & result,
107  stress_components::components component = stress_components::von_mises) const;
108 
109 protected:
111  virtual void reserve();
112 
113 protected:
117 
118  using Base::m_pde_ptr;
119  using Base::m_bases;
120  using Base::m_ddof;
121  using Base::m_options;
122  using Base::m_system;
123  using Base::eliminationMatrix;
124 };
125 
126 
127 } // namespace gismo ends
128 
129 #ifndef GISMO_BUILD_LIB
130 #include GISMO_HPP_HEADER(gsElasticityAssembler.hpp)
131 #endif
memory::shared_ptr< gsPde< T > > m_pde_ptr
Definition: gsAssembler.h:276
virtual void constructSolution(const gsMatrix< T > &solVector, const std::vector< gsMatrix< T > > &fixedDoFs, gsMultiPatch< T > &displacement) const
Construct displacement from computed solution vector and fixed degrees of freedom.
Definition: gsElasticityAssembler.hpp:248
#define short_t
Definition: gsConfig.h:35
gsOptionList m_options
Options.
Definition: gsAssembler.h:285
std::vector< gsMultiBasis< T > > m_bases
Definition: gsAssembler.h:282
virtual void refresh()
Refresh routine to set dof-mappers.
Definition: gsElasticityAssembler.hpp:120
A function from a n-dimensional domain to an m-dimensional image.
Definition: gsFunction.h:59
Provides useful classes derived from gsFunction which can be used for visualization or coupling...
Provides several simple utility and naming classes.
virtual void reserve()
a custom reserve function to allocate memory for the sparse matrix
Definition: gsElasticityAssembler.hpp:93
Assembles the stiffness matrix and the right-hand side vector for linear and nonlinear elasticity for...
Definition: gsElasticityAssembler.h:31
virtual void constructCauchyStresses(const gsMultiPatch< T > &displacement, gsPiecewiseFunction< T > &result, stress_components::components component=stress_components::von_mises) const
Construct Cauchy stresses for evaluation or visualization.
Definition: gsElasticityAssembler.hpp:284
const gsMultiPatch< T > & patches() const
Return the multipatch.
Definition: gsAssembler.h:601
Holds a set of patch-wise bases and their topology information.
Definition: gsMultiBasis.h:36
gsElasticityAssembler(const gsMultiPatch< T > &patches, const gsMultiBasis< T > &basis, const gsBoundaryConditions< T > &bconditions, const gsFunction< T > &body_force)
Constructor for displacement formulation.
Definition: gsElasticityAssembler.hpp:36
Base class for assemblers of gsElasticity.
Container class for a set of geometry patches and their topology, that is, the interface connections ...
Definition: gsMultiPatch.h:33
short_t m_dim
Definition: gsElasticityAssembler.h:116
Extends the gsAssembler class by adding functionality necessary for a general nonlinear solver...
Definition: gsALE.h:26
gsSparseSystem< T > m_system
Global sparse linear system.
Definition: gsAssembler.h:290
std::vector< gsMatrix< T > > m_ddof
Definition: gsAssembler.h:295
Class containing a set of boundary conditions.
Definition: gsBoundaryConditions.h:341
static gsOptionList defaultOptions()
Returns the list of default options for assembly.
Definition: gsElasticityAssembler.hpp:80
Class which holds a list of parameters/options, and provides easy access to them. ...
Definition: gsOptionList.h:32
A function depending on an index i, typically referring to a patch/sub-domain. On each patch a differ...
Definition: gsPiecewiseFunction.h:28
virtual void assemble()
Main assemble routine, to be implemented in derived classes.
Definition: gsAssembler.hpp:51
components
Definition: gsBaseUtils.h:111
virtual void constructPressure(const gsMatrix< T > &solVector, const std::vector< gsMatrix< T > > &fixedDoFs, gsMultiPatch< T > &pressure) const
@ brief Construct pressure from computed solution vector
Definition: gsElasticityAssembler.hpp:271