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

Contents of /trunk/ripley/src/DefaultAssembler3D.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: 6187 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_DEFAULTASSEMBLER3D_H__
17 #define __RIPLEY_DEFAULTASSEMBLER3D_H__
18
19 #include <ripley/Brick.h>
20
21 namespace ripley {
22
23
24 class DefaultAssembler3D : public AbstractAssembler
25 {
26 public:
27 DefaultAssembler3D(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 Brick>(dom);
36 }
37
38 ~DefaultAssembler3D() {}
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,
45 escript::Data& rhs, const escript::Data& A,
46 const escript::Data& B, const escript::Data& C,
47 const escript::Data& D, const escript::Data& X,
48 const escript::Data& Y) const;
49
50 /// assembles boundary conditions of a single PDE into the system matrix
51 /// 'mat' and the right hand side 'rhs'
52 virtual void assemblePDEBoundarySingle(escript::AbstractSystemMatrix* mat,
53 escript::Data& rhs, const escript::Data& d,
54 const escript::Data& y) const;
55
56 /// assembles a single PDE with reduced order into the system matrix 'mat'
57 /// and the right hand side 'rhs'
58 virtual void assemblePDESingleReduced(escript::AbstractSystemMatrix* mat,
59 escript::Data& rhs, const escript::Data& A, const escript::Data& B,
60 const escript::Data& C, const escript::Data& D,
61 const escript::Data& X, const escript::Data& Y) const;
62
63 /// assembles boundary conditions of a single PDE with reduced order into
64 /// the system matrix 'mat' and the right hand side 'rhs'
65 virtual void assemblePDEBoundarySingleReduced(
66 escript::AbstractSystemMatrix* mat,
67 escript::Data& rhs, const escript::Data& d,
68 const escript::Data& y) const;
69
70 /// assembles a system of PDEs into the system matrix 'mat' and the right
71 /// hand side 'rhs'
72 virtual void assemblePDESystem(escript::AbstractSystemMatrix* mat,
73 escript::Data& rhs, const escript::Data& A,
74 const escript::Data& B, const escript::Data& C,
75 const escript::Data& D, const escript::Data& X,
76 const escript::Data& Y) const;
77
78 /// assembles boundary conditions of a system of PDEs into the system
79 /// matrix 'mat' and the right hand side 'rhs'
80 virtual void assemblePDEBoundarySystem(escript::AbstractSystemMatrix* mat,
81 escript::Data& rhs, const escript::Data& d,
82 const escript::Data& y) const;
83
84 /// assembles a system of PDEs with reduced order into the system matrix
85 /// 'mat' and the right hand side 'rhs'
86 virtual void assemblePDESystemReduced(escript::AbstractSystemMatrix* mat,
87 escript::Data& rhs, const escript::Data& A, const escript::Data& B,
88 const escript::Data& C, const escript::Data& D,
89 const escript::Data& X, const escript::Data& Y) const;
90
91 /// assembles boundary conditions of a system of PDEs with reduced order
92 /// into the system matrix 'mat' and the right hand side 'rhs'
93 virtual void assemblePDEBoundarySystemReduced(
94 escript::AbstractSystemMatrix* mat,
95 escript::Data& rhs, const escript::Data& d,
96 const escript::Data& y) const;
97
98 /* The new interface for assemblers */
99
100 virtual void assemblePDESingle(escript::AbstractSystemMatrix* mat,
101 escript::Data& rhs, const DataMap& coefs) const;
102 virtual void assemblePDEBoundarySingle(escript::AbstractSystemMatrix* mat,
103 escript::Data& rhs, const DataMap& coefs) const;
104 virtual void assemblePDESingleReduced(escript::AbstractSystemMatrix* mat,
105 escript::Data& rhs, const DataMap& coefs) const;
106 virtual void assemblePDEBoundarySingleReduced(
107 escript::AbstractSystemMatrix* mat,
108 escript::Data& rhs, const DataMap& coefs) const;
109 virtual void assemblePDESystem(escript::AbstractSystemMatrix* mat,
110 escript::Data& rhs, const DataMap& coefs) const;
111 virtual void assemblePDEBoundarySystem(escript::AbstractSystemMatrix* mat,
112 escript::Data& rhs, const DataMap& coefs) const;
113 virtual void assemblePDESystemReduced(escript::AbstractSystemMatrix* mat,
114 escript::Data& rhs, const DataMap& coefs) const;
115 virtual void assemblePDEBoundarySystemReduced(
116 escript::AbstractSystemMatrix* mat,
117 escript::Data& rhs, const DataMap& coefs) const;
118
119 void collateFunctionSpaceTypes(std::vector<int>& fsTypes,
120 const DataMap& coefs) const;
121
122 protected:
123 boost::shared_ptr<const Brick> domain;
124 const double *m_dx;
125 const dim_t *m_NX;
126 const dim_t *m_NE;
127 const dim_t *m_NN;
128 };
129
130 } // namespace ripley
131
132 #endif // __RIPLEY_DEFAULTASSEMBLER3D_H__
133

  ViewVC Help
Powered by ViewVC 1.1.26