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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3014 - (show annotations)
Wed Apr 28 04:05:21 2010 UTC (9 years, 3 months ago) by gross
File MIME type: text/plain
File size: 3535 byte(s)
a more stable handling of divergence in the CN or BE
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
16 #define INC_PASOFCT
17
18 #include "Functions.h"
19 #include "Transport.h"
20
21
22 typedef struct Paso_FCTSolver {
23 Paso_TransportProblem* transportproblem;
24 Paso_SystemMatrix *flux_matrix_m;
25 double dt;
26 double* uTilde_n;
27 double* QN_n;
28 double* QP_n;
29 double* RN_m;
30 double* RP_m;
31 Paso_Coupler *QN_n_coupler;
32 Paso_Coupler *QP_n_coupler;
33 Paso_Coupler *RN_m_coupler;
34 Paso_Coupler *RP_m_coupler;
35 Paso_Coupler *uTilde_n_coupler;
36 Paso_Coupler *u_m_coupler;
37 } Paso_FCTSolver;
38
39
40 PASO_DLL_API
41 err_t Paso_FCTSolver_Function_call(Paso_Function * F,double* value, const double* arg, Paso_Performance *pp);
42
43 PASO_DLL_API
44 void Paso_FCTSolver_Function_free(Paso_Function * in);
45
46 PASO_DLL_API
47 Paso_Function* Paso_FCTSolver_Function_alloc(Paso_TransportProblem *tp, Paso_Options* options);
48
49 PASO_DLL_API
50 err_t Paso_FCTSolver_solve(Paso_Function* F, double* u, double dt, Paso_Options* options, Paso_Performance *pp);
51
52 PASO_DLL_API
53 double Paso_FCTSolver_getSafeTimeStepSize(Paso_TransportProblem* fctp);
54
55 PASO_DLL_API
56 void Paso_FCTSolver_applyPreAntiDiffusionCorrection(Paso_SystemMatrix *f,const Paso_Coupler* u_coupler);
57
58 PASO_DLL_API
59 void Paso_FCTSolver_setQs(const Paso_Coupler* u_coupler,double* QN, double* QP, const Paso_SystemMatrix *L);
60
61 PASO_DLL_API
62 void Paso_FCTSolver_setAntiDiffusionFlux(const double dt, const Paso_TransportProblem * fc, Paso_SystemMatrix *flux_matrix, const Paso_Coupler* u_coupler);
63
64 PASO_DLL_API
65 void Paso_FCTSolver_setRs(const Paso_SystemMatrix *f,const double* lumped_mass_matrix,const Paso_Coupler* QN,const Paso_Coupler* QP,double* RN,double* RP);
66
67 PASO_DLL_API
68 void Paso_FCTSolver_addCorrectedFluxes(double* f,const Paso_SystemMatrix *flux_matrix,const Paso_Coupler* RN,const Paso_Coupler* RP);
69
70
71 PASO_DLL_API
72 void Paso_FCTSolver_setMuPaLu(double* out, const double* M, const Paso_Coupler* u_coupler, const double a, const Paso_SystemMatrix *L);
73
74 PASO_DLL_API
75 void Paso_FCTSolver_setLowOrderOperator(Paso_TransportProblem * fc);
76
77 PASO_DLL_API
78 void Paso_FCTSolver_setUp(Paso_TransportProblem* fctp, const double dt, const double *u, double* b, double* uTilde,
79 Paso_Coupler* uTilde_coupler, double *QN, Paso_Coupler* QN_coupler, double *QP, Paso_Coupler* QP_coupler,
80 Paso_Options* options, Paso_Performance* pp);
81
82 PASO_DLL_API
83 err_t Paso_FCTSolver_setUpRightHandSide(Paso_TransportProblem* fctp, const double dt,
84 const double *u_m, Paso_Coupler* u_m_coupler, double * z_m,
85 Paso_SystemMatrix* flux_matrix, Paso_Coupler* uTilde_coupler, const double *b,
86 Paso_Coupler* QN_coupler, Paso_Coupler* QP_coupler,
87 double *RN_m, Paso_Coupler* RN_m_coupler, double* RP_m, Paso_Coupler* RP_m_coupler,
88 Paso_Performance* pp);
89 PASO_DLL_API
90 void Paso_FCTSolver_Function_initialize(const double dt3, Paso_TransportProblem* fctp, Paso_Options* options, Paso_Performance* pp);
91
92 #endif /* #ifndef INC_PASOFCT */

  ViewVC Help
Powered by ViewVC 1.1.26