Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Normal and Tangent Computation

Functions

void evaluate_normals ()
 
void reduce_coordinates_to_all ()
 
void print_features ()
 Dump out the 0- and 1-features in Tecplot format into files <name>f0.plt, <name>f1.plt, respectively. More...
 
void reduce_normals_to_all (MPI_Op)
 
Vector_3 get_tangent (const Halfedge *h)
 

Detailed Description

Function Documentation

void evaluate_normals ( )

Definition at line 208 of file RFC_Window_overlay.C.

References RFC_Window_overlay::_f_list_0, RFC_Window_overlay::_f_list_1, RFC_Pane_overlay::_f_n_index, RFC_Pane_overlay::_f_nrmls, RFC_Pane_overlay::_f_t_index, RFC_Pane_overlay::_f_tngts, RFC_Pane_overlay::_nrmls, RFC_Window_base::_pane_set, RFC_Window_overlay::acc, RFC_Pane_overlay::add_tangent(), Halfedge_overlay::destination(), free_vector(), HDS_accessor< _MP >::get_destination(), Overlay_primitives::get_face_normal(), HDS_accessor< _MP >::get_halfedge(), RFC_Pane_overlay::get_index(), HDS_accessor< _MP >::get_next_around_destination(), HDS_accessor< _MP >::get_opposite(), HDS_accessor< _MP >::get_pane(), RFC_Pane_overlay::hds(), i, iend, if(), Halfedge_overlay::is_border(), RFC_Window_overlay::is_feature_0(), RFC_Window_overlay::is_feature_1(), RFC_Pane_base::is_master(), j, k, MPI_SUM, RFC_Window_overlay::normalize(), RFC_Window_derived< RFC_Pane_overlay >::pane(), Vertex_overlay::point(), RFC_Window_overlay::reduce_normals_to_all(), RFC_assertion, scheme, swap(), and v.

Referenced by Overlay::overlay().

208  {
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 {
253  RFC_Pane_overlay &pane = *acc.get_pane( h);
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());
288  RFC_Pane_overlay &pane = *acc.get_pane( h);
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 }
if(dy > dx)
void swap(int &a, int &b)
Definition: buildface.cpp:88
void reduce_normals_to_all(MPI_Op)
void free_vector(std::vector< _TT > &v)
Definition: rfc_basic.h:54
const Pane & pane(const int pid) const
Get a reference to the pane with give id pid.
Halfedge * get_opposite(Halfedge *h) const
Definition: HDS_accessor.h:99
j indices k indices k
Definition: Indexing.h:6
RFC_Pane_overlay * get_pane(Vertex *v) const
Definition: HDS_accessor.h:128
std::vector< Vector_3 > _f_nrmls
SURF::Vector_3< Real > Vector_3
Definition: rfc_basic.h:42
void add_tangent(Halfedge *h, const Vector_3 &v)
Vector_3 get_face_normal(const Halfedge *b, const Point_2 &nc, int scheme=0) const
bool is_master() const
Is this pane a master copy?
Halfedge * get_halfedge(Vertex *v) const
Definition: HDS_accessor.h:75
*********************************************************************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
std::vector< int > _f_t_index
Feature_list_1 _f_list_1
**********************************************************************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_feature_0(const Vertex *v) const
static HDS_accessor< Tag_true > acc
blockLoc i
Definition: read.cpp:79
std::vector< int > _f_n_index
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
std::vector< Vector_3 > _f_tngts
bool is_feature_1(const Halfedge *h) const
Halfedge_overlay Halfedge
Halfedge * get_next_around_destination(Halfedge *h) const
Definition: HDS_accessor.h:146
Vertex * get_destination(Halfedge *h) const
Definition: HDS_accessor.h:93
void normalize(Vector_3 &v)
Miscellaneous Helpers.
#define RFC_assertion
Definition: rfc_basic.h:65
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
SURF::Vector_2< Real > Point_2
Definition: rfc_basic.h:43

Here is the call graph for this function:

Here is the caller graph for this function:

Vector_3 get_tangent ( const Halfedge h)
inlineprotected

Definition at line 365 of file RFC_Window_overlay.h.

