1 |
|
2 |
/******************************************************* |
3 |
* |
4 |
* Copyright (c) 2003-2008 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_SOLVERFCT |
16 |
#define INC_SOLVERFCT |
17 |
|
18 |
#include "SystemMatrix.h" |
19 |
#include "Options.h" |
20 |
#include "performance.h" |
21 |
|
22 |
typedef struct Paso_FCTransportProblem { |
23 |
|
24 |
double theta; |
25 |
double dt_max; |
26 |
bool_t valid_matrices; |
27 |
|
28 |
Paso_SystemMatrix * transport_matrix; |
29 |
Paso_SystemMatrix * mass_matrix; |
30 |
|
31 |
double* u; |
32 |
Paso_Coupler* u_coupler; |
33 |
|
34 |
index_t *main_iptr; |
35 |
Paso_SystemMatrix * iteration_matrix; |
36 |
double* main_diagonal_low_order_transport_matrix; |
37 |
double* lumped_mass_matrix; |
38 |
|
39 |
Paso_MPIInfo *mpi_info; |
40 |
dim_t reference_counter; |
41 |
|
42 |
} Paso_FCTransportProblem; |
43 |
|
44 |
Paso_FCTransportProblem* Paso_FCTransportProblem_getReference(Paso_FCTransportProblem* in); |
45 |
Paso_FCTransportProblem* Paso_FCTransportProblem_alloc(double theta, Paso_SystemMatrixPattern *pattern, int block_size); |
46 |
dim_t Paso_FCTransportProblem_getBlockSize(const Paso_FCTransportProblem* in); |
47 |
double Paso_FCTransportProblem_getSafeTimeStepSize(Paso_FCTransportProblem* in); |
48 |
void Paso_FCTransportProblem_setLowOrderOperator(Paso_FCTransportProblem * fc); |
49 |
Paso_SystemMatrix* Paso_FCTransportProblem_borrowTransportMatrix(Paso_FCTransportProblem* in); |
50 |
Paso_SystemMatrix* Paso_FCTransportProblem_borrowMassMatrix(Paso_FCTransportProblem* in); |
51 |
double* Paso_FCTransportProblem_borrowLumpedMassMatrix(Paso_FCTransportProblem* in); |
52 |
dim_t Paso_FCTransportProblem_getTotalNumRows(Paso_FCTransportProblem* in); |
53 |
void Paso_FCTransportProblem_free(Paso_FCTransportProblem* in); |
54 |
void Paso_FCTransportProblem_reset(Paso_FCTransportProblem* in); |
55 |
void Paso_SolverFCT_solve(Paso_FCTransportProblem* fctp, double* u, double dt, double* source, Paso_Options* options); |
56 |
void Paso_FCTransportProblem_checkinSolution(Paso_FCTransportProblem* in, double* u); |
57 |
void Paso_FCTransportProblem_applyPreAntiDiffusionCorrection(Paso_SystemMatrix *f,const Paso_Coupler* u_coupler); |
58 |
void Paso_SolverFCT_setQs(const Paso_Coupler* u_coupler,double* QN, double* QP, const Paso_SystemMatrix *L); |
59 |
void Paso_FCTransportProblem_setAntiDiffusionFlux(const double dt, const Paso_FCTransportProblem * fc, Paso_SystemMatrix *flux_matrix, const Paso_Coupler* u_coupler); |
60 |
void Paso_FCTransportProblem_setRs(const Paso_SystemMatrix *f,const double* lumped_mass_matrix,const Paso_Coupler* QN,const Paso_Coupler* QP,double* RN,double* RP); |
61 |
void Paso_FCTransportProblem_addCorrectedFluxes(double* f,const Paso_SystemMatrix *flux_matrix,const Paso_Coupler* RN,const Paso_Coupler* RP); |
62 |
|
63 |
void Paso_SolverFCT_setMuPaLuPbQ(double* out, const double* M, const Paso_Coupler* u_coupler, const double a, const Paso_SystemMatrix *L, const double b, const double* Q); |
64 |
Paso_Connector* Paso_FCTransportProblem_borrowConnector(const Paso_FCTransportProblem* in); |
65 |
void Paso_FCT_setUp(Paso_FCTransportProblem* fctp, const double dt, const double *sourceN, const double *sourceP, double* b, double* uTilde, |
66 |
Paso_Coupler* uTilde_coupler, double *QN, Paso_Coupler* QN_coupler, double *QP, Paso_Coupler* QP_coupler, |
67 |
Paso_Options* options, Paso_Performance* pp); |
68 |
#endif /* #ifndef INC_SOLVERFCT */ |