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

Contents of /trunk/paso/src/FCT_Solver.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3793 - (show annotations)
Wed Feb 1 07:39:43 2012 UTC (7 years, 6 months ago) by gross
File MIME type: text/plain
File size: 2844 byte(s)
new implementation of FCT solver with some modifications to the python interface
1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2010 by University of Queensland
5 * Earth Systems Science Computational Center (ESSCC)
6 * http://www.uq.edu.au/esscc
7 *
8 * Primary Business: Queensland, Australia
9 * Licensed under the Open Software License version 3.0
10 * http://www.opensource.org/licenses/osl-3.0.php
11 *
12 *******************************************************/
13
14
15 #ifndef INC_PASOFCT_SOLVER
16 #define INC_PASOFCT_SOLVER
17
18 #include "Transport.h"
19 #include "FluxLimiter.h"
20 #include "Solver.h"
21
22
23
24
25
26 typedef struct Paso_FCT_Solver {
27 Paso_TransportProblem* transportproblem;
28 Esys_MPIInfo *mpi_info;
29 Paso_FCT_FluxLimiter* flux_limiter;
30 index_t method;
31 double omega;
32 double dt;
33 double *b;
34 double *z;
35 double *du;
36 Paso_Coupler *u_coupler;
37 Paso_Coupler *u_old_coupler; /* last time step */
38
39 } Paso_FCT_Solver;
40
41 PASO_DLL_API
42 Paso_FCT_Solver* Paso_FCT_Solver_alloc(Paso_TransportProblem *fctp, Paso_Options* options);
43
44 PASO_DLL_API
45 void Paso_FCT_Solver_free(Paso_FCT_Solver *in);
46
47 PASO_DLL_API
48 err_t Paso_FCT_Solver_update(Paso_FCT_Solver *fct_solver, double *u, double *u_old, Paso_Options* options, Paso_Performance *pp) ;
49
50
51 PASO_DLL_API
52 void Paso_FCT_setLowOrderOperator(Paso_TransportProblem * fc);
53
54 PASO_DLL_API
55 err_t Paso_FCT_Solver_updateNL(Paso_FCT_Solver *fct_solver, double* u, double *u_old, Paso_Options* options, Paso_Performance *pp) ;
56
57 PASO_DLL_API
58 err_t Paso_FCT_Solver_update_LCN(Paso_FCT_Solver *fct_solver, double * u, double *u_old, Paso_Options* options, Paso_Performance *pp) ;
59
60 void Paso_FCT_setAntiDiffusionFlux_linearCN(Paso_SystemMatrix *flux_matrix, const Paso_TransportProblem* fct,
61 const double dt, const Paso_Coupler* u_tilde_coupler,
62 const Paso_Coupler* u_old_coupler);
63
64 void Paso_FCT_setAntiDiffusionFlux_BE(Paso_SystemMatrix *flux_matrix,
65 const Paso_TransportProblem* fct,
66 const double dt,
67 const Paso_Coupler* u_coupler,
68 const Paso_Coupler* u_old_coupler);
69
70 void Paso_FCT_setAntiDiffusionFlux_CN(Paso_SystemMatrix *flux_matrix,
71 const Paso_TransportProblem* fct,
72 const double dt,
73 const Paso_Coupler* u_coupler,
74 const Paso_Coupler* u_old_coupler);
75
76 void Paso_FCT_Solver_initialize(const double dt, Paso_FCT_Solver *fct_solver, Paso_Options* options, Paso_Performance* pp) ;
77 double Paso_FCT_Solver_getSafeTimeStepSize(Paso_TransportProblem* fctp);
78 void Paso_FCT_Solver_setMuPaLu(double* out, const double* M, const Paso_Coupler* u_coupler, const double a, const Paso_SystemMatrix *L);
79
80 #define Paso_FCT_Solver_getTheta(_fct_) ( ( (_fct_)->method == PASO_BACKWARD_EULER ) ? 1. : 0.5 )
81
82 #endif /* #ifndef INC_PASOFCT_SOLVER */
83

  ViewVC Help
Powered by ViewVC 1.1.26