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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1811 - (show annotations)
Thu Sep 25 23:11:13 2008 UTC (10 years, 10 months ago) by ksteube
File size: 2677 byte(s)
Copyright updated in all files

1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2008 by University of Queensland
5 * Earth Systems Science Computational Center (ESSCC)
6 * http://www.uq.edu.au/esscc
7 *
8 * Primary Business: Queensland, Australia
9 * Licensed under the Open Software License version 3.0
10 * http://www.opensource.org/licenses/osl-3.0.php
11 *
12 *******************************************************/
13
14
15 #include "NullDomain.h"
16
17 namespace escript {
18
19 namespace {
20 int defaultList[1]={0}; // an array to return in borrowListOfTagsInUse();
21 int NullDomainFS=1; // Null domains only support 1 functionspace type.
22 // The choice of =1 as the value is arbitrary
23 }
24
25
26 NullDomain::NullDomain() {
27 }
28
29 bool NullDomain::isValidFunctionSpaceType(int functionSpaceType) const
30 {
31 //
32 // allow anything
33 return true;
34 }
35
36 std::string NullDomain::getDescription() const
37 {
38 return "NullDomain";
39 }
40
41 int NullDomain::getContinuousFunctionCode() const
42 {
43 return NullDomainFS;
44 }
45
46 int NullDomain::getFunctionCode() const
47 {
48 return NullDomainFS;
49 }
50
51 int NullDomain::getFunctionOnBoundaryCode() const
52 {
53 return NullDomainFS;
54 }
55
56 int NullDomain::getFunctionOnContactZeroCode() const
57 {
58 return NullDomainFS;
59 }
60
61 int NullDomain::getFunctionOnContactOneCode() const
62 {
63 return NullDomainFS;
64 }
65
66 int NullDomain::getSolutionCode() const
67 {
68 return NullDomainFS;
69 }
70
71 int NullDomain::getReducedSolutionCode() const
72 {
73 return NullDomainFS;
74 }
75
76 int NullDomain::getDiracDeltaFunctionCode() const
77 {
78 return NullDomainFS;
79 }
80
81 std::pair<int,int> NullDomain::getDataShape(int functionSpaceCode) const
82 {
83 //
84 // return an arbitary value
85 return std::pair<int,int>(1,1);
86 }
87
88 int NullDomain::getTagFromSampleNo(int functionSpaceType, int sampleNo) const
89 {
90 //
91 // return an arbitary value
92 return 1;
93 }
94
95 int referenceID=10;
96
97 int* NullDomain::borrowSampleReferenceIDs(int functionSpaceType) const
98 {
99 //
100 // return an arbitary value
101 return &(referenceID);
102 }
103
104 int NullDomain::getDim() const
105 {
106 //
107 // return an arbitary value
108 return 1;
109 }
110
111 bool NullDomain::operator==(const AbstractDomain& other) const
112 {
113 const NullDomain* temp=dynamic_cast<const NullDomain*>(&other);
114 if (temp!=0) {
115 return true;
116 } else {
117 return false;
118 }
119 }
120
121 bool NullDomain::operator!=(const AbstractDomain& other) const
122 {
123 return(!(*this==other));
124 }
125
126
127
128 bool NullDomain::canTag(int functionSpaceCode) const
129 {
130 return true;
131 }
132
133 int NullDomain::getNumberOfTagsInUse(int functionSpaceCode) const
134 {
135 return 1; // this is not arbitrary. It allows us to report that the default tag is in use
136 }
137
138 int* NullDomain::borrowListOfTagsInUse(int functionSpaceCode) const
139 {
140 return defaultList;
141 }
142
143
144
145 } // end of namespace

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26