41 {
return pane()->get_point(
this); }
51 Base::normalize_border();
55 for ( it=border_halfedges_begin(); it!=halfedges_end(); ++it) {
58 Vertex *
v = it->vertex();
59 if ( v->halfedge() != &*it)
60 v->set_halfedge( &*it);
65 :
Base(b, color), _hds( this) {}
69 int color,
const char *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;
81 std::cout <<
"Building pane connectivity..." << std::flush;
88 std::cout <<
"Done" << std::endl;
96 for ( Pane_set::const_iterator pit=
_pane_set.begin();
100 RFC_Pane_overlay::HDS::Halfedge_const_iterator
101 hit=pane.
_hds.halfedges_begin(), hend=pane.
_hds.border_halfedges_begin();
103 for ( ; hit != hend; ++hit)
if (!pane.
marked( &*hit)) {
122 if ( v1==v2)
return true;
141 Element_node_enumerator ene(
_base, 1);
143 for (
int i=
_base->size_of_elements();
i>0; --
i, ene.next()) {
145 for (
int k=0, ne=ene.size_of_edges();
k<ne; ++
k) {
146 B.add_vertex_to_facet( ene[
k]-1);
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();
167 for (
int k=ne;
k<ne+ne; ++
k) {
187 for ( HDS::Vertex_iterator it=
_hds.vertices_begin(),
197 if ( !
i->is_border()) {
200 }
while ( (
i =
i->next()->opposite()) != h);
212 if ( it->second->is_master())
235 for ( Feature_1::iterator
j=it->begin();
j!=it->end(); ++
j) {
263 }
while ( (k=(k==kopp)?*
j:kopp) != *
j);
267 kopp->destination()->point());
270 Feature_1::iterator t =
j; ++t;
271 if ( t==it->end()) t = it->begin();
277 Feature_1::iterator t = (
j==it->begin()) ? it->end() :
j;
313 for (
int i=0, size = pane.
_nrmls.size();
i<size; ++
i)
315 for (
int i=0, size = pane.
_f_tngts.size();
i<size; ++
i)
371 typedef set< pair<int,int> > V2h;
372 typedef map<int, V2h> V2h_table;
373 V2h_table _v2h_table;
376 for ( B2v_table::iterator
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;
383 _v2h_table[it->second[
i]].insert( p);
387 _cntrs.resize(
hds().size_of_border_edges(), NULL);
389 HDS_overlay::Halfedge_iterator hit =
hds().border_halfedges_begin();
390 HDS_overlay::Halfedge_iterator hend =
hds().halfedges_end();
391 for ( ; hit != hend; ++hit) {
394 V2h_table::iterator it = _v2h_table.find(
get_lid(v));
395 if ( it == _v2h_table.end())
continue;
397 V2h_table::iterator i0=_v2h_table.find(
get_lid( hit->origin()));
400 if ( i0==_v2h_table.end())
continue;
403 V2h::iterator j0=i0->second.begin(), j1=it->second.begin();
405 while ( j0 != i0->second.end() && j1 != it->second.end()) {
406 if ( j0->first == j1->first) {
408 V2h::iterator k0, k1;
409 for ( k0=j0; k0!=i0->second.end()&&k0->first==j0->first; ++k0) {
411 for ( k1=j1; k1!=it->second.end()&&k1->first==j1->first; ++k1) {
416 pair<int,int> e( b2v[k0->second], b2v[k1->second]);
419 map< pair<int,int>,
Halfedge*>::const_iterator
426 else if ( k0->first !=
id()) {
427 swap( e.first, e.second);
429 std::cerr <<
"ERROR: Inconsistency in window \""
431 <<
" and " << j0->first
432 <<
" have opposite orientation!" << std::endl
433 <<
"\tComputation can not continue. Aborting..."
441 if ( found) { j0 = k0; j1 = k1; }
445 if ( j0->first < j1->first) ++j0;
else ++j1;
450 hit =
hds().border_halfedges_begin();
452 it!=
iend; ++it, ++hit) {
454 if ( *it == NULL) *it = &*hit;
459 hit =
hds().border_halfedges_begin();
460 for ( vector<Vertex*>::iterator it=
_primaries.begin();
465 *it = t.first->get_vertex_from_id( t.second);
471 HDS_overlay::Halfedge_iterator hit =
hds().border_halfedges_begin();
472 HDS_overlay::Halfedge_iterator hend =
hds().halfedges_end();
473 for ( ; hit != hend; ++ ++hit) {
476 get_lid( hit->destination()))] = &*hit;
485 for (; it !=
iend; ++it)
500 for ( ; it !=
iend; ++it) {
535 for ( ; pit != piend; ++pit) {
544 Pane_set::iterator pit, piend;
566 int rp_id,
int cnt,
const int *rids) {
568 for (
int i=0;
i<3; ++
i) {
584 std::vector<void *> ptrs;
587 for ( pit=
_pane_set.begin(); pit != piend; ++pit) {
590 ptrs.push_back( &pane.
_nrmls[0]);
610 RFC_Pane_overlay::HDS::Vertex_iterator vit=pane.
hds().vertices_begin();
611 for (
int i=0;
i<
s; ++
i, ++vit)
if ( vit->halfedge()) {
614 if ( v != vpri)
const_cast<Point_3&
>(v->
point()) = vpri->point();
std::string name() const
The name of the window.
std::pair< int, int > Node_ID
void swap(int &a, int &b)
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()
std::vector< INode * > _v_nodes
void free_vector(std::vector< _TT > &v)
RFC_Pane_overlay * pane()
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)
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.
Halfedge * get_opposite(Halfedge *h) const
Vertex_overlay * destination()
RFC_Pane_overlay * get_pane(Vertex *v) const
const Vertex * get_primary(const Vertex *v) const
std::vector< INode * > _e_node_buf
SURF::Point_2< float > Point_2S
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
std::vector< Vertex * > _primaries
Halfedge_overlay * halfedge()
std::vector< Halfedge * > _cntrs
Base * _base
Reference to its base object.
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
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
std::vector< Vector_3 > _nrmls
void reduce_coordinates_to_all()
#define RFC_END_NAME_SPACE
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
const Point & point() const
Halfedge_overlay * prev()
**********************************************************************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.
bool is_feature_0(const Vertex *v) const
In_place_list_n< INode, false > INode_list
static HDS_accessor< Tag_true > acc
void create_overlay_data()
void delete_overlay_data()
#define RFC_BEGIN_NAME_SPACE
std::vector< float > _fd_1
void delete_overlay_data()
std::vector< Node_ID > _subnode_counterparts
Ids of counterparts of subnodes.
void determine_counterparts()
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
Halfedge_overlay * next()
Pane_set _pane_set
The set of panes contained in the window.
virtual ~RFC_Window_overlay()
int get_index(const Vertex *v) const
Vertex * get_primary(Vertex *v) const
std::vector< Vector_3 > _f_tngts
const Halfedge * get_an_unmarked_halfedge() const
void determine_counterparts()
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
Halfedge * get_next_around_destination(Halfedge *h) const
Vertex * get_destination(Halfedge *h) const
RFC_Window_overlay(COM::Window *b, int color, const char *pre=NULL)
Halfedge * get_prev_around_destination(Halfedge *h) const
bool is_on_feature(const Vertex *v) const
void construct_bvpair2edge()
std::vector< Point_2S > _subnode_nat_coors
Natual coordinates in the parent face.
std::vector< int > B2v
From local boundary ids to node ids.
void create_overlay_data()
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)
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