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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2197 - (show annotations)
Thu Jan 8 05:49:16 2009 UTC (10 years, 3 months ago) by gross
File MIME type: text/plain
File size: 4322 byte(s)
modifications to the way cosntraints are handeled in the Transport problem


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 #define DT_FACTOR_MAX 1000.
19
20 #include "SystemMatrix.h"
21 #include "Options.h"
22 #include "performance.h"
23
24 typedef struct Paso_FCTransportProblem {
25
26 double theta;
27 double dt_max;
28 bool_t valid_matrices;
29 double dt_factor; /* = MIN(1/(1-theta),DT_FACTOR_MAX) */
30
31 Paso_SystemMatrix * transport_matrix;
32 Paso_SystemMatrix * mass_matrix;
33
34 double constraint_factor;
35 double* constraint_weights;
36
37 double* u;
38 Paso_Coupler* u_coupler;
39
40 index_t *main_iptr;
41 Paso_SystemMatrix * iteration_matrix;
42 double* main_diagonal_low_order_transport_matrix;
43 double* lumped_mass_matrix;
44
45 Paso_MPIInfo *mpi_info;
46 dim_t reference_counter;
47
48 } Paso_FCTransportProblem;
49
50
51
52 PASO_DLL_API
53 Paso_FCTransportProblem* Paso_FCTransportProblem_getReference(Paso_FCTransportProblem* in);
54
55 PASO_DLL_API
56 Paso_FCTransportProblem* Paso_FCTransportProblem_alloc(double theta, Paso_SystemMatrixPattern *pattern, int block_size);
57
58 PASO_DLL_API
59 dim_t Paso_FCTransportProblem_getBlockSize(const Paso_FCTransportProblem* in);
60
61 PASO_DLL_API
62 double Paso_FCTransportProblem_getSafeTimeStepSize(Paso_FCTransportProblem* in);
63
64 PASO_DLL_API
65 void Paso_FCTransportProblem_setLowOrderOperator(Paso_FCTransportProblem * fc);
66
67 PASO_DLL_API
68 Paso_SystemMatrix* Paso_FCTransportProblem_borrowTransportMatrix(Paso_FCTransportProblem* in);
69
70 PASO_DLL_API
71 Paso_SystemMatrix* Paso_FCTransportProblem_borrowMassMatrix(Paso_FCTransportProblem* in);
72
73 PASO_DLL_API
74 double* Paso_FCTransportProblem_borrowLumpedMassMatrix(Paso_FCTransportProblem* in);
75
76 PASO_DLL_API
77 dim_t Paso_FCTransportProblem_getTotalNumRows(Paso_FCTransportProblem* in);
78
79 PASO_DLL_API
80 void Paso_FCTransportProblem_free(Paso_FCTransportProblem* in);
81
82 PASO_DLL_API
83 void Paso_FCTransportProblem_reset(Paso_FCTransportProblem* in);
84
85 PASO_DLL_API
86 void Paso_SolverFCT_solve(Paso_FCTransportProblem* fctp, double* u, double dt, double* source, Paso_Options* options);
87
88 PASO_DLL_API
89 void Paso_FCTransportProblem_checkinSolution(Paso_FCTransportProblem* in, double* u);
90
91 PASO_DLL_API
92 void Paso_FCTransportProblem_applyPreAntiDiffusionCorrection(Paso_SystemMatrix *f,const Paso_Coupler* u_coupler);
93
94 PASO_DLL_API
95 void Paso_SolverFCT_setQs(const Paso_Coupler* u_coupler,double* QN, double* QP, const Paso_SystemMatrix *L);
96
97 PASO_DLL_API
98 void Paso_FCTransportProblem_setAntiDiffusionFlux(const double dt, const Paso_FCTransportProblem * fc, Paso_SystemMatrix *flux_matrix, const Paso_Coupler* u_coupler);
99
100 PASO_DLL_API
101 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);
102
103 PASO_DLL_API
104 void Paso_FCTransportProblem_addCorrectedFluxes(double* f,const Paso_SystemMatrix *flux_matrix,const Paso_Coupler* RN,const Paso_Coupler* RP);
105
106
107 PASO_DLL_API
108 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);
109
110 PASO_DLL_API
111 Paso_Connector* Paso_FCTransportProblem_borrowConnector(const Paso_FCTransportProblem* in);
112
113 PASO_DLL_API
114 void Paso_FCT_setUp(Paso_FCTransportProblem* fctp, const double dt, const double *sourceN, const double *sourceP, double* b, double* uTilde,
115 Paso_Coupler* uTilde_coupler, double *QN, Paso_Coupler* QN_coupler, double *QP, Paso_Coupler* QP_coupler,
116 Paso_Options* options, Paso_Performance* pp);
117
118 PASO_DLL_API
119 index_t Paso_FCTransportProblem_getTypeId(const index_t solver,const index_t preconditioner, const index_t package,const bool_t symmetry);
120
121
122 PASO_DLL_API
123 void Paso_FCTransportProblem_insertConstraint(Paso_FCTransportProblem* fctp, const double* r, double* source);
124
125
126 PASO_DLL_API
127 void Paso_FCTransportProblem_setUpConstraint(Paso_FCTransportProblem* fctp, const double* q, const double factor);
128
129 #endif /* #ifndef INC_SOLVERFCT */

  ViewVC Help
Powered by ViewVC 1.1.26