G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsAPALMBase.h
Go to the documentation of this file.
1 
14 #pragma once
15 
16 #include <gsCore/gsLinearAlgebra.h>
17 #include <gsIO/gsOptionList.h>
19 
20 namespace gismo
21 {
22 
23 template<class T, class solution_t>
24 class gsAPALMBase
25 {
26 
27 public:
28 
29  virtual ~gsAPALMBase() { }
30 
36  gsAPALMBase( gsALMBase<T> * ALM,
37  const gsAPALMData<T,solution_t> & Data);
38 
39  gsAPALMBase() {};
40 
41 private:
42 
43  virtual void _defaultOptions();
44 
45  virtual void _getOptions();
46 
47 public:
48  virtual void initialize();
49 
50  virtual void serialSolve(index_t Nsteps = 10);
51  virtual void parallelSolve();
52 
53  virtual void serialStepOutput(const gsVector<T> & U, const T & L) {};
54  virtual void parallelStepOutput(const gsVector<T> & U, const T & L) {};
55 
56  gsOptionList & options() { return m_options; }
57 
58  std::vector<solution_t> getSolutions() { return m_solutions; }
59  std::vector<T> getTimes() { return m_times; }
60  gsAPALMData<T,solution_t> getHierarchy() { return m_data; }
61 
62 protected:
63 
64  std::vector<solution_t> m_solutions;
65  std::vector<T> m_times;
66 
67  gsALMBase<T> * m_ALM;
68  gsAPALMData<T,solution_t> m_data;
69 
70  bool m_verbose;
71 
72  gsOptionList m_options;
73 };
74 
75 }
76 
77 #ifndef GISMO_BUILD_LIB
78 #include GISMO_HPP_HEADER(gsAPALMBase.hpp)
79 #endif
#define index_t
Definition: gsConfig.h:32
Provides a list of labeled parameters/options that can be set and accessed easily.
Base class to perform the arc length method to solve a nonlinear equation system. ...
This is the main header file that collects wrappers of Eigen for linear algebra.