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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2987 - (hide annotations)
Tue Mar 16 01:32:43 2010 UTC (9 years, 7 months ago) by gross
File MIME type: text/plain
File size: 2922 byte(s)
FCT solver rewritten
1 gross 2987
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    
42     index_t *main_iptr;
43     Paso_SystemMatrix * iteration_matrix;
44     double* main_diagonal_low_order_transport_matrix;
45     double* lumped_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    
67    
68     PASO_DLL_API
69     Paso_SystemMatrix* Paso_TransportProblem_borrowTransportMatrix(Paso_TransportProblem* in);
70    
71     PASO_DLL_API
72     Paso_SystemMatrix* Paso_TransportProblem_borrowMassMatrix(Paso_TransportProblem* in);
73    
74     PASO_DLL_API
75     void Paso_TransportProblem_solve(Paso_TransportProblem* fctp, double* u, double dt, double* u0, double* q, Paso_Options* options);
76    
77     PASO_DLL_API
78     double* Paso_TransportProblem_borrowLumpedMassMatrix(Paso_TransportProblem* in);
79    
80     PASO_DLL_API
81     dim_t Paso_TransportProblem_getTotalNumRows(Paso_TransportProblem* in);
82    
83     PASO_DLL_API
84     void Paso_TransportProblem_free(Paso_TransportProblem* in);
85    
86     PASO_DLL_API
87     void Paso_TransportProblem_reset(Paso_TransportProblem* in);
88    
89     PASO_DLL_API
90     Paso_Connector* Paso_TransportProblem_borrowConnector(const Paso_TransportProblem* in);
91    
92     PASO_DLL_API
93     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);
94    
95     PASO_DLL_API
96     void Paso_TransportProblem_insertConstraint(Paso_TransportProblem* fctp, const double* r, double* source);
97    
98    
99     PASO_DLL_API
100     void Paso_TransportProblem_setUpConstraint(Paso_TransportProblem* fctp, const double* q, const double factor);
101    
102    
103     #endif /* #ifndef INC_PASOTRANSPORT */

  ViewVC Help
Powered by ViewVC 1.1.26