1 |
/* |
2 |
****************************************************************************** |
3 |
* * |
4 |
* COPYRIGHT ACcESS 2004 - All Rights Reserved * |
5 |
* * |
6 |
* This software is the property of ACcESS. No part of this code * |
7 |
* may be copied in any form or by any means without the expressed written * |
8 |
* consent of ACcESS. Copying, use or modification of this software * |
9 |
* by any unauthorised person is illegal unless that person has a software * |
10 |
* license agreement with ACcESS. * |
11 |
* * |
12 |
****************************************************************************** |
13 |
*/ |
14 |
|
15 |
#include "NullDomain.h" |
16 |
|
17 |
namespace escript { |
18 |
|
19 |
NullDomain::NullDomain() { |
20 |
} |
21 |
|
22 |
bool NullDomain::isValidFunctionSpaceType(int functionSpaceType) const |
23 |
{ |
24 |
// |
25 |
// allow anything |
26 |
return true; |
27 |
} |
28 |
|
29 |
std::string NullDomain::getDescription() const |
30 |
{ |
31 |
return "NullDomain"; |
32 |
} |
33 |
|
34 |
int NullDomain::getContinuousFunctionCode() const |
35 |
{ |
36 |
// |
37 |
// return an arbitary value |
38 |
return 1; |
39 |
} |
40 |
|
41 |
int NullDomain::getFunctionCode() const |
42 |
{ |
43 |
// |
44 |
// return an arbitary value |
45 |
return 1; |
46 |
} |
47 |
|
48 |
int NullDomain::getFunctionOnBoundaryCode() const |
49 |
{ |
50 |
// |
51 |
// return an arbitary value |
52 |
return 1; |
53 |
} |
54 |
|
55 |
int NullDomain::getFunctionOnContactZeroCode() const |
56 |
{ |
57 |
// |
58 |
// return an arbitary value |
59 |
return 1; |
60 |
} |
61 |
|
62 |
int NullDomain::getFunctionOnContactOneCode() const |
63 |
{ |
64 |
// |
65 |
// return an arbitary value |
66 |
return 1; |
67 |
} |
68 |
|
69 |
int NullDomain::getSolutionCode() const |
70 |
{ |
71 |
// |
72 |
// return an arbitary value |
73 |
return 1; |
74 |
} |
75 |
|
76 |
int NullDomain::getReducedSolutionCode() const |
77 |
{ |
78 |
// |
79 |
// return an arbitary value |
80 |
return 1; |
81 |
} |
82 |
|
83 |
int NullDomain::getDiracDeltaFunctionCode() const |
84 |
{ |
85 |
// |
86 |
// return an arbitary value |
87 |
return 1; |
88 |
} |
89 |
|
90 |
std::pair<int,int> NullDomain::getDataShape(int functionSpaceCode) const |
91 |
{ |
92 |
// |
93 |
// return an arbitary value |
94 |
return std::pair<int,int>(1,1); |
95 |
} |
96 |
|
97 |
int NullDomain::getTagFromSampleNo(int functionSpaceType, int sampleNo) const |
98 |
{ |
99 |
// |
100 |
// return an arbitary value |
101 |
return 1; |
102 |
} |
103 |
|
104 |
int NullDomain::getReferenceNoFromSampleNo(int functionSpaceType, int sampleNo) const |
105 |
{ |
106 |
// |
107 |
// return an arbitary value |
108 |
return 1; |
109 |
} |
110 |
|
111 |
int NullDomain::getDim() const |
112 |
{ |
113 |
// |
114 |
// return an arbitary value |
115 |
return 1; |
116 |
} |
117 |
|
118 |
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 |
} // end of namespace |