MBSim

Project Page
newton_method_jacobian_functions.h
1 /* Copyright (C) 2004-2012 MBSim Development Team
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  *
17  * Contact: martin.o.foerg@googlemail.com
18  */
19 
20 #ifndef NUMERICSNEWTONMEHTODFUNCTION_H_
21 #define NUMERICSNEWTONMEHTODFUNCTION_H_
22 
23 #include <mbsim/utils/function.h>
24 
25 #include <fmatvec.h>
26 
27 namespace MBSim {
28 
32  class NewtonJacobianFunction : public Function1<fmatvec::SqrMat, fmatvec::Vec> {
33  public:
38 
39  /*
40  * \brief destructor
41  */
42  virtual ~NewtonJacobianFunction() {
43  }
44 
45  /* GETTER / SETTER*/
46  virtual void setFunction(Function1<fmatvec::Vec, fmatvec::Vec> * function_) {
47  function = function_;
48  }
49  /*****************/
50 
51  /*INHERITED INTERFACE*/
52  virtual fmatvec::SqrMat operator ()(const fmatvec::Vec & x, const void* = NULL) = 0;
53  /*********************/
54 
55  protected:
57  };
58 
63  public:
68 
69  /*
70  * \brief destructor
71  */
73  }
74 
75  /*INHERITED INTERFACE*/
76  virtual fmatvec::SqrMat operator ()(const fmatvec::Vec & x, const void* = NULL);
77 
78 
79  };
80 
87  public:
92 
93  /*
94  * \brief destructor
95  */
97  }
98 
99  /*INHERITED INTERFACE*/
100  virtual fmatvec::SqrMat operator ()(const fmatvec::Vec & x, Function1<fmatvec::Vec, fmatvec::Vec> * function);
101 
102  };
103 
110  public:
115 
116  /*
117  * \brief destructor
118  */
119  virtual ~FixpointNewtonJacobianFunction() {
120  }
121 
122  /*INHERITED INTERFACE*/
123  virtual fmatvec::SqrMat operator ()(const fmatvec::Vec & x, Function1<fmatvec::Vec, fmatvec::Vec> * function);
124  };
125 }
126 #endif // NUMERICSNEWTONMEHTODFUNCTION_H_