Escript
Revision_4320
Main Page
Namespaces
Classes
Files
File List
File Members
pasowrap
src
TransportProblemAdapter.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
/* This file was extracted from finley's CPPAdapter then modified */
17
18
#if !defined TransportProblemAdapter_H
19
#define TransportProblemAdapter_H
20
#include "
system_dep.h
"
21
22
extern
"C"
{
23
#include "paso/Transport.h"
24
#include "paso/Options.h"
25
}
26
27
#include "
PasoException.h
"
28
29
#include "escript/AbstractTransportProblem.h"
30
#include "escript/Data.h"
31
#include "escript/UtilC.h"
32
33
#include <boost/python/object.hpp>
34
#include <boost/shared_ptr.hpp>
35
#include <boost/python/extract.hpp>
36
37
namespace
paso {
38
39
class
TransportProblemAdapter
:
public
escript::AbstractTransportProblem
{
40
49
public
:
50
56
PASOWRAP_DLL_API
57
TransportProblemAdapter
();
58
63
PASOWRAP_DLL_API
64
TransportProblemAdapter
(
Paso_TransportProblem
* transport_problem,
65
const
int
block_size,
66
const
escript::FunctionSpace
& functionspace);
67
73
PASOWRAP_DLL_API
74
~TransportProblemAdapter
();
75
80
PASOWRAP_DLL_API
81
Paso_TransportProblem
*
getPaso_TransportProblem
()
const
;
82
87
inline
const
escript::AbstractTransportProblem
&
asAbstractTransportProblem
()
const
88
{
89
return
dynamic_cast<
const
escript::AbstractTransportProblem
&
>
(*this);
90
}
91
96
inline
static
const
TransportProblemAdapter&
asTransportProblemAdapter
(
const
AbstractTransportProblem
& transportproblem)
97
{
98
return
dynamic_cast<
const
TransportProblemAdapter&
>
(transportproblem);
99
}
100
104
PASOWRAP_DLL_API
105
virtual
void
resetTransport
()
const
;
106
110
PASOWRAP_DLL_API
111
virtual
double
getSafeTimeStepSize
()
const
;
112
116
PASOWRAP_DLL_API
117
virtual
double
getUnlimitedTimeStepSize
()
const
;
118
124
PASOWRAP_DLL_API
125
static
int
getTransportTypeId
(
const
int
solver,
const
int
preconditioner,
126
const
int
package,
const
bool
symmetry,
Esys_MPIInfo
* mpiInfo);
127
128
protected
:
129
130
private
:
131
136
PASOWRAP_DLL_API
137
virtual
void
setToSolution
(
escript::Data
& out,
escript::Data
& u0,
escript::Data
& source,
const
double
dt, boost::python::object& options)
const
;
138
139
145
PASOWRAP_DLL_API
146
virtual
void
copyConstraint
(
escript::Data
& source,
escript::Data
& q,
escript::Data
& r)
const
;
147
148
149
//
150
// pointer to the externally created transport_problem.
151
//
152
boost::shared_ptr<Paso_TransportProblem>
m_transport_problem
;
153
154
};
155
156
}
// end of namespace
157
#endif
Generated on Fri Mar 15 2013 14:07:51 for Escript by
1.8.1.2