57 std::cout <<
"Writing feature info " <<
"..." << std::endl;
60 std::string wname_fea = name()+
"_fea_temp";
73 Pane_set::iterator it=_pane_set.begin(),
iend=_pane_set.end();
74 for ( it=_pane_set.begin(); it !=
iend; ++it) {
81 float *face_angle=NULL, *turn_angle=NULL, *angle_defect=NULL;
88 &(
void*&)angle_defect);
92 RFC_Pane_overlay::HDS::Vertex_iterator vit=pane.
hds().vertices_begin();
93 for (
int i=0;
i<
s; ++
i, ++vit)
if ( vit->halfedge()) {
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;
104 frank[
i] = is_on_feature(v);
119 face_angle[
i] =
acos( face_angle[
i])*r2d;
122 if ( is_feature_0( v) && _f0_ranks[v]>2)
130 angle_defect[i] = 0.;
146 string fname_pre = out_pre + name() +
"_fea_";
148 int npanes, *paneIDs;
151 for (
int i=0;
i<npanes; ++
i) {
152 std::ostringstream ostr;
155 ostr.fill(
'0'); ostr.width(5);
156 ostr << paneIDs[
i] <<
".hdf";
159 wname_fea.c_str(),
"000", NULL, NULL, &paneIDs[
i]);
176 const std::vector<pair<float,Halfedge*> > &rstrong_edges){
178 string buf = out_pre + name() +
"s1.plt";
180 ofstream os( buf.c_str());
181 for (vector<pair<float,Halfedge*> >::const_iterator it=tstrong_edges.begin();
182 it!=tstrong_edges.end(); ++it, ++
n) {
183 os <<
"GEOMETRY T=LINE3D C=GREEN"
184 <<
" LT=0.4" << endl << 1 << endl
185 << 2 <<
' ' << it->second->origin()->point()
186 <<
' ' << it->second->destination()->point()
190 if ( !tstrong_edges.empty())
191 std::cout <<
"\tStatistics: Theta-strong-edge angle: MAX ="
192 <<
acos(tstrong_edges.front().first)*r2d
193 <<
" and MIN=" <<
acos(tstrong_edges.back().first)*r2d
196 for (vector<pair<float,Halfedge*> >::const_iterator it=rstrong_edges.begin();
197 it!=rstrong_edges.end(); ++it, ++
n) {
198 os <<
"GEOMETRY T=LINE3D C=GREEN"
199 <<
" LT=0.1" << endl << 1 << endl
200 << 2 <<
' ' << it->second->origin()->point()
201 <<
' ' << it->second->destination()->point()
204 if ( !rstrong_edges.empty())
205 std::cout <<
" \tStatistics: r-strong-edge angle: MAX ="
206 <<
acos(rstrong_edges.front().first)*r2d
207 <<
" and MIN=" <<
acos(rstrong_edges.back().first)*r2d
const float & get_cos_edge_angle(const Vertex *v) const
Halfedge * get_opposite(Halfedge *h) const
void COM_delete_window(const char *wname)
RFC_Pane_overlay * get_pane(Vertex *v) const
RFC_BEGIN_NAME_SPACE HDS_accessor< Tag_true > acc
Halfedge * get_halfedge(Vertex *v) const
*********************************************************************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
#define RFC_END_NAME_SPACE
#define COM_UNLOAD_MODULE_STATIC_DYNAMIC(moduleName, windowString)
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...
int size_of_nodes() const
The total number of nodes in the pane.
void print_features()
Dump out the 0- and 1-features in Tecplot format into files <name>f0.plt, <name>f1.plt, respectively.
#define RFC_BEGIN_NAME_SPACE
void COM_window_init_done(const char *w_str, int pane_changed=true)
void COM_new_window(const char *wname, MPI_Comm c=MPI_COMM_NULL)
void COM_call_function(const int wf, int argc,...)
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...
int COM_get_attribute_handle_const(const char *waname)
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
Vertex * get_primary(Vertex *v) const
bool is_quadratic() const
Does this pane contain quadratic elements?
Halfedge * get_next_around_destination(Halfedge *h) const
CImg< _cimg_Tfloat > acos(const CImg< T > &instance)
Vertex * get_destination(Halfedge *h) const
void COM_new_attribute(const char *wa_str, const char loc, const int type, int ncomp, const char *unit)
Registering an attribute type.
void COM_get_panes(const char *wname, std::vector< int > &pane_ids, int rank=-2)
void COM_free_buffer(int **buf)
void dump_strong_edges(const std::vector< std::pair< float, Halfedge * > > &, const std::vector< std::pair< float, Halfedge * > > &)
Dump out the strong edges in Tecplot format into file <name>s1.plt.
#define COM_LOAD_MODULE_STATIC_DYNAMIC(moduleName, windowString)
int COM_get_function_handle(const char *wfname)
const float & get_angle_defect(const Vertex *v) const
#define COM_EXTERN_MODULE(moduleName)