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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6939 - (hide annotations)
Mon Jan 20 03:37:18 2020 UTC (20 months ago) by uqaeller
File MIME type: text/plain
File size: 1844 byte(s)
Updated the copyright header.


1 gross 1476
2 jfenwick 3981 /*****************************************************************************
3 ksteube 1811 *
4 uqaeller 6939 * Copyright (c) 2003-2020 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 uqaeller 6939 * Development from 2014-2017 by Centre for Geoscience Computing (GeoComp)
14     * Development from 2019 by School of Earth and Environmental Sciences
15     **
16 jfenwick 3981 *****************************************************************************/
17 gross 1476
18 ksteube 1811
19 caltinay 4836 #ifndef __PASO_FUNCTIONS_H__
20     #define __PASO_FUNCTIONS_H__
21 gross 1476
22 caltinay 6001 #include "Paso.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 caltinay 5997 Function(const escript::JMPI& mpi_info);
31 caltinay 4856 virtual ~Function();
32    
33     /// sets value=F(arg)
34 caltinay 5962 virtual SolverResult call(double* value, const double* arg, Performance* pp) = 0;
35 caltinay 4856
36     /// numerical calculation of the directional derivative J0w of F at x0 in
37     /// the direction w. f0 is the value of F at x0. setoff is workspace
38 caltinay 5962 SolverResult derivative(double* J0w, const double* w, const double* f0,
39     const double* x0, double* setoff, Performance* pp);
40 caltinay 4856
41     /// returns the length of the vectors used by this function
42     virtual dim_t getLen() = 0;
43    
44 caltinay 5997 const escript::JMPI mpi_info;
45 gross 1639 };
46    
47 caltinay 4856 struct LinearSystem : public Function
48     {
49     LinearSystem(SystemMatrix_ptr A, double* b, Options* options);
50     virtual ~LinearSystem();
51 gross 1639
52 caltinay 5962 virtual SolverResult call(double* value, const double* arg, Performance* pp);
53 caltinay 4856
54     virtual dim_t getLen() { return n; }
55    
56     SystemMatrix_ptr mat;
57     double* tmp;
58     double* b;
59 caltinay 4836 dim_t n;
60     };
61 gross 1476
62 caltinay 4856 } // namespace paso
63 gross 1476
64 caltinay 4836 #endif // __PASO_FUNCTIONS_H__
65    

  ViewVC Help
Powered by ViewVC 1.1.26