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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6651 - (hide annotations)
Wed Feb 7 02:12:08 2018 UTC (20 months, 1 week ago) by jfenwick
File MIME type: text/plain
File size: 1768 byte(s)
Make everyone sad by touching all the files

Copyright dates update

1 gross 1476
2 jfenwick 3981 /*****************************************************************************
3 ksteube 1811 *
4 jfenwick 6651 * Copyright (c) 2003-2018 by The University of Queensland
5 jfenwick 3981 * http://www.uq.edu.au
6 ksteube 1811 *
7     * Primary Business: Queensland, Australia
8 jfenwick 6112 * Licensed under the Apache License, version 2.0
9     * http://www.apache.org/licenses/LICENSE-2.0
10 ksteube 1811 *
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 caltinay 6001 #include "Paso.h"
22 gross 1804 #include "performance.h"
23 caltinay 4856 #include "SystemMatrix.h"
24 gross 1639
25 caltinay 4856 namespace paso {
26    
27     struct Function
28     {
29 caltinay 5997 Function(const escript::JMPI& mpi_info);
30 caltinay 4856 virtual ~Function();
31    
32     /// sets value=F(arg)
33 caltinay 5962 virtual SolverResult call(double* value, const double* arg, Performance* pp) = 0;
34 caltinay 4856
35     /// numerical calculation of the directional derivative J0w of F at x0 in
36     /// the direction w. f0 is the value of F at x0. setoff is workspace
37 caltinay 5962 SolverResult derivative(double* J0w, const double* w, const double* f0,
38     const double* x0, double* setoff, Performance* pp);
39 caltinay 4856
40     /// returns the length of the vectors used by this function
41     virtual dim_t getLen() = 0;
42    
43 caltinay 5997 const escript::JMPI mpi_info;
44 gross 1639 };
45    
46 caltinay 4856 struct LinearSystem : public Function
47     {
48     LinearSystem(SystemMatrix_ptr A, double* b, Options* options);
49     virtual ~LinearSystem();
50 gross 1639
51 caltinay 5962 virtual SolverResult call(double* value, const double* arg, Performance* pp);
52 caltinay 4856
53     virtual dim_t getLen() { return n; }
54    
55     SystemMatrix_ptr mat;
56     double* tmp;
57     double* b;
58 caltinay 4836 dim_t n;
59     };
60 gross 1476
61 caltinay 4856 } // namespace paso
62 gross 1476
63 caltinay 4836 #endif // __PASO_FUNCTIONS_H__
64    

  ViewVC Help
Powered by ViewVC 1.1.26