SheafSystem  0.0.0.0
field_factory_2.h
Go to the documentation of this file.
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 
20 
21 #ifndef FIELD_FACTORY_2_H
22 #define FIELD_FACTORY_2_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef ARG_LIST_H
29 #include "SheafSystem/arg_list.h"
30 #endif
31 
32 #ifndef POSET_PATH_H
33 #include "SheafSystem/poset_path.h"
34 #endif
35 
36 #ifndef WSV_BLOCK_H
37 #include "SheafSystem/wsv_block.h"
38 #endif
39 
40 #ifndef FIELD_TRAITS_H
41 #include "SheafSystem/field_traits.h"
42 #endif
43 
44 #ifndef FIELD_AT0_H
45 #include "SheafSystem/field_at0.h"
46 #endif
47 
48 #ifndef FIELD_AT1_H
49 #include "SheafSystem/field_at1.h"
50 #endif
51 
52 #ifndef FIELD_AT2_H
53 #include "SheafSystem/field_at2.h"
54 #endif
55 
56 #ifndef FIELD_AT2_E2_H
57 #include "SheafSystem/field_at2_e2.h"
58 #endif
59 
60 #ifndef FIELD_AT2_E3_H
61 #include "SheafSystem/field_at2_e3.h"
62 #endif
63 
64 #ifndef FIELD_AT3_H
65 #include "SheafSystem/field_at3.h"
66 #endif
67 
68 #ifndef FIELD_AT3_E3_H
69 #include "SheafSystem/field_at3_e3.h"
70 #endif
71 
72 #ifndef FIELD_ATP_H
73 #include "SheafSystem/field_atp.h"
74 #endif
75 
76 #ifndef FIELD_E1_H
77 #include "SheafSystem/field_e1.h"
78 #endif
79 
80 #ifndef FIELD_E1_UNIFORM_H
81 #include "SheafSystem/field_e1_uniform.h"
82 #endif
83 
84 #ifndef FIELD_E2_H
85 #include "SheafSystem/field_e2.h"
86 #endif
87 
88 #ifndef FIELD_E2_UNIFORM_H
89 #include "SheafSystem/field_e2_uniform.h"
90 #endif
91 
92 #ifndef FIELD_E3_H
93 #include "SheafSystem/field_e3.h"
94 #endif
95 
96 #ifndef FIELD_E3_UNIFORM_H
97 #include "SheafSystem/field_e3_uniform.h"
98 #endif
99 
100 #ifndef FIELD_E4_H
101 #include "SheafSystem/field_e4.h"
102 #endif
103 
104 #ifndef FIELD_ED_H
105 #include "SheafSystem/field_ed.h"
106 #endif
107 
108 #ifndef FIELD_JCB_H
109 #include "SheafSystem/field_jcb.h"
110 #endif
111 
112 #ifndef FIELD_JCB_E13_H
113 #include "SheafSystem/field_jcb_e13.h"
114 #endif
115 
116 #ifndef FIELD_JCB_E23_H
117 #include "SheafSystem/field_jcb_e23.h"
118 #endif
119 
120 #ifndef FIELD_JCB_E33_H
121 #include "SheafSystem/field_jcb_e33.h"
122 #endif
123 
124 #ifndef FIELD_JCB_ED_H
125 #include "SheafSystem/field_jcb_ed.h"
126 #endif
127 
128 #ifndef FIELD_MET_H
129 #include "SheafSystem/field_met.h"
130 #endif
131 
132 #ifndef FIELD_MET_E1_H
133 #include "SheafSystem/field_met_e1.h"
134 #endif
135 
136 #ifndef FIELD_MET_E2_H
137 #include "SheafSystem/field_met_e2.h"
138 #endif
139 
140 #ifndef FIELD_MET_E3_H
141 #include "SheafSystem/field_met_e3.h"
142 #endif
143 
144 #ifndef FIELD_MET_ED_H
145 #include "SheafSystem/field_met_ed.h"
146 #endif
147 
148 #ifndef FIELD_ST2_H
149 #include "SheafSystem/field_st2.h"
150 #endif
151 
152 #ifndef FIELD_ST2_E2_H
153 #include "SheafSystem/field_st2_e2.h"
154 #endif
155 
156 #ifndef FIELD_ST2_E3_H
157 #include "SheafSystem/field_st2_e3.h"
158 #endif
159 
160 #ifndef FIELD_ST3_H
161 #include "SheafSystem/field_st3.h"
162 #endif
163 
164 #ifndef FIELD_ST3_E3_H
165 #include "SheafSystem/field_st3_e3.h"
166 #endif
167 
168 #ifndef FIELD_ST4_H
169 #include "SheafSystem/field_st4.h"
170 #endif
171 
172 #ifndef FIELD_ST4_E2_H
173 #include "SheafSystem/field_st4_e2.h"
174 #endif
175 
176 #ifndef FIELD_ST4_E3_H
177 #include "SheafSystem/field_st4_e3.h"
178 #endif
179 
180 #ifndef FIELD_STP_H
181 #include "SheafSystem/field_stp.h"
182 #endif
183 
184 #ifndef FIELD_T2_H
185 #include "SheafSystem/field_t2.h"
186 #endif
187 
188 #ifndef FIELD_T2_E2_H
189 #include "SheafSystem/field_t2_e2.h"
190 #endif
191 
192 #ifndef FIELD_T2_E3_H
193 #include "SheafSystem/field_t2_e3.h"
194 #endif
195 
196 #ifndef FIELD_T3_H
197 #include "SheafSystem/field_t3.h"
198 #endif
199 
200 #ifndef FIELD_T3_E3_H
201 #include "SheafSystem/field_t3_e3.h"
202 #endif
203 
204 #ifndef FIELD_T4_H
205 #include "SheafSystem/field_t4.h"
206 #endif
207 
208 #ifndef FIELD_T4_E2_H
209 #include "SheafSystem/field_t4_e2.h"
210 #endif
211 
212 #ifndef FIELD_T4_E3_H
213 #include "SheafSystem/field_t4_e3.h"
214 #endif
215 
216 #ifndef FIELD_TP_H
217 #include "SheafSystem/field_tp.h"
218 #endif
219 
220 #ifndef VD_FIELD_H
221 #include "SheafSystem/field_vd.h"
222 #endif
223 
224 namespace fiber_bundle
225 {
226 class point_block_1d;
227 class point_block_2d;
228 class point_block_3d;
229 class fiber_bundles_namespace;
230 class structured_block_1d;
231 class structured_block_2d;
232 class structured_block_3d;
233 class unstructured_block;
234 }
235 
236 namespace fields
237 {
238 
239 using namespace fiber_bundle;
240 
241 
247 template <typename coord_type, typename prop_type, typename base_type>
248 class SHEAF_DLL_SPEC field_factory_2
249 {
250 
251  //===========================================================================
253  //===========================================================================
255 
256 public:
257 
262 
266  field_factory_2();
267 
271  virtual ~field_factory_2();
272 
279  field_type* new_field(fiber_bundles_namespace& xns,
280  const poset_path& xbase_path,
281  const poset_path& xcoord_path,
282  const poset_path& xprop_path,
283  bool xauto_access);
284 
291  field_type* standard_field(fiber_bundles_namespace& xns,
292  const poset_path& xbase_path,
293  const std::string& xcoord_name,
294  const std::string& xprop_name,
295  bool xauto_access);
296 
298 
299 
300  //===========================================================================
302  //===========================================================================
304 
305 public:
306 
310  poset_path& base_schema_path();
311 
315  wsv_block<int>& base_index_ubs();
316 
320  poset_path& local_cell_prototype_path();
321 
322 
323 private:
324 
328  poset_path _base_schema_path;
329 
333  wsv_block<int> _base_index_ubs;
334 
338  poset_path _local_cell_prototype_path;
339 
341 
342 
343  //===========================================================================
345  //===========================================================================
347 
348 public:
349 
353  poset_path& coord_rep_path();
354 
358  std::string& coord_fiber_suffix();
359 
363  std::string& coord_section_suffix();
364 
368  wsv_block<sec_vd_value_type>& coord_lb();
369 
373  wsv_block<sec_vd_value_type>& coord_ub();
374 
375 
376 private:
377 
381  poset_path _coord_rep_path;
382 
386  std::string _coord_fiber_suffix;
387 
391  std::string _coord_section_suffix;
392 
397 
402 
404 
405 
406  //===========================================================================
408  //===========================================================================
410 
411 public:
412 
416  poset_path& prop_rep_path();
417 
421  std::string& prop_fiber_suffix();
422 
426  std::string& prop_section_suffix();
427 
431  wsv_block<sec_vd_value_type>& prop_lb();
432 
436  wsv_block<sec_vd_value_type>& prop_ub();
437 
438 
439 private:
440 
444  poset_path _prop_rep_path;
445 
449  std::string _prop_fiber_suffix;
450 
454  std::string _prop_section_suffix;
455 
460 
465 
467 
468 };
469 
470 //=============================================================================
471 // NON-MEMBER FUNCTIONS
472 //=============================================================================
473 
474 template <typename base_type>
475 SHEAF_DLL_SPEC
476 void
478  const poset_path& xbase_path,
479  const wsv_block<int>& xbase_index_ubs,
480  poset_path& xlocal_cell_prototype_path,
481  base_type& xresult);
482 
483 template <>
484 SHEAF_DLL_SPEC
485 void
487  const poset_path& xbase_path,
488  const wsv_block<int>& xbase_index_ubs,
489  poset_path& xlocal_cell_prototype_path,
490  structured_block_1d& xresult);
491 
492 template <>
493 SHEAF_DLL_SPEC
494 void
496  const poset_path& xbase_path,
497  const wsv_block<int>& xbase_index_ubs,
498  poset_path& xlocal_cell_prototype_path,
499  structured_block_2d& xresult);
500 
501 template <>
502 SHEAF_DLL_SPEC
503 void
505  const poset_path& xbase_path,
506  const wsv_block<int>& xbase_index_ubs,
507  poset_path& xlocal_cell_prototype_path,
508  structured_block_3d& xresult);
509 
510 template <>
511 SHEAF_DLL_SPEC
512 void
514  const poset_path& xbase_path,
515  const wsv_block<int>& xbase_index_ubs,
516  poset_path& xlocal_cell_prototype_path,
517  point_block_1d& xresult);
518 
519 template <>
520 SHEAF_DLL_SPEC
521 void
523  const poset_path& xbase_path,
524  const wsv_block<int>& xbase_index_ubs,
525  poset_path& xlocal_cell_prototype_path,
526  point_block_2d& xresult);
527 
528 template <>
529 SHEAF_DLL_SPEC
530 void
532  const poset_path& xbase_path,
533  const wsv_block<int>& xbase_index_ubs,
534  poset_path& xlocal_cell_prototype_path,
535  point_block_3d& xresult);
536 
537 template <>
538 SHEAF_DLL_SPEC
539 void
541  const poset_path& xbase_path,
542  const wsv_block<int>& xbase_index_ubs,
543  poset_path& xlocal_cell_prototype_path,
544  unstructured_block& xresult);
545 
546 } // namespace fields
547 
548 #endif // ifndef FIELD_FACTORY_2_H
A homogeneous collection of connected quads arranged in an i_size() x j_size() array.
Namespace for fields component of sheaf system.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
A path defined by a poset name and a member name separated by a forward slash (&#39;/&#39;). For example: "cell_definitions/triangle".
Definition: poset_path.h:48
OBSOLETE: use zone_nodes_block or point_block_*d. A client handle for a base space member which repre...
field_traits< prop_type >::field_type field_type
Typedef: The type of the field to create.
A homogeneous collection of connected segments arranged in an i_size() array.
SHEAF_DLL_SPEC void make_base_space(fiber_bundles_namespace &xns, const poset_path &xbase_path, const wsv_block< int > &xbase_index_ubs, poset_path &xlocal_cell_prototype_path, unstructured_block &xresult)
Finds or creates the base space specified by xbase_path; specialization for unstructured_block.
A homogeneous collection of i_size() * j_size() disconnected points similar to a structured_block_2d...
A homogeneous collection of connected hexahedra arranged in an i_size() x j_size() x k_size() array...
Features describing a field type. Declaration only; there is no generic implementation for this templ...
Definition: field_traits.h:86
A homogeneous collection of i_size() disconnected points; similar to a structured_block_1d, but without the segments.
Namespace for the fiber_bundles component of the sheaf system.
A homogeneous collection of i_size()*j_size()*k_size() disconnected points similar to a structured_bl...
A factory for making field_vd objects with coordinates section of type coord_type, property section of type prop_type and base space of type base_type.