42 class Rocmop :
public SURF::Rocsurf {
77 static void load(
const std::string &mname);
80 static void unload(
const std::string &mname);
99 void smooth(
const COM::Attribute *pmesh,
100 COM::Attribute *disp);
181 void set_value(
const char* opt,
const void* val);
197 std::vector<std::vector<bool> > &marked_elems);
207 else return COM_Object::validate_object();
228 MPI_Allreduce(&val, &temp, 1, MPI_INT, op,
242 MPI_Allreduce(&val, &temp, 1, MPI_DOUBLE, op,
306 std::vector<COM::Pane*> &allpanes);
313 bool with_ghost =
false);
320 bool with_ghosts =
false);
335 void print_mquality(std::string &
s,std::vector<std::vector<bool> > &to_check);
351 COM::Attribute *buf_att =NULL);
403 static void solve (
const FT &a1,
const FT &a2,
404 const FT &b1,
const FT &b2,
405 const FT &c1,
const FT &c2,
408 FT
denom = a1*b2-b1*a2;
410 x = - (b1*c2-c1*b2)/denom;
412 y = (a1*c2-c1*a2)/denom;
416 static void solve (
const FT &a1,
const FT &a2,
const FT &a3,
417 const FT &b1,
const FT &b2,
const FT &b3,
418 const FT &c1,
const FT &c2,
const FT &c3,
419 const FT &d1,
const FT &d2,
const FT &d3,
422 FT
denom = b2*c1*a3-b1*c2*a3+c3*b1*a2+b3*c2*a1-c1*b3*a2-b2*c3*a1;
424 x = - (b2*c3*d1-b2*c1*d3+c1*b3*d2+b1*c2*d3-c3*b1*d2-b3*c2*d1)/denom;
426 z = (b2*d1*a3-b2*a1*d3+b1*a2*d3-b1*d2*a3-d1*b3*a2+a1*b3*d2)/denom;
428 y = (a2*c3*d1-a2*c1*d3-c2*d1*a3+c2*a1*d3+d2*c1*a3-d2*c3*a1)/denom;
435 solve( A[0][0], A[0][1], A[0][2], A[1][0], A[1][1], A[1][2],
436 A[2][0], A[2][1], A[2][2], q[0], q[1], q[2],
451 std::vector<std::set< Edge_ID> >
_edges;
466 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.
std::vector< std::vector< bool > > _is_pane_bnd_node
Is the node on the pane boundary?
void smooth_in_place(COM::Attribute *pmesh)
Smooth a mesh in place..
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 invert_tets()
Repair inverted tets.
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.
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 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)
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.
Contains declarations of MPI subroutines used in Roccom.
void determine_shared_border()
Determine which nodes and elements are shared.
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
int _invert
If true (default false), then invert the mesh.
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.
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.
double disp_tally
originally a static in smooth()
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)
int N
Smooth every _smoothfreq'th call.
std::vector< std::vector< bool > > _is_shared_elem
Does the element contain shared nodes?
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