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

Annotation of /trunk/speckley/src/DefaultAssembler2D.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5863 - (hide annotations)
Wed Jan 13 02:25:48 2016 UTC (3 years, 7 months ago) by jfenwick
File MIME type: text/plain
File size: 6187 byte(s)
Copyright dates updated.
\version for doxygen to read

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

  ViewVC Help
Powered by ViewVC 1.1.26