References Halfedge_overlay::destination(), Halfedge_overlay::origin(), and Vertex_overlay::point().

366  { return h->destination()->point()-h->origin()->point(); }
Node destination() const
Obtain the (primary copy of the) destination of the edge.
Definition: Manifold_2.h:472
const Point_3< Real > & point() const
Obtain the coordinates of a node.
Definition: Manifold_2.h:394
Node origin() const
Obtain the (primary copy of the) origin of the edge.
Definition: Manifold_2.h:468

Here is the call graph for this function:

void print_features ( )

Dump out the 0- and 1-features in Tecplot format into files <name>f0.plt, <name>f1.plt, respectively.

The original mesh, vertex ranks, face angles, and edge angles are output into file <name>.plt.

Definition at line 55 of file RFC_Window_overlay_IO.C.

References acc, cimg_library::acos(), COM_allocate_array(), COM_call_function(), COM_delete_window(), COM_FLOAT, COM_free_buffer(), COM_get_attribute_handle_const(), COM_get_function_handle(), COM_get_panes(), COM_INTEGER, COM_LOAD_MODULE_STATIC_DYNAMIC, COM_new_attribute(), COM_new_window(), COM_UNLOAD_MODULE_STATIC_DYNAMIC, COM_use_attribute(), COM_window_init_done(), RFC_Pane_overlay::get_angle_defect(), RFC_Pane_overlay::get_cos_edge_angle(), HDS_accessor< _MP >::get_destination(), HDS_accessor< _MP >::get_halfedge(), HDS_accessor< _MP >::get_next_around_destination(), HDS_accessor< _MP >::get_opposite(), HDS_accessor< _MP >::get_pane(), HDS_accessor< _MP >::get_primary(), RFC_Pane_overlay::hds(), HUGE_VALF, i, RFC_Pane_base::id(), iend, RFC_Pane_base::is_quadratic(), min(), Vertex_overlay::point(), RFC_assertion, s, RFC_Pane_base::size_of_nodes(), and v.

