SheafSystem  0.0.0.0
structured_block_1d.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 STRUCTURED_BLOCK_1D_H
22 #define STRUCTURED_BLOCK_1D_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef STRUCTURED_BLOCK_H
29 #include "SheafSystem/structured_block.h"
30 #endif
31 
32 #ifndef STRUCTURED_BLOCK_1D_CRG_INTERVAL_H
33 #include "SheafSystem/structured_block_1d_crg_interval.h"
34 #endif
35 
36 #ifndef CHART_POINT_1D_H
37 #include "SheafSystem/chart_point_1d.h"
38 #endif
39 
40 namespace fiber_bundle
41 {
42 
43 using namespace sheaf;
44 
49 class SHEAF_DLL_SPEC structured_block_1d : public structured_block
50 {
51 
53 
54  // ===========================================================
56  // ===========================================================
58 
59 public:
60 
64  static const poset_path& static_prototype_path();
65 
70  static host_type& new_host(namespace_type& xns,
71  const poset_path& xhost_path,
72  const poset_path& xschema_path,
73  bool xauto_access);
74 
81  static host_type& standard_host(namespace_type& xns, const poset_path& xhost_path, bool xauto_access);
82 
83 protected:
84 
85 private:
86 
88 
89 
90  // ===========================================================
92  // ===========================================================
94 
95 public:
96 
101 
108  explicit structured_block_1d(const abstract_poset_member& xother,
109  bool xnew_jem = false);
110 
114  virtual ~structured_block_1d();
115 
116  // NEW HANDLE, NEW STATE CONSTRUCTORS:
117 
122  structured_block_1d(poset* xhost,
123  const size_type& xi_size,
124  bool xauto_access);
125 
126  // NEW HANDLE, EXISTING STATE CONSTRUCTORS:
127 
132  structured_block_1d(const poset* xhost, pod_index_type xhub_id);
133 
138  structured_block_1d(const poset* xhost, const scoped_index& xid);
139 
144  structured_block_1d(const poset* xhost, const std::string& xname);
145 
150  structured_block_1d(const namespace_poset* xnamespace,
151  const poset_path& xpath,
152  bool xauto_access = true);
153 
158  structured_block_1d(const namespace_poset* xnamespace,
159  pod_index_type xposet_id,
160  pod_index_type xmember_id);
161 
166  structured_block_1d(const namespace_poset* xnamespace,
167  const scoped_index& xposet_id,
168  const scoped_index& xmember_id);
169 
170 
171  // EXISTING HANDLE, NEW STATE "CONSTRUCTORS":
172 
178  void new_state(const size_type& xi_size, bool xauto_access = true);
179 
184  void new_state(poset* xhost, const size_type& xi_size, bool xauto_access = true);
185 
186  // FEATURES:
187 
193  enum static_const_int {DB = 1};
194 
199  size_type i_size() const;
200 
201 protected:
202 
203 // ///
204 // /// The type of row dof tuple for this.
205 // ///
206 // struct SHEAF_DLL_SPEC row_dof_tuple_type
207 // {
208 // ///
209 // /// The base space dimension.
210 // ///
211 // int db;
212 
213 // ///
214 // /// The cell type id.
215 // ///
216 // int type_id;
217 
218 // ///
219 // /// The cell type name.
220 // ///
221 // const char* type_name;
222 
223 // ///
224 // /// The refinement depth.
225 // ///
226 // int refinement_depth;
227 
228 // ///
229 // /// The local cell type id.
230 // ///
231 // int local_cell_type_id;
232 
233 // ///
234 // /// The local cell type name.
235 // ///
236 // const char * local_cell_type_name;
237 
238 // ///
239 // /// The number of local cell instances in this block.
240 // ///
241 // size_type size;
242 
243 // ///
244 // /// The upper bound for index_0.
245 // ///
246 // size_type i_size;
247 // };
248 
249 // ///
250 // /// The row dof tuple for this.
251 // ///
252 // inline row_dof_tuple_type* row_dof_tuple()
253 // {
254 // return reinterpret_cast<row_dof_tuple_type*>(dof_map().dof_tuple());
255 // };
256 
261  virtual void attach_handle_data_members();
262 
264 
268  static scoped_index new_row_dof_map(poset_state_handle& xhost,
269  size_type xi_size,
270  bool xauto_access);
271 
272 private:
273 
275 
276 
277  // ===========================================================
279  // ===========================================================
281 
282 public:
283 
284 protected:
285 
286 private:
287 
289 
290 
291  // ===========================================================
293  // ===========================================================
295 
296 public:
297 
303  {
304  return reinterpret_cast<chart_point_1d*>(structured_block::refine_point(xpt));
305  };
306 
311  virtual void refine_point_pa(const chart_point& xpt, chart_point& result) const;
312 
319  virtual void refine_point_pa(const chart_point& xpt,
320  block<chart_point_3d>& result) const;
321 
327  {
328  return reinterpret_cast<chart_point_1d*>(structured_block::refine_point(xpt));
329  };
330 
335  virtual void unrefine_point_pa(const chart_point& xpt, chart_point& result) const;
336 
341  virtual void refine();
342 
347  virtual void unrefine();
348 
353  virtual void simplify();
354 
359  virtual void unsimplify();
360 
361 protected:
362 
363 private:
364 
366 
367 
368  // ===========================================================
370  // ===========================================================
372 
373 public:
374 
378  virtual const structured_block_1d_crg_interval& interval() const;
379 
383  static const poset_path& static_local_cell_prototype_path();
384 
385 protected:
386 
387 private:
388 
390 
391 
392  // ===========================================================
394  // ===========================================================
396 
397 public:
398 
399 protected:
400 
401 private:
402 
404 
405 
406  // ===========================================================
408  // ===========================================================
410 
411 public:
412 
416  virtual structured_block_1d* clone() const;
417 
423  inline structured_block_1d* clone(bool xnew_state, bool xauto_access = true) const
424  {
425  return static_cast<structured_block_1d*>(structured_block::clone(xnew_state, xauto_access));
426  };
427 
428 protected:
429 
430 private:
431 
433 
434 
435  // ===========================================================
437  // ===========================================================
439 
440 public:
441 
446  {
448  };
449 
454  {
455  return static_cast<structured_block_1d*>(base_space_member::least_jem());
456  };
457 
458 protected:
459 
460 private:
461 
463 
464 
465  // ===========================================================
467  // ===========================================================
469 
470 public:
471 
477  {
478  return static_cast<structured_block_1d*>(base_space_member::p_join(other));
479  };
480 
486  {
487  return static_cast<structured_block_1d*>(base_space_member::p_meet(other));
488  };
489 
490 protected:
491 
492 private:
493 
495 
496 
497  // ===========================================================
499  // ===========================================================
501 
502 public:
503 
509  inline structured_block_1d* l_join(abstract_poset_member* other, bool xnew_jem = true)
510  {
511  return static_cast<structured_block_1d*>(base_space_member::l_join(other, xnew_jem));
512  };
513 
519  inline structured_block_1d* l_meet(abstract_poset_member* other, bool xnew_jem = true)
520  {
521  return static_cast<structured_block_1d*>(base_space_member::l_meet(other, xnew_jem));
522  };
523 
529  inline structured_block_1d* l_not(bool xnew_jem = true) const
530  {
531  return static_cast<structured_block_1d*>(base_space_member::l_not(xnew_jem));
532  };
533 
534 protected:
535 
536 private:
537 
539 
540 
541  // ===========================================================
543  // ===========================================================
545 
546 public:
547 
551  virtual bool invariant() const;
552 
556  virtual bool is_ancestor_of(const any* other) const;
557 
561  virtual structured_block_1d& operator=(const abstract_poset_member& xother);
562 
566  structured_block_1d& operator=(const structured_block_1d& xother);
567 
568 protected:
569 
570 private:
571 
573 };
574 
575 } // namespace fiber_bundle
576 
577 #endif // STRUCTURED_BLOCK_1D_H
base_space_member * p_join(abstract_poset_member *other) const
poset join of this with other, auto-, pre-, and self-allocated versions the poset join is the least u...
chart_point * refine_point(const chart_point &xpt) const
A chart point in the direct refinement of this which is the same as xpt in this; auto-allocated versi...
base_space_member * l_join(abstract_poset_member *other, bool xnew_jem=true)
lattice join of this with other, auto-, pre-, and self-allocated versions the lattice join is the lea...
array_poset_dof_map * new_row_dof_map(const poset *xhost, const std::string &xprototype_name, const std::string &xlocal_cell_name, size_type xsize)
OBSOLETE: use scoped_index new_row_dof_map(poset_state_handle& ...) Creates a new row dof map and ini...
The default name space; a poset which contains other posets as members.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
A client handle for a general, abstract partially order set.
structured_block_1d * greatest_jem() const
The largest member which is join-equivalent to this.
structured_block_1d * l_join(abstract_poset_member *other, bool xnew_jem=true)
lattice join of this with other, auto-, pre-, and self-allocated versions the lattice join is the lea...
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
A point in chart space.
Definition: chart_point.h:52
base_space_member * least_jem() const
The smallest member which is join-equivalent to this.
A homogeneous collection of connected segments arranged in an i_size() array.
static_const_int
The dimension of this block; static const version.
structured_block_1d * p_meet(abstract_poset_member *other)
poset meet of this with other, auto-, pre-, and self-allocated versions the poset meet is the greates...
base_space_member * l_not(bool xnew_jem=true) const
lattice pseudo-complement of this, auto-, pre- and self allocated versions The lattice pseudo-complem...
A client handle for a base space member which represents a homgeneous collection of local cells...
Abstract base class with useful features for all objects.
Definition: any.h:39
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
Struct representing the closed interval [_begin, _end].
Definition: interval_set.h:48
A client handle for a mutable partially ordered set.
Definition: poset.h:40
Emulator for a interval of implicit base space members representing a 1 dimensional structured block...
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
base_space_member * p_meet(abstract_poset_member *other)
poset meet of this with other, auto-, pre-, and self-allocated versions the poset meet is the greates...
chart_point_1d * unrefine_point(const chart_point &xpt) const
The point in this which is the same as xpt in the direct refinement of this; auto-allocated version...
structured_block_1d * least_jem() const
The smallest member which is join-equivalent to this.
chart_point_1d * refine_point(const chart_point &xpt) const
The point in the direct refinement of this which is the same as xpt in this; auto-allocated version...
base_space_member * l_meet(abstract_poset_member *other, bool xnew_jem=true)
lattice meet of this with other, auto-, pre-, and self-allocated versions the lattice meet is the gre...
structured_block_1d * l_not(bool xnew_jem=true) const
lattice pseudo-complement of this, auto-, pre- and self allocated versions The lattice pseudo-complem...
structured_block_1d * clone(bool xnew_state, bool xauto_access=true) const
Make a new handle instance of current. Attach the new instance to a new state if xnew_state is true...
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
structured_block_1d * p_join(abstract_poset_member *other) const
poset join of this with other, auto-, pre-, and self-allocated versions the poset join is the least u...
Namespace for the sheaves component of the sheaf system.
virtual structured_block * clone() const =0
Make a new handle, no state instance of current.
A point in a 1D chart space.
base_space_member * greatest_jem() const
The largest member which is join-equivalent to this.
An abstract client handle for a member of a poset.
An auto_block with a no-initialization initialization policy.
Namespace for the fiber_bundles component of the sheaf system.
structured_block_1d * l_meet(abstract_poset_member *other, bool xnew_jem=true)
lattice meet of this with other, auto-, pre-, and self-allocated versions the lattice meet is the gre...