ESScript  Revision_
FCT_Solver.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by University of Queensland
5 * http://www.uq.edu.au
6 *
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 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15 
16 
17 #ifndef INC_PASOFCT_SOLVER
18 #define INC_PASOFCT_SOLVER
19 
20 #include "Transport.h"
21 #include "FluxLimiter.h"
22 #include "Solver.h"
23 
24 
25 
26 
27 
28 typedef struct Paso_FCT_Solver {
33  double omega;
34  double dt;
35  double *b;
36  double *z;
37  double *du;
39  Paso_Coupler *u_old_coupler; /* last time step */
40 
42 
45 
48 
50 err_t Paso_FCT_Solver_update(Paso_FCT_Solver *fct_solver, double *u, double *u_old, Paso_Options* options, Paso_Performance *pp) ;
51 
52 
55 
57 err_t Paso_FCT_Solver_updateNL(Paso_FCT_Solver *fct_solver, double* u, double *u_old, Paso_Options* options, Paso_Performance *pp) ;
58 
60 err_t Paso_FCT_Solver_update_LCN(Paso_FCT_Solver *fct_solver, double * u, double *u_old, Paso_Options* options, Paso_Performance *pp) ;
61 
63  const double dt, const Paso_Coupler* u_tilde_coupler,
64  const Paso_Coupler* u_old_coupler);
65 
67  const Paso_TransportProblem* fct,
68  const double dt,
69  const Paso_Coupler* u_coupler,
70  const Paso_Coupler* u_old_coupler);
71 
73  const Paso_TransportProblem* fct,
74  const double dt,
75  const Paso_Coupler* u_coupler,
76  const Paso_Coupler* u_old_coupler);
77 
78 void Paso_FCT_Solver_initialize(const double dt, Paso_FCT_Solver *fct_solver, Paso_Options* options, Paso_Performance* pp) ;
80 void Paso_FCT_Solver_setMuPaLu(double* out, const double* M, const Paso_Coupler* u_coupler, const double a, const Paso_SystemMatrix *L);
81 
82 #define Paso_FCT_Solver_getTheta(_fct_) ( ( (_fct_)->method == PASO_BACKWARD_EULER ) ? 1. : 0.5 )
83 
84 #endif /* #ifndef INC_PASOFCT_SOLVER */
85