SheafSystem  0.0.0.0
field_dof_map.cc
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
18 // Implementation for class field_dof_map
19 
20 #include "SheafSystem/field_dof_map.h"
21 #include "SheafSystem/assert_contract.h"
22 
23 
24 using namespace fiber_bundle; // Workaround for MS C++ bug.
25 
26 // PUBLIC MEMBER FUNCTIONS
27 
29 const std::string&
31 class_name() const
32 {
33  // Preconditions:
34 
35  // Body:
36 
37  const string& result = static_class_name();
38 
39  // Postconditions:
40 
41  ensure(!result.empty());
42 
43  // Exit:
44 
45  return result;
46 }
47 
49 const std::string&
52 {
53  // Preconditions:
54 
55  // Body:
56 
57  static const string result("field_dof_map");
58 
59  // Postconditions:
60 
61  ensure(!result.empty());
62  ensure(result == "field_dof_map");
63 
64  // Exit:
65 
66  return result;
67 }
68 
69 // CANONICAL MEMBERS
70 
71 
75 operator=(const field_dof_map& xother)
76 {
77 
78  // Preconditions:
79 
80  require(xother.is_initialized());
81 
82  // Body:
83 
85 
86  // Postconditions:
87 
88  // Exit
89 
90  return *this;
91 }
92 
93 
97 {
98 
99  // Preconditions:
100 
101 
102  // Body:
103 
104  // Postconditions:
105 
106  // Exit
107 
108  return;
109 }
110 
111 
113 bool
115 invariant() const
116 {
117  bool result = true;
118 
119  // Preconditions:
120 
121  // Body:
122 
123  result = result && section_dof_map::invariant();
124 
125  // Postconditions:
126 
127  // Exit
128 
129  return result;
130 }
131 
132 
133 // MAP INTERFACE
134 
135 
136 
137 // PROTECTED MEMBER FUNCTIONS
138 
139 // CANONICAL MEMBERS
140 
143 {
144 
145  // Preconditions:
146 
147 
148  // Body:
149 
150  // No action required
151 
152  // Postconditions:
153 
154  // Exit
155 
156  return;
157 }
158 
159 
162  : section_dof_map(xother)
163 {
164 
165  // Preconditions:
166 
167  // Body:
168 
169  // Postconditions:
170 
171  // Exit
172 
173  return;
174 }
175 
176 
177 // OTHER CONSTRUCTORS
178 
181  : section_dof_map(xhost, xhost->base().index(), xhost->base().version())
182 {
183 
184  // Preconditions:
185 
186  // Body:
187 
188  // Postconditions:
189 
190  // Exit
191 
192  return;
193 }
The abstract map from section dof ids to section dof values of heterogeneous type.
OBSOLETE: Use array_sec_vd_dof_map or sparse_section_dof_map. The abstract map from section_space_sch...
Definition: field_dof_map.h:48
int version() const
The version of the host of the schema this is defined on.
static const std::string & static_class_name()
The name of this class.
bool is_initialized() const
True if this has been initialized, that is, if the schema has been set and the dof map storage alloca...
virtual const std::string & class_name() const
The name of the actual (possibly derived) class of this instance.
virtual bool invariant() const
The class invariant.
section_dof_map & operator=(const section_dof_map &xother)
Assignment operator.
field_dof_map()
Default constructor.
field_dof_map & operator=(const field_dof_map &xother)
Assignment operator.
virtual bool invariant() const
The class invariant.
Namespace for the fiber_bundles component of the sheaf system.
const scoped_index & index() const
The index of this in host() dof tuple table.
virtual ~field_dof_map()
Destructor.
A handle for a poset whose members are numerical representations of sections of a fiber bundle...
Definition: sec_rep_space.h:61