55  {
56 
57  std::cout << "Writing feature info " << "..." << std::endl;
58 
59  // Construct a temporary window
60  std::string wname_fea = name()+"_fea_temp";
61 
62  COM_new_window( wname_fea.c_str());
63  COM_use_attribute( (wname_fea+".mesh").c_str(), (name()+".mesh").c_str());
64 
65  COM_new_attribute( (wname_fea+".frank").c_str(), 'n', COM_INTEGER, 1, "");
66  COM_new_attribute( (wname_fea+".face_angle").c_str(), 'n', COM_FLOAT, 1, "");
67 
68  if ( verb > 1) {
69  COM_new_attribute( (wname_fea+".turn_angle").c_str(), 'n', COM_FLOAT, 1, "");
70  COM_new_attribute( (wname_fea+".angle_defect").c_str(), 'n', COM_FLOAT, 1, "");
71  }
72 
73  Pane_set::iterator it=_pane_set.begin(), iend=_pane_set.end();
74  for ( it=_pane_set.begin(); it != iend; ++it) {
75  RFC_Pane_overlay &pane = (RFC_Pane_overlay &)*it->second;
76 
77  int *frank;
78  COM_allocate_array( (wname_fea+".frank").c_str(), pane.id(),
79  &(void*&)frank);
80 
81  float *face_angle=NULL, *turn_angle=NULL, *angle_defect=NULL;
82  COM_allocate_array( (wname_fea+".face_angle").c_str(), pane.id(),
83  &(void*&)face_angle);
84  if ( verb>1) {
85  COM_allocate_array( (wname_fea+".turn_angle").c_str(), pane.id(),
86  &(void*&)turn_angle);
87  COM_allocate_array( (wname_fea+".angle_defect").c_str(), pane.id(),
88  &(void*&)angle_defect);
89  }
90 
91  int s=pane.size_of_nodes();
92  RFC_Pane_overlay::HDS::Vertex_iterator vit=pane.hds().vertices_begin();
93  for ( int i=0; i<s; ++i, ++vit) if ( vit->halfedge()) {
94  Vertex *v = acc.get_primary(&*vit);
95  if ( is_feature_0( v)) {
96  if ( _f0_ranks.find(v)==_f0_ranks.end()) {
97  std::cout << "Found rank-0 vertex: " << v->point() << std::endl;
98  frank[i] = 2; // 1;
99  }
100  else
101  frank[i] = 2; // _f0_ranks[v]+1;
102  }
103  else
104  frank[i] = is_on_feature(v);
105 
106  // Compute face angle
107  face_angle[i] = 2.;
108  Halfedge *h0=acc.get_halfedge(v), *h1=h0;
109 
110  if ( acc.get_destination( h0)==v) do {
111  face_angle[i] = std::min( face_angle[i],
112  cos_face_angle( h1, acc.get_opposite(h1)));
113  } while ( (h1=acc.get_next_around_destination(h1)) != h0);
114  else { // v is an edge center for quadratic element
115  RFC_assertion( pane.is_quadratic());
116  face_angle[i] = cos_face_angle( h1, acc.get_opposite(h1));
117  }
118 
119  face_angle[i] = acos( face_angle[i])*r2d;
120 
121  if ( verb>1) {
122  if ( is_feature_0( v) && _f0_ranks[v]>2)
123  turn_angle[i] = 180;
124  else if ( acc.get_pane(v)->get_cos_edge_angle( v)==HUGE_VALF)
125  turn_angle[i] = 0;
126  else
127  turn_angle[i] = acos(acc.get_pane(v)->get_cos_edge_angle( v))*r2d;
128 
129  if ( acc.get_pane(v)->get_angle_defect(v)==HUGE_VALF)
130  angle_defect[i] = 0.;
131  else
132  angle_defect[i] = acc.get_pane(v)->get_angle_defect(v)*r2d;
133  }
134  }
135  }
136 
137  COM_window_init_done( wname_fea.c_str());
138 
139  // Load Rocout
141  int hdl_write = COM_get_function_handle( "RFC_OUT.write_attribute");
142 
143  // Call Rocut with the window to write out the pane.
144  int win_all = COM_get_attribute_handle_const( (wname_fea+".all").c_str());
145 
146  string fname_pre = out_pre + name() + "_fea_";
147 
148  int npanes, *paneIDs;
149  COM_get_panes( wname_fea.c_str(), &npanes, &paneIDs);
150 
151  for ( int i=0; i<npanes; ++i) {
152  std::ostringstream ostr;
153 
154  ostr << fname_pre;
155  ostr.fill('0'); ostr.width(5);
156  ostr << paneIDs[i] << ".hdf";
157 
158  COM_call_function( hdl_write, ostr.str().c_str(), &win_all,
159  wname_fea.c_str(), "000", NULL, NULL, &paneIDs[i]);
160  }
161  COM_free_buffer( &paneIDs);
162 
163  // Unload Rocout
165 
166  // Delete the temporary window
167  COM_delete_window( wname_fea.c_str());
168 }
std::string name() const
The name of the window.
static const float r2d
const Pane & pane(const int pid) const
Get a reference to the pane with give id pid.
const float & get_cos_edge_angle(const Vertex *v) const
Halfedge * get_opposite(Halfedge *h) const
Definition: HDS_accessor.h:99
void COM_delete_window(const char *wname)
Definition: roccom_c++.h:94
double s
Definition: blastest.C:80
RFC_Pane_overlay * get_pane(Vertex *v) const
Definition: HDS_accessor.h:128
Halfedge * get_halfedge(Vertex *v) const
Definition: HDS_accessor.h:75
*********************************************************************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
float cos_face_angle(Halfedge *h, Halfedge *hopp)
Compute the cosine of the face angle (dihedral angle) at an edge.
#define COM_UNLOAD_MODULE_STATIC_DYNAMIC(moduleName, windowString)
Definition: roccom_basic.h:113
const Point & point() const
**********************************************************************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
void COM_use_attribute(const char *wname, const char *attr, int wg=1, const char *ptnname=0, int val=0)
Use the subset of panes of another window of which the given pane attribute has value val...
Definition: roccom_c++.h:224
int size_of_nodes() const
The total number of nodes in the pane.
bool is_feature_0(const Vertex *v) const
static HDS_accessor< Tag_true > acc
Definition: Rocout.h:81
blockLoc i
Definition: read.cpp:79
void COM_window_init_done(const char *w_str, int pane_changed=true)
Definition: roccom_c++.h:102
void COM_new_window(const char *wname, MPI_Comm c=MPI_COMM_NULL)
Definition: roccom_c++.h:86
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
void COM_allocate_array(const char *wa_str, int pane_id=0, void **addr=NULL, int strd=0, int cap=0)
Allocate space for an attribute on a specific pane and return the address by setting addr...
Definition: roccom_c++.h:196
int COM_get_attribute_handle_const(const char *waname)
Definition: roccom_c++.h:420
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
Definition: Vector_n.h:346
Pane_set _pane_set
The set of panes contained in the window.
bool is_on_feature(const Vertex *v) const
Vertex * get_primary(Vertex *v) const
Definition: HDS_accessor.h:122
#define HUGE_VALF
Definition: Rocout_hdf4.C:719
bool is_quadratic() const
Does this pane contain quadratic elements?
Halfedge_overlay Halfedge
Halfedge * get_next_around_destination(Halfedge *h) const
Definition: HDS_accessor.h:146
CImg< _cimg_Tfloat > acos(const CImg< T > &instance)
Definition: CImg.h:6051
Vertex * get_destination(Halfedge *h) const
Definition: HDS_accessor.h:93
void COM_new_attribute(const char *wa_str, const char loc, const int type, int ncomp, const char *unit)
Registering an attribute type.
Definition: roccom_c++.h:118
void COM_get_panes(const char *wname, std::vector< int > &pane_ids, int rank=-2)
Definition: roccom_c++.h:350
void COM_free_buffer(int **buf)
Definition: roccom_c++.h:397
int id() const
std::map< Vertex *, int > _f0_ranks
#define RFC_assertion
Definition: rfc_basic.h:65
#define COM_LOAD_MODULE_STATIC_DYNAMIC(moduleName, windowString)
Definition: roccom_basic.h:111
int COM_get_function_handle(const char *wfname)
Definition: roccom_c++.h:428
const float & get_angle_defect(const Vertex *v) const

