/[escript]/trunk/escript/src/NullDomain.cpp
ViewVC logotype

Annotation of /trunk/escript/src/NullDomain.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 964 - (hide annotations)
Tue Feb 13 05:10:26 2007 UTC (12 years, 8 months ago) by gross
File size: 2482 byte(s)
The set/getRefVal functions of Data objects have been removed (mainly to avoid later problems with MPI).
Moreover, a faster access to the reference id of samples has been introduced. I don't think that anybody will
profit form this at this stage but it will allow a faster dump of data objects.


1 jgs 82 /*
2 elspeth 615 ************************************************************
3     * Copyright 2006 by ACcESS MNRF *
4     * *
5     * http://www.access.edu.au *
6     * Primary Business: Queensland, Australia *
7     * Licensed under the Open Software License version 3.0 *
8     * http://www.opensource.org/licenses/osl-3.0.php *
9     * *
10     ************************************************************
11 jgs 82 */
12    
13 jgs 474 #include "NullDomain.h"
14 jgs 82
15     namespace escript {
16    
17     NullDomain::NullDomain() {
18     }
19    
20     bool NullDomain::isValidFunctionSpaceType(int functionSpaceType) const
21     {
22     //
23     // allow anything
24     return true;
25     }
26 jgs 115
27 jgs 82 std::string NullDomain::getDescription() const
28     {
29     return "NullDomain";
30     }
31    
32     int NullDomain::getContinuousFunctionCode() const
33     {
34     //
35     // return an arbitary value
36     return 1;
37     }
38    
39     int NullDomain::getFunctionCode() const
40     {
41     //
42     // return an arbitary value
43     return 1;
44     }
45    
46     int NullDomain::getFunctionOnBoundaryCode() const
47     {
48     //
49     // return an arbitary value
50     return 1;
51     }
52    
53     int NullDomain::getFunctionOnContactZeroCode() const
54     {
55     //
56     // return an arbitary value
57     return 1;
58     }
59    
60     int NullDomain::getFunctionOnContactOneCode() const
61     {
62     //
63     // return an arbitary value
64     return 1;
65     }
66    
67     int NullDomain::getSolutionCode() const
68     {
69     //
70     // return an arbitary value
71     return 1;
72     }
73    
74     int NullDomain::getReducedSolutionCode() const
75     {
76     //
77     // return an arbitary value
78     return 1;
79     }
80    
81     int NullDomain::getDiracDeltaFunctionCode() const
82     {
83     //
84     // return an arbitary value
85     return 1;
86     }
87    
88     std::pair<int,int> NullDomain::getDataShape(int functionSpaceCode) const
89     {
90     //
91     // return an arbitary value
92     return std::pair<int,int>(1,1);
93     }
94    
95     int NullDomain::getTagFromSampleNo(int functionSpaceType, int sampleNo) const
96     {
97     //
98     // return an arbitary value
99     return 1;
100     }
101 jgs 110
102 gross 964 int referenceID=10;
103    
104     int* NullDomain::borrowSampleReferenceIDs(int functionSpaceType) const
105 jgs 110 {
106     //
107     // return an arbitary value
108 gross 964 return &(referenceID);
109 jgs 110 }
110    
111 jgs 82 int NullDomain::getDim() const
112     {
113     //
114     // return an arbitary value
115     return 1;
116     }
117    
118 jgs 121 bool NullDomain::operator==(const AbstractDomain& other) const
119     {
120     const NullDomain* temp=dynamic_cast<const NullDomain*>(&other);
121     if (temp!=0) {
122     return true;
123     } else {
124     return false;
125     }
126     }
127    
128     bool NullDomain::operator!=(const AbstractDomain& other) const
129     {
130     return(!(*this==other));
131     }
132    
133 jgs 82 } // end of namespace

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26