41 class Rocmop :
public SURF::Rocsurf {
75 static void load(
const std::string &mname);
78 static void unload(
const std::string &mname);
96 void smooth(
const COM::Attribute *pmesh,
97 COM::Attribute *disp);
182 void set_value(
const char* opt,
const void* val);
198 std::vector<std::vector<bool> > &marked_elems);
208 else return COM_Object::validate_object();
229 MPI_Allreduce(&val, &temp, 1, MPI_INT, op,
243 MPI_Allreduce(&val, &temp, 1, MPI_DOUBLE, op,
305 std::vector<COM::Pane*> &allpanes);
312 bool with_ghost =
false);
319 bool with_ghosts =
false);
325 void print_mquality(std::string &
s,std::vector<std::vector<bool> > &to_check);
378 static void solve (
const FT &a1,
const FT &a2,
379 const FT &b1,
const FT &b2,
380 const FT &c1,
const FT &c2,
383 FT
denom = a1*b2-b1*a2;
385 x = - (b1*c2-c1*b2)/denom;
387 y = (a1*c2-c1*a2)/denom;
391 static void solve (
const FT &a1,
const FT &a2,
const FT &a3,
392 const FT &b1,
const FT &b2,
const FT &b3,
393 const FT &c1,
const FT &c2,
const FT &c3,
394 const FT &d1,
const FT &d2,
const FT &d3,
397 FT
denom = b2*c1*a3-b1*c2*a3+c3*b1*a2+b3*c2*a1-c1*b3*a2-b2*c3*a1;
399 x = - (b2*c3*d1-b2*c1*d3+c1*b3*d2+b1*c2*d3-c3*b1*d2-b3*c2*d1)/denom;
401 z = (b2*d1*a3-b2*a1*d3+b1*a2*d3-b1*d2*a3-d1*b3*a2+a1*b3*d2)/denom;
403 y = (a2*c3*d1-a2*c1*d3-c2*d1*a3+c2*a1*d3+d2*c1*a3-d2*c3*a1)/denom;
410 solve( A[0][0], A[0][1], A[0][2], A[1][0], A[1][1], A[1][2],
411 A[2][0], A[2][1], A[2][2], q[0], q[1], q[2],
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?
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.
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 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.
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.
COM::Window * _wrk_window
The working window.
#define MOP_END_NAMESPACE
void redistribute_vertices_ridge()
Redistribute ridge vertices within their tangent spaces.
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.
int _monotone
Impose non-decreasing quality?
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.
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
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.
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
void perform_iterative_smoothing()
Perform iterative smoothing.
std::vector< std::vector< bool > > _is_shared_node
Is the node shared?
float _tol
Smoother iterating tolerance.
std::vector< std::set< Edge_ID > > _edges
ridge edges