G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsElasticityAssembler.h
Go to the documentation of this file.
1
16#pragma once
17
21
22namespace gismo
23{
24
30template <class T>
32{
33public:
35
38 const gsMultiBasis<T> & basis,
39 const gsBoundaryConditions<T> & bconditions,
40 const gsFunction<T> & body_force);
41
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
60 virtual void assemble(bool saveEliminationMatrix);
61
62 virtual void assemble() { assemble(false); };
64
68 virtual bool assemble(const gsMatrix<T> & solutionVector,
69 const std::vector<gsMatrix<T> > & fixedDoFs);
70protected:
74 virtual void assemble(const gsMultiPatch<T> & displacement);
75
79 virtual void assemble(const gsMultiPatch<T> & displacement, const gsMultiPatch<T> & pressure);
80
81 using Base::assemble;
82
83 //--------------------- SOLUTION CONSTRUCTION ----------------------------------//
84
85public:
86
88
90 virtual void constructSolution(const gsMatrix<T> & solVector,
91 const std::vector<gsMatrix<T> > & fixedDoFs,
92 gsMultiPatch<T> & displacement) const;
93
95 virtual void constructSolution(const gsMatrix<T> & solVector,
96 const std::vector<gsMatrix<T> > & fixedDoFs,
97 gsMultiPatch<T> & displacement,
98 gsMultiPatch<T> & pressure) const;
99
101 virtual void constructPressure(const gsMatrix<T> & solVector,
102 const std::vector<gsMatrix<T> > & fixedDoFs,
103 gsMultiPatch<T> & pressure) const;
104
105 //--------------------- SPECIALS ----------------------------------//
106
108 virtual void constructCauchyStresses(const gsMultiPatch<T> & displacement,
109 gsPiecewiseFunction<T> & result,
110 stress_components::components component = stress_components::von_mises) const;
111
113 virtual void constructCauchyStresses(const gsMultiPatch<T> & displacement,
114 const gsMultiPatch<T> & pressure,
115 gsPiecewiseFunction<T> & result,
116 stress_components::components component = stress_components::von_mises) const;
117
118protected:
120 virtual void reserve();
121
122protected:
126
127 using Base::m_pde_ptr;
128 using Base::m_bases;
129 using Base::m_ddof;
130 using Base::m_options;
131 using Base::m_system;
132 using Base::eliminationMatrix;
133};
134
135
136} // namespace gismo ends
137
138#ifndef GISMO_BUILD_LIB
139#include GISMO_HPP_HEADER(gsElasticityAssembler.hpp)
140#endif
gsSparseSystem< T > m_system
Global sparse linear system.
Definition gsAssembler.h:290
std::vector< gsMultiBasis< T > > m_bases
Definition gsAssembler.h:282
gsOptionList m_options
Options.
Definition gsAssembler.h:285
memory::shared_ptr< gsPde< T > > m_pde_ptr
Definition gsAssembler.h:276
std::vector< gsMatrix< T > > m_ddof
Definition gsAssembler.h:295
const gsMultiPatch< T > & patches() const
Return the multipatch.
Definition gsAssembler.h:601
Extends the gsAssembler class by adding functionality necessary for a general nonlinear solver....
Definition gsBaseAssembler.h:27
virtual void assemble()
Main assemble routine, to be implemented in derived classes.
Definition gsBaseAssembler.h:40
virtual void constructSolution(const gsMatrix< T > &solVector, const std::vector< gsMatrix< T > > &fixedDDofs, gsMultiPatch< T > &result, const gsVector< index_t > &unknowns) const
Constructs solution as a gsMultiPatch object from the solution vector and fixed DoFs.
Definition gsBaseAssembler.hpp:23
Class containing a set of boundary conditions.
Definition gsBoundaryConditions.h:342
Assembles the stiffness matrix and the right-hand side vector for linear and nonlinear elasticity for...
Definition gsElasticityAssembler.h:32
virtual void reserve()
a custom reserve function to allocate memory for the sparse matrix
Definition gsElasticityAssembler.hpp:93
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
short_t m_dim
Definition gsElasticityAssembler.h:125
virtual void assemble()
Main assemble routine, to be implemented in derived classes.
Definition gsElasticityAssembler.h:62
virtual void refresh()
Refresh routine to set dof-mappers.
Definition gsElasticityAssembler.hpp:120
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
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
static gsOptionList defaultOptions()
Returns the list of default options for assembly.
Definition gsElasticityAssembler.hpp:80
A function from a n-dimensional domain to an m-dimensional image.
Definition gsFunction.h:60
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
Holds a set of patch-wise bases and their topology information.
Definition gsMultiBasis.h:37
Container class for a set of geometry patches and their topology, that is, the interface connections ...
Definition gsMultiPatch.h:100
Class which holds a list of parameters/options, and provides easy access to them.
Definition gsOptionList.h:33
A function depending on an index i, typically referring to a patch/sub-domain. On each patch a differ...
Definition gsPiecewiseFunction.h:29
Base class for assemblers of gsElasticity.
Provides several simple utility and naming classes.
#define short_t
Definition gsConfig.h:35
Provides useful classes derived from gsFunction which can be used for visualization or coupling.
The G+Smo namespace, containing all definitions for the library.
components
Definition gsBaseUtils.h:112