G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsStaticComposite.h
Go to the documentation of this file.
1
14#include <typeinfo>
15
17#pragma once
18
19
20namespace gismo
21{
22
30template <class T>
32{
33protected:
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
42public:
43
49 gsStaticComposite( std::vector<gsStaticBase<T> * > solvers )
50 :
51 m_solvers(solvers)
52 {
53 this->defaultOptions();
54 }
55
56public:
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
91protected:
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
Class which holds a list of parameters/options, and provides easy access to them.
Definition gsOptionList.h:33
Base class for static solvers.
Definition gsStaticBase.h:38
virtual gsVector< T > update() const
Access the update.
Definition gsStaticBase.h:98
virtual gsOptionList options() const
Get options.
Definition gsStaticBase.h:92
Static solver using a newton method.
Definition gsStaticComposite.h:32
void setLoad(const T L) override
See gsStaticBase.
Definition gsStaticComposite.hpp:90
void setOptions(gsOptionList &options) override
See gsStaticBase.
Definition gsStaticComposite.hpp:77
void initialize() override
See gsStaticBase.
Definition gsStaticComposite.hpp:50
void defaultOptions() override
See gsStaticBase.
Definition gsStaticComposite.hpp:57
void getOptions() override
See gsStaticBase.
Definition gsStaticComposite.hpp:67
void setDisplacement(const gsVector< T > &displacement) override
See gsStaticBase.
Definition gsStaticComposite.hpp:83
gsStatus solve() override
See gsStaticBase.
Definition gsStaticComposite.hpp:21
gsStaticComposite(std::vector< gsStaticBase< T > * > solvers)
Constructs a new instance.
Definition gsStaticComposite.h:49
void setSolution(const gsVector< T > &displacement, const T L) override
See gsStaticBase.
Definition gsStaticComposite.hpp:97
void setUpdate(const gsVector< T > &update) override
See gsStaticBase.
Definition gsStaticComposite.hpp:104
index_t numDofs() override
See gsStaticBase.
Definition gsStaticComposite.h:86
void reset() override
See gsStaticBase.
Definition gsStaticComposite.hpp:111
A vector with arbitrary coefficient type and fixed or dynamic size.
Definition gsVector.h:37
#define index_t
Definition gsConfig.h:32
Base class for static solvers.
The G+Smo namespace, containing all definitions for the library.
gsStatus
Definition gsStructuralAnalysisTypes.h:21