/[escript]/trunk/ripley/src/DefaultAssembler2D.h
ViewVC logotype

Contents of /trunk/ripley/src/DefaultAssembler2D.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5148 - (show annotations)
Mon Sep 15 01:25:23 2014 UTC (4 years, 11 months ago) by caltinay
File MIME type: text/plain
File size: 6215 byte(s)
Merging ripley diagonal storage + CUDA support into trunk.
Options file version has been incremented due to new options
'cuda' and 'nvccflags'.

1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2014 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 2012-2013 by School of Earth Sciences
13 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16 #ifndef __RIPLEY_DEFAULTASSEMBLER2D_H__
17 #define __RIPLEY_DEFAULTASSEMBLER2D_H__
18
19 #include <ripley/Rectangle.h>
20
21 namespace ripley {
22
23
24 class DefaultAssembler2D : public AbstractAssembler
25 {
26 public:
27 DefaultAssembler2D(escript::const_Domain_ptr dom, const double *dx,
28 const dim_t *NX, const dim_t *NE, const dim_t *NN)
29 : AbstractAssembler(),
30 m_dx(dx),
31 m_NX(NX),
32 m_NE(NE),
33 m_NN(NN)
34 {
35 domain = boost::static_pointer_cast<const Rectangle>(dom);
36 }
37
38 ~DefaultAssembler2D() {}
39
40 /* The default RipleyDomain assemblers, with original signatures */
41
42 /// assembles a single PDE into the system matrix 'mat' and the right hand
43 /// side 'rhs'
44 virtual void assemblePDESingle(escript::AbstractSystemMatrix* mat, escript::Data& rhs,
45 const escript::Data& A, const escript::Data& B,
46 const escript::Data& C, const escript::Data& D,
47 const escript::Data& X, const escript::Data& Y) const;
48
49 /// assembles boundary conditions of a single PDE into the system matrix
50 /// 'mat' and the right hand side 'rhs'
51 virtual void assemblePDEBoundarySingle(escript::AbstractSystemMatrix* mat,
52 escript::Data& rhs, const escript::Data& d,
53 const escript::Data& y) const;
54
55 /// assembles a single PDE with reduced order into the system matrix 'mat'
56 /// and the right hand side 'rhs'
57 virtual void assemblePDESingleReduced(escript::AbstractSystemMatrix* mat,
58 escript::Data& rhs, const escript::Data& A, const escript::Data& B,
59 const escript::Data& C, const escript::Data& D,
60 const escript::Data& X, const escript::Data& Y) const;
61
62 /// assembles boundary conditions of a single PDE with reduced order into
63 /// the system matrix 'mat' and the right hand side 'rhs'
64 virtual void assemblePDEBoundarySingleReduced(escript::AbstractSystemMatrix* mat,
65 escript::Data& rhs, const escript::Data& d,
66 const escript::Data& y) const;
67
68 /// assembles a system of PDEs into the system matrix 'mat' and the right
69 /// hand side 'rhs'
70 virtual void assemblePDESystem(escript::AbstractSystemMatrix* mat, escript::Data& rhs,
71 const escript::Data& A, const escript::Data& B,
72 const escript::Data& C, const escript::Data& D,
73 const escript::Data& X, const escript::Data& Y) const;
74
75 /// assembles boundary conditions of a system of PDEs into the system
76 /// matrix 'mat' and the right hand side 'rhs'
77 virtual void assemblePDEBoundarySystem(escript::AbstractSystemMatrix* mat,
78 escript::Data& rhs, const escript::Data& d,
79 const escript::Data& y) const;
80
81 /// assembles a system of PDEs with reduced order into the system matrix
82 /// 'mat' and the right hand side 'rhs'
83 virtual void assemblePDESystemReduced(escript::AbstractSystemMatrix* mat,
84 escript::Data& rhs, const escript::Data& A, const escript::Data& B,
85 const escript::Data& C, const escript::Data& D,
86 const escript::Data& X, const escript::Data& Y) const;
87
88 /// assembles boundary conditions of a system of PDEs with reduced order
89 /// into the system matrix 'mat' and the right hand side 'rhs'
90 virtual void assemblePDEBoundarySystemReduced(escript::AbstractSystemMatrix* mat,
91 escript::Data& rhs, const escript::Data& d,
92 const escript::Data& y) const;
93
94 /* The new interface for assemblers */
95
96 virtual void assemblePDESingle(escript::AbstractSystemMatrix* mat,
97 escript::Data& rhs,
98 const DataMap& coefs) const;
99 virtual void assemblePDEBoundarySingle(escript::AbstractSystemMatrix* mat,
100 escript::Data& rhs,
101 const DataMap& coefs) const;
102 virtual void assemblePDESingleReduced(escript::AbstractSystemMatrix* mat,
103 escript::Data& rhs,
104 const DataMap& coefs) const;
105 virtual void assemblePDEBoundarySingleReduced(
106 escript::AbstractSystemMatrix* mat,
107 escript::Data& rhs,
108 const DataMap& coefs) const;
109 virtual void assemblePDESystem(escript::AbstractSystemMatrix* mat,
110 escript::Data& rhs,
111 const DataMap& coefs) const;
112 virtual void assemblePDEBoundarySystem(escript::AbstractSystemMatrix* mat,
113 escript::Data& rhs,
114 const DataMap& coefs) const;
115 virtual void assemblePDESystemReduced(escript::AbstractSystemMatrix* mat,
116 escript::Data& rhs,
117 const DataMap& coefs) const;
118 virtual void assemblePDEBoundarySystemReduced(
119 escript::AbstractSystemMatrix* mat,
120 escript::Data& rhs,
121 const DataMap& coefs) const;
122
123 virtual void collateFunctionSpaceTypes(std::vector<int>& fsTypes,
124 const DataMap& coefs) const;
125
126 protected:
127 boost::shared_ptr<const Rectangle> domain;
128 const double *m_dx;
129 const dim_t *m_NX;
130 const dim_t *m_NE;
131 const dim_t *m_NN;
132 };
133
134 } // namespace ripley
135
136 #endif // __RIPLEY_DEFAULTASSEMBLER2D_H__
137

  ViewVC Help
Powered by ViewVC 1.1.26