Here is the call graph for this function:

void reduce_coordinates_to_all ( )

Reduces nodal coordinates from primary nodes to others

Definition at line 603 of file RFC_Window_overlay.C.

References RFC_Window_base::_pane_set, RFC_Window_overlay::acc, HDS_accessor< _MP >::get_primary(), RFC_Pane_overlay::hds(), i, iend, RFC_Window_derived< RFC_Pane_overlay >::pane(), Vertex_overlay::point(), s, RFC_Pane_base::size_of_nodes(), and v.

603  {
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 }
const Pane & pane(const int pid) const
Get a reference to the pane with give id pid.
double s
Definition: blastest.C:80
*********************************************************************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
**********************************************************************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
int size_of_nodes() const
The total number of nodes in the pane.
static HDS_accessor< Tag_true > acc
blockLoc i
Definition: read.cpp:79
Pane_set _pane_set
The set of panes contained in the window.
Vertex * get_primary(Vertex *v) const
Definition: HDS_accessor.h:122
SURF::Point_3< Real > Point_3
Definition: rfc_basic.h:41

Here is the call graph for this function:

void reduce_normals_to_all ( MPI_Op  op)
protected

Reduces values for each node form all its instances to all instances.

Definition at line 582 of file RFC_Window_overlay.C.

References RFC_Window_base::_map_comm, RFC_Pane_overlay::_nrmls, RFC_Window_base::_pane_set, COM_DOUBLE, and RFC_Window_derived< RFC_Pane_overlay >::pane().

Referenced by RFC_Window_overlay::evaluate_normals().

582  {
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 }
MAP::Pane_communicator _map_comm
const Pane & pane(const int pid) const
Get a reference to the pane with give id pid.
std::vector< Vector_3 > _nrmls
Pane_set _pane_set
The set of panes contained in the window.

Here is the call graph for this function:

Here is the caller graph for this function: