G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsStaticComposite.h
Go to the documentation of this file.
1 
14 #include <typeinfo>
15 
17 #pragma once
18 
19 
20 namespace gismo
21 {
22 
30 template <class T>
32 {
33 protected:
34 
35  typedef gsStaticBase<T> Base;
36 
37  typedef typename Base::Residual_t Residual_t;
38  typedef typename Base::ALResidual_t ALResidual_t;
39  typedef typename Base::Jacobian_t Jacobian_t;
40  typedef typename Base::dJacobian_t dJacobian_t;
41 
42 public:
43 
49  gsStaticComposite( std::vector<gsStaticBase<T> * > solvers )
50  :
51  m_solvers(solvers)
52  {
53  this->defaultOptions();
54  }
55 
56 public:
57 
59  gsStatus solve() override;
60 
62  void initialize() override;
63 
65  void defaultOptions() override;
66 
68  void getOptions() override;
69 
71  void setOptions(gsOptionList & options) override;
72 
74  void setDisplacement(const gsVector<T> & displacement) override;
75 
77  void setLoad(const T L) override;
78 
80  void setSolution(const gsVector<T> & displacement, const T L) override;
81 
83  void setUpdate(const gsVector<T> & update) override;
84 
86  index_t numDofs() override { return m_solvers.front()->numDofs(); }
87 
89  void reset() override;
90 
91 protected:
92 
93  std::vector<gsStaticBase<T> *> m_solvers;
94 
95  using Base::m_U;
96  using Base::m_DeltaU;
97 
98  using Base::m_L;
99 
100  using Base::m_verbose;
101 
102  using Base::m_options;
103 
104  using Base::m_numIterations;
105 
106  // Solver status
107  using Base::m_status;
108 };
109 
110 
111 } // namespace gismo
112 
113 
114 #ifndef GISMO_BUILD_LIB
115 #include GISMO_HPP_HEADER(gsStaticComposite.hpp)
116 #endif
void setLoad(const T L) override
See gsStaticBase.
Definition: gsStaticComposite.hpp:85
gsStatus solve() override
See gsStaticBase.
Definition: gsStaticComposite.hpp:21
Base class for static solvers.
void getOptions() override
See gsStaticBase.
Definition: gsStaticComposite.hpp:62
#define index_t
Definition: gsConfig.h:32
gsStatus
Definition: gsStructuralAnalysisTypes.h:20
void setSolution(const gsVector< T > &displacement, const T L) override
See gsStaticBase.
Definition: gsStaticComposite.hpp:92
void setUpdate(const gsVector< T > &update) override
See gsStaticBase.
Definition: gsStaticComposite.hpp:99
void defaultOptions() override
See gsStaticBase.
Definition: gsStaticComposite.hpp:52
void reset() override
See gsStaticBase.
Definition: gsStaticComposite.hpp:106
gsStaticComposite(std::vector< gsStaticBase< T > * > solvers)
Constructs a new instance.
Definition: gsStaticComposite.h:49
void setOptions(gsOptionList &options) override
See gsStaticBase.
Definition: gsStaticComposite.hpp:72
void setDisplacement(const gsVector< T > &displacement) override
See gsStaticBase.
Definition: gsStaticComposite.hpp:78
virtual gsVector< T > update() const
Access the update.
Definition: gsStaticBase.h:98
Static solver using a newton method.
Definition: gsStaticComposite.h:31
Class which holds a list of parameters/options, and provides easy access to them. ...
Definition: gsOptionList.h:32
virtual gsOptionList options() const
Get options.
Definition: gsStaticBase.h:92
void initialize() override
See gsStaticBase.
Definition: gsStaticComposite.hpp:45
index_t numDofs() override
See gsStaticBase.
Definition: gsStaticComposite.h:86
Base class for static solvers.
Definition: gsStaticBase.h:37