/[escript]/branches/pasoc/paso/src/FCT_Solver.h
ViewVC logotype

Contents of /branches/pasoc/paso/src/FCT_Solver.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6562 - (show annotations)
Fri May 12 08:15:37 2017 UTC (5 months, 1 week ago) by jfenwick
File MIME type: text/plain
File size: 2091 byte(s)
little progress
1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2017 by The University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Apache License, version 2.0
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development 2012-2013 by School of Earth Sciences
13 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16
17 #ifndef __PASO_FCTSOLVER_H__
18 #define __PASO_FCTSOLVER_H__
19
20 #include "Transport.h"
21 #include "FluxLimiter.h"
22 #include "Solver.h"
23
24 namespace paso {
25
26 template <class T>
27 PASO_DLL_API
28 struct FCT_Solver
29 {
30 FCT_Solver(const_TransportProblem_ptr<T> tp, Options* options);
31
32 ~FCT_Solver();
33
34 SolverResult update(double* u, double* u_old, Options* options, Performance* pp);
35
36 SolverResult updateNL(double* u, double* u_old, Options* options, Performance* pp);
37
38 SolverResult updateLCN(double* u, double* u_old, Options* options, Performance* pp);
39
40 void initialize(double dt, Options* options, Performance* pp);
41
42 static double getSafeTimeStepSize(const_TransportProblem_ptr<T> tp);
43
44 static void setLowOrderOperator(TransportProblem_ptr<T> tp);
45
46 void setAntiDiffusionFlux_linearCN(SystemMatrix_ptr<T> flux_matrix);
47
48 void setAntiDiffusionFlux_BE(SystemMatrix_ptr<T> flux_matrix);
49
50 void setAntiDiffusionFlux_CN(SystemMatrix_ptr<T> flux_matrix);
51
52 void setMuPaLu(double* out, const_Coupler_ptr<T> coupler, double a);
53
54 inline double getTheta()
55 {
56 return method == PASO_BACKWARD_EULER ? 1. : 0.5;
57 }
58
59 const_TransportProblem_ptr<T> transportproblem;
60 escript::JMPI mpi_info;
61 FCT_FluxLimiter<T>* flux_limiter;
62 index_t method;
63 double omega;
64 double dt;
65 double* b;
66 double* z;
67 double* du;
68 Coupler_ptr<T> u_coupler;
69 Coupler_ptr<T> u_old_coupler; /* last time step */
70 };
71
72
73 } // namespace paso
74
75 #endif // __PASO_FCTSOLVER_H__
76

  ViewVC Help
Powered by ViewVC 1.1.26