Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFC_Window_overlay.C
Go to the documentation of this file.
1 /* *******************************************************************
2  * Rocstar Simulation Suite *
3  * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4  * *
5  * Illinois Rocstar LLC *
6  * Champaign, IL *
7  * www.illinoisrocstar.com *
8  * sales@illinoisrocstar.com *
9  * *
10  * License: See LICENSE file in top level of distribution package or *
11  * http://opensource.org/licenses/NCSA *
12  *********************************************************************/
13 /* *******************************************************************
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17  * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21  * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22  *********************************************************************/
23 // $Id: RFC_Window_overlay.C,v 1.32 2008/12/06 08:43:29 mtcampbe Exp $
24 
25 #include "RFC_Window_overlay.h"
26 #include "Overlay_primitives.h"
27 #include "HDS_accessor.h"
28 #include "Triangulation.h"
29 #include <functional>
30 #include <cstdio>
31 #include <iostream>
32 #include <fstream>
33 #include <algorithm>
34 #include <cmath>
35 
37 
38 using namespace std;
39 
41 { return pane()->get_point(this); }
42 
45 
47 
48 // Perform the standard normalization and also
49 // make every border vertex point to its incident border halfedge.
51  Base::normalize_border();
52 
53  // Loop through all the border halfedges
54  Halfedge_iterator it;
55  for ( it=border_halfedges_begin(); it!=halfedges_end(); ++it) {
56  RFC_assertion(!it->is_border());
57  ++it; RFC_assertion(it->is_border());
58  Vertex *v = it->vertex();
59  if ( v->halfedge() != &*it)
60  v->set_halfedge( &*it);
61  }
62 }
63 
64 RFC_Pane_overlay::RFC_Pane_overlay( COM::Pane *b, int color)
65  : Base(b, color), _hds( this) {}
66 
67 // Constructor and deconstructors
69  int color, const char *pre)
70  : Base(b, color, MPI_COMM_SELF), out_pre(pre?pre:""),
71  _long_falseness_check(true) {
73  vector< Pane*> pns; panes(pns);
74  vector< Pane*>::iterator pit=pns.begin(), piend=pns.end();
75  for ( ; pit != piend; ++pit) {
76  (*pit)->_window = this;
77  (*pit)->build_hds(); // Create the DCEL data structure
78  }
79 
80  // Preprocess pane connectivity.
81  std::cout << "Building pane connectivity..." << std::flush;
82 
84 
85  // Determine the counterpart for border edges of all panes.
87 
88  std::cout << "Done" << std::endl;
89 }
91 
94  const Halfedge *hbrd=NULL;
95 
96  for ( Pane_set::const_iterator pit=_pane_set.begin();
97  pit != _pane_set.end(); ++pit) {
98  const RFC_Pane_overlay &pane =
99  reinterpret_cast<const RFC_Pane_overlay &>(*pit->second);
100  RFC_Pane_overlay::HDS::Halfedge_const_iterator
101  hit=pane._hds.halfedges_begin(), hend=pane._hds.border_halfedges_begin();
102 
103  for ( ; hit != hend; ++hit) if (!pane.marked( &*hit)) {
104  if ( hbrd==NULL && pane.is_on_feature(hit->origin()))
105  hbrd = &*hit;
106  else if ( !pane.is_on_feature(hit->origin()))
107  return &*hit;
108  }
109  }
110  return hbrd;
111 }
112 
115  return const_cast<Halfedge*>( ((const Self*)this)->
117 }
118 
120 bool
122  if ( v1==v2) return true;
123  if ( !v1->halfedge()->is_border() || !v2->halfedge()->is_border())
124  return false;
125  return v1->pane()->get_primary( v1) == v2->pane()->get_primary( v2);
126 }
127 
128 // Constructs HDS for a pane from element connectivity array.
129 void
132  if ( _base->size_of_nodes() == 0) return;
133 
134  HDS_builder B(_hds,true);
135 
136  B.begin_surface( _base->size_of_nodes(), _base->size_of_elements());
137  // insert the vertices
138  for (Size i=0; i<_base->size_of_nodes(); ++i)
139  { B.add_vertex( Vertex::Point()); }
140 
141  Element_node_enumerator ene( _base, 1);
142 
143  for (int i=_base->size_of_elements(); i>0; --i, ene.next()) {
144  B.begin_facet();
145  for ( int k=0, ne=ene.size_of_edges(); k<ne; ++k) {
146  B.add_vertex_to_facet( ene[k]-1);
147  }
148  B.end_facet();
149  }
150 
151  B.end_surface();
152 
153  // Normalize border vertices such that every border vertex point to its
154  // incident border halfedge.
156 
157  // Insert the vertices in edge/face centers for quadratic elements
158  if ( _quadratic) {
159  Facet *fs = &*_hds.facets_begin();
160 
161  Element_node_enumerator ene( _base, 1);
162  for (int i=_base->size_of_elements(); i>0; --i, ene.next(), ++fs) {
163  int nn = ene.size_of_nodes();
164  int ne = ene.size_of_edges();
165 
166  Halfedge *h = fs->halfedge();
167  for ( int k=ne; k<ne+ne; ++k) {
168  Vertex *v = get_vertex_from_id( ene[k]);
169  v->set_halfedge( h);
170  h = h->next();
171  }
172  if ( nn == 9) {
173  Vertex *v = get_vertex_from_id( ene[8]);
174  v->set_halfedge( fs->halfedge());
175  }
176  }
177  }
178 }
179 
180 // Evaluate normals for every vertex within a pane as the average of
181 // face normals of the faces of its incident faces.
182 void
184  _nrmls.resize( _hds.size_of_vertices(), Vector_3(0.,0.,0.));
185 
186  int vid=1;
187  for ( HDS::Vertex_iterator it=_hds.vertices_begin(),
188  iend=_hds.vertices_end(); it != iend; ++it, ++vid) {
189  Vertex *v = &*it;
190  Vector_3 d(0.,0.,0.);
191 
192  Halfedge *h = v->halfedge(), *i = h;
193  if (!h || h->destination() != v) continue;
194 
195  do {
196  RFC_assertion( i->destination() == v);
197  if ( !i->is_border()) {
199  }
200  } while ( ( i = i->next()->opposite()) != h);
201  // Note that the normal vector is not normalized.
202  set_normal( vid, d);
203  }
204 }
205 
206 // Evaluate vertex normals as average of face normals of all incident faces.
207 void
209  // First, evaluate normals for each pane
210  Pane_set::iterator it, iend=_pane_set.end();
211  for ( it=_pane_set.begin() ; it != iend; ++it) {
212  if ( it->second->is_master())
213  ((RFC_Pane_overlay*)it->second)->evaluate_normals();
214  }
215 
216  // Second, perform reduction over all vertices
218 
219  // Evaluate the one-sided normals for the halfedge edges incident
220  // on the features.
221  for ( it=_pane_set.begin() ; it != iend; ++it) {
222  RFC_Pane_overlay &pane = (RFC_Pane_overlay &)*it->second;
223  free_vector( pane._f_nrmls); free_vector( pane._f_tngts);
225 
226  pane._f_n_index.resize( pane.hds().size_of_halfedges(), -1);
227  pane._f_t_index.resize( pane.hds().size_of_halfedges(), -1);
228  }
229 
231  Point_2 one(1,0);
232  // Loop throught the sharp halfedges in 1-features
233  for ( Feature_list_1::iterator it = _f_list_1.begin(), iend=_f_list_1.end();
234  it != iend; ++it) {
235  for ( Feature_1::iterator j=it->begin(); j!=it->end(); ++j) {
236  Halfedge *k = *j, *kopp=acc.get_opposite(k);
237  do {
238  if (!k->is_border() && acc.get_pane(k)->
239  _f_n_index[acc.get_pane(k)->get_index(k)] == -1) {
240  // First, compute the vector
241  Vector_3 v = op.get_face_normal( k, one, scheme);
242  Halfedge *h0 = k, *h = acc.get_next_around_destination(k);
243  do {
244  if ( is_feature_1( h)) break;
245  RFC_assertion( !h->is_border());
246  v += op.get_face_normal( h, one, scheme);
247  } while ( (h=acc.get_next_around_destination(h)) != h0);
248 
249  // Second, insert the vector into the table
250  normalize(v);
251  swap( h, h0);
252  do {
254  if ( pane._f_nrmls.size() && v == pane._f_nrmls.back()) {
255  pane._f_n_index[ pane.get_index( h)] = pane._f_nrmls.size()-1;
256  }
257  else {
258  pane._f_n_index[ pane.get_index( h)] = pane._f_nrmls.size();
259  pane._f_nrmls.push_back( v);
260  }
261  } while ( (h=acc.get_next_around_destination(h)) != h0);
262  }
263  } while ( (k=(k==kopp)?*j:kopp) != *j);
264 
265  // Compute the tangent
266  Vector_3 tng = ( k->destination()->point() -
267  kopp->destination()->point());
268  acc.get_pane( k)->add_tangent( k, tng);
269  if ( !is_feature_0( acc.get_destination(k))) {
270  Feature_1::iterator t = j; ++t;
271  if ( t==it->end()) t = it->begin();
272  Halfedge *h = acc.get_opposite(*t);
273  acc.get_pane( h)->add_tangent( h, tng);
274  }
275  acc.get_pane( kopp)->add_tangent( kopp, tng);
276  if ( !is_feature_0( acc.get_destination(kopp))) {
277  Feature_1::iterator t = (j==it->begin()) ? it->end() : j;
278  Halfedge *h = *(--t);
279  acc.get_pane( h)->add_tangent( h, tng);
280  }
281  }
282  }
283 
284  // Loop through the vertices in 0-features
285  for ( Feature_list_0::iterator it = _f_list_0.begin(), iend=_f_list_0.end();
286  it != iend; ++it) {
287  Halfedge *h = acc.get_halfedge(it->vertex());
289 
290  if ( !h->is_border() && pane._f_n_index[ pane.get_index( h)] == -1) {
291  Halfedge *h0 = h;
292  do {
293  Vector_3 v = op.get_face_normal( h, one, scheme)+
295  normalize(v);
296 
297  if ( pane._f_nrmls.size() && v == pane._f_nrmls.back()) {
298  pane._f_n_index[ pane.get_index( h)] = pane._f_nrmls.size()-1;
299  }
300  else {
301  pane._f_n_index[ pane.get_index( h)] = pane._f_nrmls.size();
302  pane._f_nrmls.push_back( v);
303  }
304  } while ( (h=acc.get_next_around_destination(h)) != h0);
305  }
306  }
307 
308  // Finally, normalize normals and tangents
309  for ( it=_pane_set.begin() ; it != iend; ++it) {
310  RFC_Pane_overlay &pane = (RFC_Pane_overlay &)*it->second;
311 
312  if ( pane.is_master()) {
313  for ( int i=0, size = pane._nrmls.size(); i<size; ++i)
314  normalize( pane._nrmls[i]);
315  for ( int i=0, size = pane._f_tngts.size(); i<size; ++i)
316  normalize( pane._f_tngts[i]);
317  }
318  }
319 }
320 
321 // Get the normal of a vertex.
322 const Vector_3 &
323 RFC_Pane_overlay::get_normal( const Halfedge *h, const Vertex *v) const {
324  RFC_assertion( acc.get_pane(h) == this && acc.get_pane(v)==this);
325 
326  if ( v != h->destination()) {
327  h = h->prev();
328  RFC_assertion( v == h->destination());
329  }
330  if ( h->is_border())
332 
333  int j=_f_n_index[get_index( h)];
334  if ( j < 0)
335  return _nrmls[ get_index(v)];
336  else
337  return _f_nrmls[j];
338 }
339 
340 // Get the tangents of a vertex on feature.
341 // Note that the tangent is always along the direction of
342 // the halfedges in the feature list.
343 const Vector_3&
344 RFC_Pane_overlay::get_tangent( const Halfedge *h, const Vertex *v) const {
345  if ( v != h->destination()) {
346  h = acc.get_opposite(h);
347  return acc.get_pane( h)->get_tangent( h, h->destination());
348  }
350 
351  int j=_f_t_index[get_index( h)];
352  RFC_assertion( j >= 0 && int(_f_tngts.size())>j);
353  return _f_tngts[j];
354 }
355 
356 // Get the normal of a vertex.
357 Vector_3 &
359  return const_cast< Vector_3&>(get_normal( h, (const Vertex*)(v)));
360 }
361 
362 // Get the tangents of a vertex on feature.
363 Vector_3&
365  return const_cast< Vector_3&>(get_tangent( h, (const Vertex*)(v)));
366 }
367 
368 // Determine counterparts of border edges.
369 void
371  typedef set< pair<int,int> > V2h;
372  typedef map<int, V2h> V2h_table;
373  V2h_table _v2h_table;
374 
375  //`Loop through the B2v_table
376  for ( B2v_table::iterator
377  it=_b2v_table.begin(), iend=_b2v_table.end(); it != iend; ++it) {
378  for ( int i=0, size=it->second.size(); i<size; ++i) {
379  pair<int,int> p(it->first, i);
380  if ( it->first==id()) {
381  if ( i&1) --p.second; else ++p.second;
382  }
383  _v2h_table[it->second[i]].insert( p);
384  }
385  }
386 
387  _cntrs.resize( hds().size_of_border_edges(), NULL);
388  // Loop through all border edges.
389  HDS_overlay::Halfedge_iterator hit = hds().border_halfedges_begin();
390  HDS_overlay::Halfedge_iterator hend = hds().halfedges_end();
391  for ( ; hit != hend; ++hit) {
392  ++hit; RFC_assertion( hit->is_border());
393  Vertex *v = hit->vertex();
394  V2h_table::iterator it = _v2h_table.find( get_lid(v));
395  if ( it == _v2h_table.end()) continue;
396 
397  V2h_table::iterator i0=_v2h_table.find(get_lid( hit->origin()));
398 
399  // If the origin not incident with any, there is no counterpart.
400  if ( i0==_v2h_table.end()) continue;
401 
402  // check whether the two vertices are overlapping.
403  V2h::iterator j0=i0->second.begin(), j1=it->second.begin();
404 
405  while ( j0 != i0->second.end() && j1 != it->second.end()) {
406  if ( j0->first == j1->first) {
407  bool found=false;
408  V2h::iterator k0, k1;
409  for ( k0=j0; k0!=i0->second.end()&&k0->first==j0->first; ++k0) {
410  if (found) continue;
411  for ( k1=j1; k1!=it->second.end()&&k1->first==j1->first; ++k1) {
412  if (found) continue;
413  // Check whether it is an edge in that pane
414  const RFC_Pane_overlay &p = _window->pane(k0->first);
415  const B2v &b2v = p._b2v_table.find(id())->second;
416  pair<int,int> e( b2v[k0->second], b2v[k1->second]);
417  RFC_assertion( e.first>0 && e.second>0);
418 
419  map< pair<int,int>, Halfedge*>::const_iterator
420  b2e_it = p._bv2edges.find( e);
421 
422  if ( b2e_it != p._bv2edges.end()) {
423  _cntrs[get_border_index(&*hit)] = b2e_it->second;
424  found=true;
425  }
426  else if ( k0->first != id()) {
427  swap( e.first, e.second);
428  if (p._bv2edges.find( e) != p._bv2edges.end()) {
429  std::cerr << "ERROR: Inconsistency in window \""
430  << _window->name() << "\"!!!! \n\tPanes " << id()
431  << " and " << j0->first
432  << " have opposite orientation!" << std::endl
433  << "\tComputation can not continue. Aborting..."
434  << std::endl;
435  RFC_assertion( p._bv2edges.find( e) == p._bv2edges.end());
436  abort();
437  }
438  }
439  }
440  }
441  if ( found) { j0 = k0; j1 = k1; }
442  else { ++j0; ++j1; }
443  }
444  else
445  if ( j0->first < j1->first) ++j0; else ++j1;
446  }
447  }
448 
449  // Fix physical border ones to have them point to themselves
450  hit = hds().border_halfedges_begin();
451  for ( vector<Halfedge*>::iterator it=_cntrs.begin(), iend=_cntrs.end();
452  it!=iend; ++it, ++hit) {
453  ++hit; RFC_assertion( hit->is_border());
454  if ( *it == NULL) *it = &*hit;
455  }
456 
457  // Determine the primaries of the border vertices
458  _primaries.resize( hds().size_of_border_edges(), NULL);
459  hit = hds().border_halfedges_begin();
460  for ( vector<Vertex*>::iterator it=_primaries.begin();
461  it != _primaries.end(); ++it, ++hit) {
462  ++hit; RFC_assertion( hit->is_border());
463  pair<Self*,int>
464  t=_window->get_primary( this, get_lid( hit->destination()));
465  *it = t.first->get_vertex_from_id( t.second);
466  }
467 }
468 
469 void
471  HDS_overlay::Halfedge_iterator hit = hds().border_halfedges_begin();
472  HDS_overlay::Halfedge_iterator hend = hds().halfedges_end();
473  for ( ; hit != hend; ++ ++hit) {
474  RFC_assertion( !hit->is_border());
475  _bv2edges[ make_pair( get_lid( hit->origin()),
476  get_lid( hit->destination()))] = &*hit;
477  }
478 }
479 
480 // Determine the counterparts for all pane border edges.
481 void
483  // Construct a mapping from vertex pair to border edges
484  Pane_set::iterator it=_pane_set.begin(), iend=_pane_set.end();
485  for (; it != iend; ++it)
486  ((RFC_Pane_overlay*)it->second)->construct_bvpair2edge();
487 
488  // Construct mapping from panal border edges to their counterpart.
489  for ( it = _pane_set.begin(); it != iend; ++it)
490  ((RFC_Pane_overlay*)it->second)->determine_counterparts();
491 
492  // Clear the mapping
493  for ( it = _pane_set.begin(); it != iend; ++it)
494  ((RFC_Pane_overlay*)it->second)->_bv2edges.clear();
495 }
496 
497 void
499  Pane_set::iterator it=_pane_set.begin(), iend=_pane_set.end();
500  for ( ; it != iend; ++it) {
501  RFC_Pane_overlay &p = (RFC_Pane_overlay &)*it->second;
502  fill( p._e_marks.begin(), p._e_marks.end(), 0);
503  }
504 }
505 
506 // Functions for supporting the overlay algorithm
508  _v_nodes.resize(0);
509  _e_node_list.resize(0);
510  _e_node_buf.resize(0);
511  _e_marks.resize(0);
512 
513  _v_nodes.resize( _hds.size_of_vertices(),0);
514  _e_node_list.resize( _hds.size_of_halfedges(), INode_list( color()));
515  _e_node_buf.resize( _hds.size_of_halfedges(), 0);
516  _e_marks.resize( _hds.size_of_halfedges(), 0);
517 }
518 
519 // Functions for supporting the overlay algorithm
525 
530 }
531 
533  // Loop through panes
534  Pane_set::iterator pit=_pane_set.begin(), piend=_pane_set.end();
535  for ( ; pit != piend; ++pit) {
536  RFC_Pane_overlay &p = (RFC_Pane_overlay &)*pit->second;
538  }
539 
540 }
541 
543  // Loop through the panes to remove the buffer spaces
544  Pane_set::iterator pit, piend;
545  for (pit=_pane_set.begin(), piend=_pane_set.end(); pit != piend; ++pit) {
546  RFC_Pane_overlay &pane = (RFC_Pane_overlay &)*pit->second;
547  if ( !pane.is_master()) continue;
548 
549  pane.delete_overlay_data();
550  }
551 }
552 
564 void RFC_Pane_overlay::insert_subface(int idx, int plid, const int *lids,
565  const Edge_ID *eids, const Point_2 *nc,
566  int rp_id, int cnt, const int *rids) {
567  RFC_assertion( idx>=0 && idx<int(_subface_parents.size()) && cnt>=1);
568  for ( int i=0; i<3; ++i) {
569  _subfaces[idx][i] = lids[i];
570  _subnode_parents[ lids[i]-1] = eids[i];
571  _subnode_nat_coors[ lids[i]-1] = Point_2S(nc[i][0],nc[i][1]);
572  _subnode_counterparts[ lids[i]-1] = Node_ID( rp_id, rids[i]);
573  }
574  _subface_parents[idx] = plid;
575  _subface_counterparts[idx] = Face_ID( rp_id, cnt);
576 }
577 
581 void
583 
584  std::vector<void *> ptrs;
585  // Loop through panes
586  Pane_set::iterator pit=_pane_set.begin(), piend=_pane_set.end();
587  for ( pit=_pane_set.begin(); pit != piend; ++pit) {
588  RFC_Pane_overlay &pane=(RFC_Pane_overlay &)*pit->second;
589 
590  ptrs.push_back( &pane._nrmls[0]);
591  }
592 
593  _map_comm.init( &ptrs[0], COM_DOUBLE, 3);
594  _map_comm.begin_update_shared_nodes();
595  _map_comm.reduce_on_shared_nodes( op);
596  _map_comm.end_update_shared_nodes();
597 }
598 
602 void
604 
605  Pane_set::iterator it=_pane_set.begin(), iend=_pane_set.end();
606  for ( it=_pane_set.begin(); it != iend; ++it) {
607  RFC_Pane_overlay &pane = (RFC_Pane_overlay &)*it->second;
608 
609  int s=pane.size_of_nodes();
610  RFC_Pane_overlay::HDS::Vertex_iterator vit=pane.hds().vertices_begin();
611  for ( int i=0; i<s; ++i, ++vit) if ( vit->halfedge()) {
612  Vertex *v = &*vit, *vpri = acc.get_primary(v);
613 
614  if ( v != vpri) const_cast<Point_3&>(v->point()) = vpri->point();
615  }
616  }
617 }
618 
620 
621 
622 
623 
624 
625 
std::string name() const
The name of the window.
std::pair< int, int > Node_ID
if(dy > dx)
void swap(int &a, int &b)
Definition: buildface.cpp:88
MAP::Pane_communicator _map_comm
void insert_subface(int idx, int plid, const int *lids, const Edge_ID *eids, const Point_2 *nc, int rp_id, int cnt, const int *rids)
Insert all the infomation related to a subface into the database.
CGAL::Polyhedron_incremental_builder_3< HDS > HDS_builder
void reduce_normals_to_all(MPI_Op)
Halfedge_overlay * halfedge()
Definition: HDS_overlay.h:73
std::vector< INode * > _v_nodes
void free_vector(std::vector< _TT > &v)
Definition: rfc_basic.h:54
RFC_Pane_overlay * pane()
Definition: HDS_overlay.h:69
const Pane & pane(const int pid) const
Get a reference to the pane with give id pid.
std::vector< INode_list > _e_node_list
void set_halfedge(Halfedge_overlay *h)
Definition: HDS_overlay.h:75
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_COMM_SELF
void build_pc_tables()
Build the pane connectivity table.
const NT & d
Halfedge * get_opposite(Halfedge *h) const
Definition: HDS_accessor.h:99
j indices k indices k
Definition: Indexing.h:6
Vertex_overlay * destination()
Definition: HDS_overlay.h:137
double s
Definition: blastest.C:80
RFC_Pane_overlay * get_pane(Vertex *v) const
Definition: HDS_accessor.h:128
const Vertex * get_primary(const Vertex *v) const
std::vector< INode * > _e_node_buf
SURF::Point_2< float > Point_2S
Definition: rfc_basic.h:45
std::vector< Vector_3 > _f_nrmls
std::vector< int > _e_marks
RFC_Pane_overlay(COM::Pane *b, int color)
SURF::Vector_3< Real > Vector_3
Definition: rfc_basic.h:42
std::vector< Vertex * > _primaries
Halfedge_overlay * halfedge()
Definition: HDS_overlay.h:163
std::vector< Halfedge * > _cntrs
Base * _base
Reference to its base object.
bool is_border() const
Definition: HDS_overlay.h:131
void add_tangent(Halfedge *h, const Vector_3 &v)
int get_lid(const Vertex *v) const
Vector_3 get_face_normal(const Halfedge *b, const Point_2 &nc, int scheme=0) const
std::vector< Three_tuple< int > > _subfaces
Vector_3 & get_tangent(Halfedge *h, Vertex *v)
bool _quadratic
Does it contain quadratic elements?
bool is_master() const
Is this pane a master copy?
void panes(std::vector< Pane * > &ps)
Get a vector of local panes contained in the window.
std::vector< Edge_ID > _subnode_parents
Edge ids of parents.
Halfedge * get_halfedge(Vertex *v) const
Definition: HDS_accessor.h:75
int color() const
The color of the parent window (BLUE or GREEN).
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
Definition: roccomf90.h:20
std::vector< Vector_3 > _nrmls
static const int scheme
#define RFC_END_NAME_SPACE
Definition: rfc_basic.h:29
void init_feature_parameters()
Read in the control file for feature detection.
std::map< std::pair< int, int >, Halfedge * > _bv2edges
std::vector< int > _f_t_index
Feature_list_1 _f_list_1
const Point & point() const
Halfedge_overlay * prev()
Definition: HDS_overlay.h:123
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode iend
bool is_same_node(Vertex *v1, Vertex *v2)
Check whether given two vertices correspond to the same physical point.
int size_of_nodes() const
The total number of nodes in the pane.
A window is a collection of panes.
A local ID of an edge.
bool is_feature_0(const Vertex *v) const
In_place_list_n< INode, false > INode_list
static HDS_accessor< Tag_true > acc
blockLoc i
Definition: read.cpp:79
#define RFC_BEGIN_NAME_SPACE
Definition: rfc_basic.h:28
std::vector< float > _fd_1
B2v_table _b2v_table
std::vector< Node_ID > _subnode_counterparts
Ids of counterparts of subnodes.
void normalize_border_vertices()
std::pair< Pane *, int > get_primary(Pane *p, int vid)
Get a handle to the primary copy of a node contained in the pane p with local id vid.
std::vector< int > _f_n_index
Base::Size Size
Halfedge_overlay * next()
Definition: HDS_overlay.h:120
COM::Window Base
Feature_list_0 _f_list_0
Pane_set _pane_set
The set of panes contained in the window.
int get_index(const Vertex *v) const
j indices j
Definition: Indexing.h:6
Vertex * get_primary(Vertex *v) const
Definition: HDS_accessor.h:122
std::vector< Vector_3 > _f_tngts
const Halfedge * get_an_unmarked_halfedge() const
std::vector< int > _subface_parents
Face ids of the parents of the subfaces.
bool is_feature_1(const Halfedge *h) const
std::vector< float > _ad_0
SURF::Point_3< Real > Point_3
Definition: rfc_basic.h:41
Halfedge * get_next_around_destination(Halfedge *h) const
Definition: HDS_accessor.h:146
Vertex * get_destination(Halfedge *h) const
Definition: HDS_accessor.h:93
RFC_Window_overlay(COM::Window *b, int color, const char *pre=NULL)
Halfedge * get_prev_around_destination(Halfedge *h) const
Definition: HDS_accessor.h:141
bool is_on_feature(const Vertex *v) const
std::vector< Point_2S > _subnode_nat_coors
Natual coordinates in the parent face.
int id() const
std::vector< int > B2v
From local boundary ids to node ids.
bool is_feature_1(const Halfedge *h) const
void normalize(Vector_3 &v)
Miscellaneous Helpers.
static HDS_accessor< Tag_true > acc
Vertex * get_vertex_from_id(int i)
RFC_Window_overlay * _window
Vector_3 & get_normal(int v)
#define RFC_assertion
Definition: rfc_basic.h:65
void set_normal(int v, const Vector_3 &vec)
bool marked(const Halfedge *h) const
std::vector< float > _ea_0
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_GROUP_EMPTY INTEGER MPI_SUM
std::vector< Face_ID > _subface_counterparts
Ids of counterparts of faces.
int get_border_index(const Halfedge *h) const
SURF::Vector_2< Real > Point_2
Definition: rfc_basic.h:43
A global ID of a face.