/[escript]/trunk/paso/src/Functions.h
ViewVC logotype

Annotation of /trunk/paso/src/Functions.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4869 - (hide annotations)
Mon Apr 14 10:39:22 2014 UTC (5 years, 7 months ago) by caltinay
File MIME type: text/plain
File size: 1715 byte(s)
all of paso now lives in its own namespace.

1 gross 1476
2 jfenwick 3981 /*****************************************************************************
3 ksteube 1811 *
4 jfenwick 4657 * Copyright (c) 2003-2014 by University of Queensland
5 jfenwick 3981 * http://www.uq.edu.au
6 ksteube 1811 *
7     * Primary Business: Queensland, Australia
8     * Licensed under the Open Software License version 3.0
9     * http://www.opensource.org/licenses/osl-3.0.php
10     *
11 jfenwick 3981 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 jfenwick 4657 * Development 2012-2013 by School of Earth Sciences
13     * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 jfenwick 3981 *
15     *****************************************************************************/
16 gross 1476
17 ksteube 1811
18 caltinay 4836 #ifndef __PASO_FUNCTIONS_H__
19     #define __PASO_FUNCTIONS_H__
20 gross 1476
21 gross 1804 #include "performance.h"
22 caltinay 4856 #include "SystemMatrix.h"
23 gross 1639
24 caltinay 4856 namespace paso {
25    
26     struct Function
27     {
28     Function(Esys_MPIInfo* mpi_info);
29     virtual ~Function();
30    
31     /// sets value=F(arg)
32 caltinay 4869 virtual err_t call(double* value, const double* arg, Performance* pp) = 0;
33 caltinay 4856
34     /// numerical calculation of the directional derivative J0w of F at x0 in
35     /// the direction w. f0 is the value of F at x0. setoff is workspace
36     err_t derivative(double* J0w, const double* w, const double* f0,
37 caltinay 4869 const double* x0, double* setoff, Performance* pp);
38 caltinay 4856
39     /// returns the length of the vectors used by this function
40     virtual dim_t getLen() = 0;
41    
42     Esys_MPIInfo* mpi_info;
43 gross 1639 };
44    
45 caltinay 4856 struct LinearSystem : public Function
46     {
47     LinearSystem(SystemMatrix_ptr A, double* b, Options* options);
48     virtual ~LinearSystem();
49 gross 1639
50 caltinay 4869 virtual err_t call(double* value, const double* arg, Performance* pp);
51 caltinay 4856
52     virtual dim_t getLen() { return n; }
53    
54     SystemMatrix_ptr mat;
55     double* tmp;
56     double* b;
57 caltinay 4836 dim_t n;
58     };
59 gross 1476
60 caltinay 4856 } // namespace paso
61 gross 1476
62 caltinay 4836 #endif // __PASO_FUNCTIONS_H__
63    

  ViewVC Help
Powered by ViewVC 1.1.26