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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4856 - (hide annotations)
Wed Apr 9 06:46:55 2014 UTC (5 years, 7 months ago) by caltinay
File MIME type: text/plain
File size: 1805 byte(s)
some mopping in paso

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     #include "Common.h"
22 jfenwick 3259 #include "esysUtils/Esys_MPI.h"
23 gross 1804 #include "performance.h"
24 caltinay 4856 #include "SystemMatrix.h"
25 gross 1639
26 caltinay 4856 namespace paso {
27    
28     struct Function
29     {
30     Function(Esys_MPIInfo* mpi_info);
31     virtual ~Function();
32    
33     /// sets value=F(arg)
34     virtual err_t call(double* value, const double* arg,
35     Paso_Performance* pp) = 0;
36    
37     /// numerical calculation of the directional derivative J0w of F at x0 in
38     /// the direction w. f0 is the value of F at x0. setoff is workspace
39     err_t derivative(double* J0w, const double* w, const double* f0,
40     const double* x0, double* setoff, Paso_Performance* pp);
41    
42     /// returns the length of the vectors used by this function
43     virtual dim_t getLen() = 0;
44    
45     Esys_MPIInfo* mpi_info;
46 gross 1639 };
47    
48 caltinay 4856 struct LinearSystem : public Function
49     {
50     LinearSystem(SystemMatrix_ptr A, double* b, Options* options);
51     virtual ~LinearSystem();
52 gross 1639
53 caltinay 4856 virtual err_t call(double* value, const double* arg, Paso_Performance* pp);
54    
55     virtual dim_t getLen() { return n; }
56    
57     SystemMatrix_ptr mat;
58     double* tmp;
59     double* b;
60 caltinay 4836 dim_t n;
61     };
62 gross 1476
63 caltinay 4856 } // namespace paso
64 gross 1476
65 caltinay 4836 #endif // __PASO_FUNCTIONS_H__
66    

  ViewVC Help
Powered by ViewVC 1.1.26