MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
forgfact.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/elec/forgfact.h,v 1.20 2017/01/12 14:46:22 masarati Exp $ */
2 /*
3  * MBDyn (C) is a multibody analysis code.
4  * http://www.mbdyn.org
5  *
6  * Copyright (C) 1996-2017
7  *
8  * Pierangelo Masarati <masarati@aero.polimi.it>
9  * Paolo Mantegazza <mantegazza@aero.polimi.it>
10  *
11  * Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
12  * via La Masa, 34 - 20156 Milano, Italy
13  * http://www.aero.polimi.it
14  *
15  * Changing this copyright notice is forbidden.
16  *
17  * This program is free software; you can redistribute it and/or modify
18  * it under the terms of the GNU General Public License as published by
19  * the Free Software Foundation (version 2 of the License).
20  *
21  *
22  * This program is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  * GNU General Public License for more details.
26  *
27  * You should have received a copy of the GNU General Public License
28  * along with this program; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */
31 
32 #ifndef FORGFACT_H
33 #define FORGFACT_H
34 
35 #include <cfloat>
36 #include <cmath>
37 #include <ac/f2c.h>
38 
39 #include <myassert.h>
40 #include <mynewmem.h>
41 
42 
43 /* Takes care of the forgetting factor */
44 
46  protected:
48  public:
50  virtual ~ForgettingFactor(void);
51 
52  virtual void Update(const doublereal* pErr = NULL) = 0;
53  virtual doublereal dGet(void) const = 0;
54 };
55 
56 
58  protected:
60 
61  public:
64 
65  void Update(const doublereal* /* pErr */ = NULL);
66  inline doublereal dGet(void) const;
67 };
68 
69 
71 {
72  return dk;
73 }
74 
75 
77  protected:
80 
85 
87 
92 
97 
98  public:
100  doublereal r, doublereal f,
101  doublereal kr, doublereal kl);
103 
104  void Update(const doublereal* pErr = NULL);
105  inline doublereal dGet(void) const;
106 };
107 
108 
110 {
111  return dk;
112 }
113 
114 
116  protected:
119 
124 
126 
131 
136 
137  public:
139  doublereal r, doublereal f,
140  doublereal kr, doublereal kl);
142 
143  void Update(const doublereal* pErr = NULL);
144  inline doublereal dGet(void) const;
145 };
146 
147 
149 {
150  return dk;
151 }
152 
153 
154 #endif
virtual void Update(const doublereal *pErr=NULL)=0
integer iNumErr
Definition: forgfact.h:47
doublereal dGet(void) const
Definition: forgfact.h:109
doublereal * pdErr
Definition: forgfact.h:127
doublereal * pdErrS
Definition: forgfact.h:89
void Update(const doublereal *=NULL)
Definition: forgfact.cc:65
doublereal dGet(void) const
Definition: forgfact.h:148
ForgettingFactor(integer i)
Definition: forgfact.cc:39
doublereal ** ppdErr
Definition: forgfact.h:128
~ConstForgettingFactor(void)
Definition: forgfact.cc:59
DynamicForgettingFactor(integer n1, integer n2, integer i, doublereal r, doublereal f, doublereal kr, doublereal kl)
Definition: forgfact.cc:71
virtual ~ForgettingFactor(void)
Definition: forgfact.cc:46
~DynamicForgettingFactor(void)
Definition: forgfact.cc:98
virtual doublereal dGet(void) const =0
doublereal * pdErr1S
Definition: forgfact.h:133
void Update(const doublereal *pErr=NULL)
Definition: forgfact.cc:198
void Update(const doublereal *pErr=NULL)
Definition: forgfact.cc:103
doublereal * pdErrM
Definition: forgfact.h:88
doublereal * pdErr2S
Definition: forgfact.h:135
ConstForgettingFactor(doublereal d)
Definition: forgfact.cc:52
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
doublereal * pdErr1M
Definition: forgfact.h:132
doublereal dGet(void) const
Definition: forgfact.h:70
doublereal * pdErr2M
Definition: forgfact.h:134
DynamicForgettingFactor2(integer n1, integer n2, integer i, doublereal r, doublereal f, doublereal kr, doublereal kl)
Definition: forgfact.cc:156