42 class Rocmop :
public SURF::Rocsurf {
81 static void load(
const std::string &mname);
84 static void unload(
const std::string &mname);
105 void smooth(
const COM::Attribute *pmesh,
106 COM::Attribute *disp,
107 double* timestep = NULL);
160 COM::Attribute *disp,
203 void set_value(
const char* opt,
const void* val);
219 std::vector<std::vector<bool> > &marked_elems);
229 else return COM_Object::validate_object();
250 MPI_Allreduce(&val, &temp, 1, MPI_INT, op,
264 MPI_Allreduce(&val, &temp, 1, MPI_DOUBLE, op,
330 std::vector<COM::Pane*> &allpanes);
337 bool with_ghost =
false);
344 bool with_ghosts =
false);
362 void print_mquality(std::string &
s,std::vector<std::vector<bool> > &to_check);
378 COM::Attribute *buf_att =NULL);
430 static void solve (
const FT &a1,
const FT &a2,
431 const FT &b1,
const FT &b2,
432 const FT &c1,
const FT &c2,
435 FT
denom = a1*b2-b1*a2;
437 x = - (b1*c2-c1*b2)/denom;
439 y = (a1*c2-c1*a2)/denom;
443 static void solve (
const FT &a1,
const FT &a2,
const FT &a3,
444 const FT &b1,
const FT &b2,
const FT &b3,
445 const FT &c1,
const FT &c2,
const FT &c3,
446 const FT &d1,
const FT &d2,
const FT &d3,
449 FT
denom = b2*c1*a3-b1*c2*a3+c3*b1*a2+b3*c2*a1-c1*b3*a2-b2*c3*a1;
451 x = - (b2*c3*d1-b2*c1*d3+c1*b3*d2+b1*c2*d3-c3*b1*d2-b3*c2*d1)/denom;
453 z = (b2*d1*a3-b2*a1*d3+b1*a2*d3-b1*d2*a3-d1*b3*a2+a1*b3*d2)/denom;
455 y = (a2*c3*d1-a2*c1*d3-c2*d1*a3+c2*a1*d3+d2*c1*a3-d2*c3*a1)/denom;
462 solve( A[0][0], A[0][1], A[0][2], A[1][0], A[1][1], A[1][2],
463 A[2][0], A[2][1], A[2][2], q[0], q[1], q[2],
478 std::vector<std::set< Edge_ID> >
_edges;
493 std::vector<MAP::Pane_dual_connectivity*>
_dcs;
int eigen_analyze_vertex(Vector_3< double > A_io[3], Vector_3< double > &b_io, Vector_3< double > *nrm_nz, double angle_defect)
int validate_object() const
Check that the object is valid.
void determine_physical_border()
Determine which nodes and elements are on the physical border.
void obtain_extremal_dihedrals(const COM::Attribute *att, double *min, double *max)
Obtain the min and max dihedral angles.
std::vector< std::vector< bool > > _is_pane_bnd_node
Is the node on the pane boundary?
double check_all_elem_quality(std::vector< const COM::Pane * > &allpanes, bool with_ghost=false)
Get the largest dihedral angle of all real elements.
std::vector< std::vector< bool > > _is_pane_bnd_elem
Does the element contain nodes on the pane boundary?
float _maxdisp
Maximum displacement allowed.
const COM::Window * _usr_window
The user's window.
void print_mquality(std::string &s, std::vector< std::vector< bool > > &to_check)
Print the quality range of marked elements, for debugging.
void int int REAL REAL * y
int _ncycle
Max number of subcycles for convergence.
void perturb_stationary()
Randomly perturn stationary nodes on pane boundary, not on phys. surface.
char _wght_scheme
Weighting scheme.
void determine_pane_border()
Determine which nodes and elements are on pane borders.
void identify_ridge_edges()
Identify ridge edges.
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
void smooth_boeing(COM::Attribute *att, int *niter)
void get_usr_disp(const COM::Attribute *pmesh, COM::Attribute *disp, double *timestep)
Get displacement in _usr_window based on nc in _buf_window.
static void solve(const Vector_3< double > A[3], const Vector_3< double > &q, Vector_3< double > &x)
A Roccom mesh optimization module.
bool _reorthog
Reorthogonalize?
void smooth_vol_mesq_wg()
Smooth a volume via Mesquite using ghost information.
double _eig_thres
Eigenvalue thresholds.
void compute_medial_quadric()
Compute medial quadric for every vertex.
Handles communication of shared nodes, ghost nodes or ghost cells across panes.
static void compute_eigenvectors(Vector_3< double > A[3], Vector_3< double > &lambdas)
static void reduce_sum_on_shared_nodes(COM::Attribute *att)
Perform a sum-reduction on the shared nodes for the given attribute.
int _method
Choice of smoothing method.
std::vector< std::vector< bool > > _is_phys_bnd_node
Is the node on the physical boundary?
void zero_displacements(COM::Attribute *disp)
void update_buf_real_nc()
Update real nodal coordinates of _buf_window from _usr_window.
void read_config_file(const std::string &)
void evaluate_face_normals()
Evaluate face normals (copied from FaceOffset_3.[hC].
void perform_smoothing()
Perform smoothing on _buf_window.
std::vector< std::vector< bool > > _is_phys_bnd_elem
Does the element contain nodes on the phys. boundary?
static void solve(const FT &a1, const FT &a2, const FT &a3, const FT &b1, const FT &b2, const FT &b3, const FT &c1, const FT &c2, const FT &c3, const FT &d1, const FT &d2, const FT &d3, FT &x, FT &y, FT &z)
int _wrapper
Choice of Mesquite Smoothing Wrappers.
virtual ~Rocmop()
Destructor.
void redistribute_vertices_smooth()
Redistribute smooth vertices within their tangent spaces.
void smooth_vol_mesq_ng()
Smooths a volume using Mesquite with only shared node information.
void int int int REAL REAL REAL * z
int _niter
Maximum number of iterations for smoothing.
static void get_constraint_directions(int type, const Vector_3< double > &dir, int &ndirs, Vector_3< double > dirs[2])
Get orthonormals of the constraints.
void perform_noniterative_smoothing()
Perform noniterative smoothing.
double check_marked_elem_quality(std::vector< std::vector< bool > > &marked_elems, std::vector< COM::Pane * > &allpanes)
Get the largest dihedral angle of marked real elements.
void constrain_displacements(COM::Attribute *w_disp)
Contrain displacements to _maxdisp.
static void unload(const std::string &mname)
Unloads Rocmop from Roccom.
void get_redist_safe_factor(COM::Attribute *c_attr, COM::Attribute *w_attr, int rank)
int _rediter
No.iterations for vertex redistribution.
void invert_elements(int conn_type)
Repair inverted tets or hexes.
Contains declarations of MPI subroutines used in Roccom.
void determine_shared_border()
Determine which nodes and elements are shared.
int _invert_tets
If true (default false), then invert tets.
int check_input_pconn()
Check pconn block 3 of the input mesh.
void print_legible(int verb, const char *msg)
Single process print message if given verbosity level is exceeded.
#define MOP_END_NAMESPACE
void redistribute_vertices_ridge()
Redistribute ridge vertices within their tangent spaces.
float _disp_thresh
originally a static in check_displacements
void print_quality(std::string &s)
Print the quality range of all elements, for debugging.
virtual SURF::Window_manifold_2 * manifold()
Obtain a reference to the manifold.
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
void smooth_surf_medial()
Smooths a surface using the medial quadric.
void smooth(const COM::Attribute *pmesh, COM::Attribute *disp)
Smooth the mesh in a Rocmop managed buffer.
bool _is_pmesh
pmesh or mesh ?
double _dir_thres
Another threshold.
void agree_double(double &val, MPI_Op op)
Agree on a double value across all panes.
static void solve(const FT &a1, const FT &a2, const FT &b1, const FT &b2, const FT &c1, const FT &c2, FT &x, FT &y)
float _ctol
Subcycling tolerance.
void smoother_specific_init()
Perform smoother specific initialization.
static void load(const std::string &mname)
Loads Rocmop onto Roccom with a given module name.
COM::Attribute * _cnstr_dirs
Stores directions of nodal contraints.
int _lazy
Check quality before smoothing?
void agree_int(int &val, MPI_Op op)
Agree on an integer value across all panes.
const COM::Attribute * _cnstr_types
Stores types of nodal constraints.
#define MOP_BEGIN_NAMESPACE
void print_extremal_dihedrals(COM::Window *window)
Print the min and max dihedral angles along with their locations.
Rocmop()
Default Constructor.
void set_value(const char *opt, const void *val)
Set a Rocomp option.
void mark_elems_from_nodes(std::vector< std::vector< bool > > &marked_nodes, std::vector< std::vector< bool > > &marked_elems)
Mark the nodes which contain marked elems.
void add_aspect_ratios(COM::Attribute *usr_att, COM::Attribute *buf_att=NULL)
std::vector< std::vector< bool > > _is_shared_elem
Does the element contain shared nodes?
int _invert_hexes
If true (default false), then invert hexes.
void smooth_mesquite(std::vector< COM::Pane * > &allpanes, int ghost_level=0)
Smooth the panes of the working window using MESQUITE.
CGAL_BEGIN_NAMESPACE void const NT NT NT NT & denom
COM::Window * _buf_window
The buffer window.
void perform_iterative_smoothing()
Perform iterative smoothing.
std::vector< std::vector< bool > > _is_shared_node
Is the node shared?
float _tol
Smoother iterating tolerance.
bool check_displacements(COM::Attribute *disp)
std::vector< std::set< Edge_ID > > _edges
ridge edges
std::vector< MAP::Pane_dual_connectivity * > _dcs