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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3005 - (show annotations)
Thu Apr 22 05:59:31 2010 UTC (9 years, 5 months ago) by gross
File MIME type: text/plain
File size: 3187 byte(s)
early call of setPreconditioner in FCT solver removed.
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_PASOTRANSPORT
16 #define INC_PASOTRANSPORT
17
18 #define DT_FACTOR_MAX 1000.
19
20 #include "SystemMatrix.h"
21 #include "Options.h"
22 #include "performance.h"
23 #include "Paso.h"
24
25 typedef struct Paso_TransportProblem {
26
27 bool_t useBackwardEuler;
28
29 bool_t valid_matrices;
30 /****************** REVISE ****************************/
31 double dt_factor;
32 double dt_max;
33 double constraint_factor;
34 double* constraint_weights;
35 /*****************************************************/
36
37 Paso_SystemMatrix * transport_matrix;
38 Paso_SystemMatrix * mass_matrix;
39
40 Paso_Coupler* u_coupler;
41 Paso_SystemMatrix * iteration_matrix;
42 double* main_diagonal_low_order_transport_matrix;
43 double* lumped_mass_matrix;
44 double* reactive_matrix;
45 double* main_diagonal_mass_matrix;
46
47 Paso_MPIInfo *mpi_info;
48 dim_t reference_counter;
49
50 } Paso_TransportProblem;
51
52
53
54 PASO_DLL_API
55 Paso_TransportProblem* Paso_TransportProblem_getReference(Paso_TransportProblem* in);
56
57 PASO_DLL_API
58 Paso_TransportProblem* Paso_TransportProblem_alloc(bool_t useBackwardEuler, Paso_SystemMatrixPattern *pattern, int block_size);
59
60 PASO_DLL_API
61 dim_t Paso_TransportProblem_getBlockSize(const Paso_TransportProblem* in);
62
63 PASO_DLL_API
64 double Paso_TransportProblem_getSafeTimeStepSize(Paso_TransportProblem* in);
65
66 PASO_DLL_API
67 Paso_SystemMatrix* Paso_TransportProblem_borrowTransportMatrix(Paso_TransportProblem* in);
68
69 PASO_DLL_API
70 Paso_SystemMatrix* Paso_TransportProblem_borrowMassMatrix(Paso_TransportProblem* in);
71
72 PASO_DLL_API
73 void Paso_TransportProblem_solve(Paso_TransportProblem* fctp, double* u, double dt, double* u0, double* q, Paso_Options* options);
74
75 PASO_DLL_API
76 double* Paso_TransportProblem_borrowLumpedMassMatrix(Paso_TransportProblem* in);
77
78 PASO_DLL_API
79 dim_t Paso_TransportProblem_getTotalNumRows(Paso_TransportProblem* in);
80
81 PASO_DLL_API
82 void Paso_TransportProblem_free(Paso_TransportProblem* in);
83
84 PASO_DLL_API
85 void Paso_TransportProblem_reset(Paso_TransportProblem* in);
86
87 PASO_DLL_API
88 Paso_Connector* Paso_TransportProblem_borrowConnector(const Paso_TransportProblem* in);
89
90 PASO_DLL_API
91 index_t Paso_TransportProblem_getTypeId(const index_t solver,const index_t preconditioner, const index_t package,const bool_t symmetry, Paso_MPIInfo *mpi_info);
92
93 PASO_DLL_API
94 void Paso_TransportProblem_insertConstraint(Paso_TransportProblem* fctp, const double* r, double* source);
95
96
97 PASO_DLL_API
98 void Paso_TransportProblem_setUpConstraint(Paso_TransportProblem* fctp, const double* q, const double factor);
99
100 #define Paso_TransportProblem_borrowMainDiagonalPointer(_fct_) Paso_SparseMatrix_borrowMainDiagonalPointer((_fct_)->mass_matrix->mainBlock)
101 #define Paso_Transport_getTheta(_fct_) ( ( (_fct_)->useBackwardEuler ) ? 1. : 0.5 )
102
103 #endif /* #ifndef INC_PASOTRANSPORT */

  ViewVC Help
Powered by ViewVC 1.1.26