ESScript  Revision_4488
Transport.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15 
16 
17 #ifndef INC_PASOTRANSPORT
18 #define INC_PASOTRANSPORT
19 
20 #define DT_FACTOR_MAX 100000.
21 
22 #include "SystemMatrix.h"
23 #include "Options.h"
24 #include "performance.h"
25 #include "Paso.h"
26 
27 typedef struct Paso_TransportProblem {
28 
30  double dt_max_R; /* safe time step size for reactive part */
31  double dt_max_T; /* safe time step size for transport part */
32  double* constraint_mask;
33 
36 
39  double* lumped_mass_matrix; /* 'relevant' lumped mass matrix is assumed to be positive.
40  values with corresponding constraint_mask>0 value are set to -1
41  to indicate the value infinity */
42  double* reactive_matrix;
44 
47 
49 
50 
51 
54 
57 
60 
63 
66 
69 
71 void Paso_TransportProblem_solve(Paso_TransportProblem* fctp, double* u, double dt, double* u0, double* q, Paso_Options* options);
72 
75 
78 
81 
84 
87 
89 index_t Paso_TransportProblem_getTypeId(const index_t solver,const index_t preconditioner, const index_t package,const bool_t symmetry, Esys_MPIInfo *mpi_info);
90 
92 void Paso_TransportProblem_insertConstraint(Paso_TransportProblem* fctp, const double* r, double* source);
93 
94 
97 
98 #define Paso_TransportProblem_borrowMainDiagonalPointer(_fct_) Paso_SparseMatrix_borrowMainDiagonalPointer((_fct_)->mass_matrix->mainBlock)
99 #define Paso_TransportProblem_getBlockSize(__in__) (__in__)->transport_matrix->row_block_size
100 #define Paso_TransportProblem_borrowConnector(__in__) (__in__)->transport_matrix->pattern->col_connector
101 #define Paso_TransportProblem_borrowTransportMatrix(__in__) (__in__)->transport_matrix
102 #define Paso_TransportProblem_borrowMassMatrix(__in__) (__in__)->mass_matrix
103 #define Paso_TransportProblem_borrowLumpedMassMatrix(__in__) (__in__)->lumped_mass_matrix
104 #define Paso_TransportProblem_getTotalNumRows(__in__) Paso_SystemMatrix_getTotalNumRows((__in__)->transport_matrix)
105 
106 
107 
108 
109 #endif /* #ifndef INC_PASOTRANSPORT */