#include "roccom.h"
#include <cstdio>
#include <iostream>
#include <fstream>
#include <algorithm>
#include <cstring>
#include <string>
#include <cstdlib>
#include <cmath>
#include <cassert>
#include <sstream>
#include "roccom_assertion.h"
#include "../Rocsurf/test/IM_Reader.h"
Go to the source code of this file.
Classes | |
struct | Control_parameter |
Typedefs | |
typedef MAP::Vector_3< double > | Vector_3 |
Functions | |
COM_EXTERN_MODULE (Rocblas) | |
COM_EXTERN_MODULE (Rocmap) | |
COM_EXTERN_MODULE (Rocsurf) | |
COM_EXTERN_MODULE (Rocprop) | |
COM_EXTERN_MODULE (Rocout) | |
void | load_modules () |
void | print_usage (int argc, char *argv[]) |
void | read_control_file (const char *fname, Control_parameter &cp) |
void | init_parameters (const Control_parameter &cntr_param) |
std::string | read_in_mesh (const char *fname) |
void | init_attributes (const string &wname) |
void | func1 (Vector_3 &pnt, Vector_3 &nrm) |
void | func2 (Vector_3 &pnt, Vector_3 &nrm) |
void | func3 (Vector_3 &pnt, Vector_3 &nrm) |
void | init_normals (const string &wname, int func) |
std::pair< double, double > | compute_fnormal_error (const int ref_nrms_hdl, const int cur_nrms_hdl, const int buf_hdl, const char *scheme=NULL) |
std::pair< double, double > | compute_vnormal_error (const int ref_nrms_hdl, const int cur_nrms_hdl, const int vbuf_hdl, const int fbuf_hdl, const char *scheme=NULL) |
void | compute_weighted_normals (const string &wname) |
void | compute_quadric_normals (const string &wname) |
void | output_solution (const string &wname, const char *timelevel) |
int | main (int argc, char *argv[]) |
Variables | |
static int | rank = 0 |
const double | pi = 3.14159265358979 |
typedef MAP::Vector_3<double> Vector_3 |
Definition at line 43 of file compare_normals.C.
COM_EXTERN_MODULE | ( | Rocblas | ) |
COM_EXTERN_MODULE | ( | Rocmap | ) |
COM_EXTERN_MODULE | ( | Rocsurf | ) |
COM_EXTERN_MODULE | ( | Rocprop | ) |
COM_EXTERN_MODULE | ( | Rocout | ) |
std::pair<double,double> compute_fnormal_error | ( | const int | ref_nrms_hdl, |
const int | cur_nrms_hdl, | ||
const int | buf_hdl, | ||
const char * | scheme = NULL |
||
) |
Definition at line 320 of file compare_normals.C.
References COM_call_function(), COM_get_function_handle(), MPI_COMM_WORLD, scheme, and sqrt().
void compute_quadric_normals | ( | const string & | wname | ) |
Definition at line 460 of file compare_normals.C.
References COM_call_function(), COM_get_attribute_handle(), COM_get_function_handle(), and compute_vnormal_error().
Referenced by main().
std::pair<double,double> compute_vnormal_error | ( | const int | ref_nrms_hdl, |
const int | cur_nrms_hdl, | ||
const int | vbuf_hdl, | ||
const int | fbuf_hdl, | ||
const char * | scheme = NULL |
||
) |
Definition at line 373 of file compare_normals.C.
References COM_call_function(), COM_get_function_handle(), MPI_COMM_WORLD, scheme, and sqrt().
Referenced by compute_quadric_normals(), and compute_weighted_normals().
void compute_weighted_normals | ( | const string & | wname | ) |
Definition at line 429 of file compare_normals.C.
References COM_call_function(), COM_get_attribute_handle(), COM_get_function_handle(), compute_vnormal_error(), E2N_ANGLE, E2N_AREA, E2N_ONE, E2N_SPHERE, and scheme.
Definition at line 242 of file compare_normals.C.
References Vector_3< Type >::cross_product(), and sqrt().
Referenced by init_normals().
Definition at line 255 of file compare_normals.C.
References cos, Vector_3< Type >::cross_product(), pi, and sin.
Referenced by init_normals().
Definition at line 263 of file compare_normals.C.
References cos, Vector_3< Type >::cross_product(), pi, and sin.
Referenced by init_normals().
void init_attributes | ( | const string & | wname | ) |
Definition at line 212 of file compare_normals.C.
References COM_CHAR, COM_DOUBLE, COM_new_attribute(), COM_resize_array(), and COM_window_init_done().
void init_normals | ( | const string & | wname, |
int | func | ||
) |
Definition at line 271 of file compare_normals.C.
References COM_call_function(), COM_free_buffer(), COM_get_array(), COM_get_attribute_handle(), COM_get_function_handle(), COM_get_panes(), func1(), func2(), func3(), i, and j.
Referenced by main().
void init_parameters | ( | const Control_parameter & | cntr_param | ) |
Definition at line 152 of file compare_normals.C.
References COM_call_function(), COM_get_function_handle(), Control_parameter::courant, Control_parameter::eigthres, Control_parameter::fangle, Control_parameter::method, Control_parameter::normaldif, rank, Control_parameter::verbose, and Control_parameter::wavefrontal.
void load_modules | ( | ) |
Definition at line 51 of file compare_normals.C.
References COM_LOAD_MODULE_STATIC_DYNAMIC.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 533 of file compare_normals.C.
References COM_call_function(), COM_finalize(), COM_get_attribute_handle(), COM_get_function_handle(), COM_init(), COM_print_profile(), COMMPI_Comm_rank(), COMMPI_Initialized(), compute_quadric_normals(), Control_parameter::func, i, init_attributes(), init_normals(), init_parameters(), load_modules(), MPI_COMM_WORLD, output_solution(), Control_parameter::perturb, print_usage(), rank, read_control_file(), read_in_mesh(), and Control_parameter::steps.
void output_solution | ( | const string & | wname, |
const char * | timelevel | ||
) |
Definition at line 516 of file compare_normals.C.
References COM_call_function(), COM_get_attribute_handle(), COM_get_function_handle(), and COMMPI_Initialized().
void print_usage | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 61 of file compare_normals.C.
void read_control_file | ( | const char * | fname, |
Control_parameter & | cp | ||
) |
Definition at line 89 of file compare_normals.C.
References COM_assertion_msg, Control_parameter::courant, Control_parameter::eigthres, Control_parameter::fangle, Control_parameter::func, Control_parameter::interval, Control_parameter::method, Control_parameter::normaldif, Control_parameter::perturb, rank, Control_parameter::speed, Control_parameter::sploc, Control_parameter::steps, Control_parameter::timestep, Control_parameter::verbose, and Control_parameter::wavefrontal.
std::string read_in_mesh | ( | const char * | fname | ) |
Definition at line 195 of file compare_normals.C.
References COM_assertion_msg, rank, and IM_Reader::read_winmesh().
const double pi = 3.14159265358979 |
Definition at line 253 of file compare_normals.C.
Referenced by GeoPrim::C3Centroid(), C3Facet::C3Facet(), GeoPrim::Centroid(), CFacet::CFacet(), RFC_Window_overlay::comp_angle_defect(), RFC_Window_transfer::delete_facial_buffers(), RFC_Window_transfer::delete_nodal_buffers(), Halfedge::dihedral_angle(), func2(), func3(), Vortex_flow::get_velocity(), LeVeque_flow::get_velocity(), RFC_Window_transfer::incident_faces(), RFC_Window_transfer::incident_panes(), RFC_Window_transfer::init_facial_buffers(), RFC_Window_transfer::init_nodal_buffers(), init_speed_arrays(), main(), Overlay::number_subfaces(), Overlay::number_subnodes(), RFC_Window_transfer::reduce_maxabs_to_all(), RFC_Window_transfer::reduce_to_all(), RFC_Window_transfer::replicate_metadata(), RFC_Window_transfer::set_tags(), cimg_library::cimg::system(), TRAIL_ExtractPanes(), TRAIL_FD2FE_Transfer(), TRAIL_FD2FE_WinCreate(), TRAIL_FD2FE_WinCreate2(), TRAIL_FE2FD_Transfer(), and TRAIL_GetPanelAttribute().
|
static |
Definition at line 59 of file compare_normals.C.
Referenced by init_parameters(), main(), read_control_file(), and read_in_mesh().