26 #define USE_STD_INCLUDES 1
27 #define USE_C_PREFIX_INCLUDES 1
29 #include "MeshImpl.hpp"
30 #include "MesquiteError.hpp"
31 #include "InstructionQueue.hpp"
32 #include "MeshSet.hpp"
33 #include "TerminationCriterion.hpp"
34 #include "QualityAssessor.hpp"
35 #include "PlanarDomain.hpp"
36 #include "ShapeImprovementWrapper.hpp"
39 #include "MeanRatioQualityMetric.hpp"
40 #include "EdgeLengthQualityMetric.hpp"
41 #include "LPtoPTemplate.hpp"
42 #include "FeasibleNewton.hpp"
43 #include "ConjugateGradient.hpp"
44 #include "MsqMessage.hpp"
47 using namespace Mesquite;
70 using MAP::Pane_connectivity;
71 using MAP::Pane_communicator;
78 cout <<
"Entering Rocmop::~Rocmop\n";
81 delete _wrk_window; _wrk_window = NULL;
85 cout <<
"Exiting Rocmop::~Rocmop\n";
94 std::string glb=mname+
".global";
105 glb.c_str(),
"biB", types);
109 glb.c_str(),
"bb", types);
114 glb.c_str(),
"bii", types);
123 std::string glb=mname+
".global";
133 COM::Attribute *disp){
136 cout <<
"Entering Rocmop::smooth\n";
138 int pmesh_id = pmesh->id();
141 "Input to Rocmop::smooth must be a pmesh.");
142 _is_pmesh = (pmesh_id ==
COM_PMESH) ?
true :
false;
144 if(_wrk_window)
delete _wrk_window;
145 _usr_window = pmesh->window();
149 std::cout <<
" Creating(clone) buffer window." << std::endl;
150 std::string buf_name(_usr_window->name()+
"-Rocmopbuf");
151 _wrk_window =
new COM::Window(buf_name,
152 _usr_window->get_communicator());
153 _wrk_window->inherit( const_cast<COM::Attribute*>(pmesh),
"",
154 COM::Pane::INHERIT_CLONE,
true, NULL, 0);
155 _wrk_window->init_done();
157 std::vector<const Pane*> allpanes;
158 _wrk_window->panes(allpanes);
160 double pre_worst = 180.0, post_worst = 0.0;
163 if(_monotone || _lazy){
164 pre_worst = check_all_elem_quality(allpanes);
166 agree_double(pre_worst,
MPI_MAX);
169 bool to_smooth = (!_lazy || (pre_worst > 180.*_tol));
173 perform_smoothing(pre_worst);
176 if(_monotone || (_tol!=0.0)){
177 post_worst = check_all_elem_quality(allpanes);
178 agree_double(post_worst,
MPI_MAX);
182 if(_monotone && (pre_worst > post_worst)){
183 cerr <<
"Warning, smoothing would have degraded mesh quality \n"
184 <<
"so the mesh has not been modified.\n";
189 if(_tol && (post_worst < _tol)){
190 cerr <<
"Warning, post-smoothing mesh quality is below specified minimum "
195 const COM::Attribute *old_nc = pmesh->window()->attribute(
COM::COM_NC);
196 const COM::Attribute *new_nc = (degraded || !to_smooth) ?
201 std::cout <<
"Exiting rocmop::smooth" << std::endl;
207 std::cout <<
"Entering rocmop::smooth_in_place" << std::endl;
209 int pmesh_id = pmesh->id();
213 "Input to Rocmop::smooth_in_place must be a mesh or pmesh");
217 _usr_window = pmesh->window();
223 _wrk_window =
new COM::Window(_usr_window->name()+
"-Rocmopbuf",
224 _usr_window->get_communicator());
225 _wrk_window->inherit( const_cast<COM::Attribute*>(pmesh),
"",
226 false,
true, NULL, 0);
227 _wrk_window->init_done();
229 std::vector<const Pane*> allpanes;
230 _wrk_window->panes(allpanes);
232 double pre_worst = 180.0, post_worst = 0.0;
235 if(_monotone || _lazy) {
236 pre_worst = check_all_elem_quality(allpanes);
238 agree_double(pre_worst,
MPI_MIN);
241 bool to_smooth = (!_lazy || (pre_worst > 180.*_tol));
244 perform_smoothing(pre_worst);
247 if(_monotone || (_tol!=0.0)){
248 post_worst = check_all_elem_quality(allpanes);
249 agree_double(post_worst,
MPI_MIN);
253 if(_monotone && (pre_worst > post_worst))
254 cerr <<
"Warning, mesh quality degraded during smoothing in place." << endl;
257 if(_tol && (post_worst < _tol)){
258 cerr <<
"Warning, post-smoothing mesh quality is below specified minimum "
263 if (_wrk_window){
delete _wrk_window;_wrk_window = NULL;}
266 std::cout <<
"Exiting rocmop::smooth_in_place" << std::endl;
271 std::cout <<
" Entering Rocmop::perform_smoothing" << std::endl;
276 smoother_specific_init();
280 perform_noniterative_smoothing();
281 else if( _method < SMOOTH_NONE)
282 perform_iterative_smoothing(pre_quality);
287 std::cout <<
" Exiting Rocmop::perform_smoothing" << std::endl;
292 std::cout <<
" Entering Rocmop::perform_iterative_smoothing" << std::endl;
299 std::vector<const Pane*> allpanes;
300 _wrk_window->panes(allpanes);
301 double cur_qual = pre_quality;
304 ( (
i < _niter) && (to_iter) );
308 std::cout <<
" Smoothing iteration " <<
i << std::endl;
311 if(_method==SMOOTH_VOL_MESQ_WG){
314 smooth_vol_mesq_wg(cur_qual);
318 else if(_method == SMOOTH_VOL_MESQ_NG){
321 smooth_vol_mesq_ng(cur_qual);
324 if((_method==SMOOTH_VOL_MESQ_WG) || (_method==SMOOTH_VOL_MESQ_NG))
327 else if(_method==SMOOTH_SURF_MEDIAL)
328 smooth_surf_medial();
334 cur_qual = check_all_elem_quality(allpanes);
341 std::cout <<
" Exiting Rocmop::perform_iterative_smoothing" << std::endl;
346 std::cout <<
" Entering Rocmop::perform_noniterative_smoothing" << std::endl;
349 std::cerr <<
"Although the maximum number of iterations > 1 is selected,\n"
350 <<
"the smoothing method is noniterative, and will run once.\n";
358 std::cout <<
" Exiting Rocmop::perform_noniterative_smoothing" << std::endl;
366 std::cout <<
" Entering Rocmop::smoother_specific_init" << std::endl;
369 if(_wm){
delete _wm; _wm = NULL; }
372 if(_method==SMOOTH_SURF_MEDIAL){
383 case SMOOTH_VOL_MESQ_WG: {
387 determine_shared_border();
392 case SMOOTH_VOL_MESQ_NG: {
395 const std::string surf_attr(
"is_surface");
396 const COM::Attribute *w_is_surface = _usr_window->attribute(surf_attr);
400 "Surface-list must have integer type");
402 "Surface-list must be nodal");
404 "Surface-list must have a single component");
406 "Surface-list must be initialized");
409 COM::Attribute * new_attr =
410 _wrk_window->inherit( const_cast<COM::Attribute *>(w_is_surface),
411 surf_attr, COM::Pane::INHERIT_CLONE,
true, NULL, 0);
415 COM::Attribute* w_surf_attr =
416 _wrk_window->new_attribute(
"is_surface",
'n',
COM_INT, 1,
"");
417 _wrk_window->resize_array( w_surf_attr, 0);
419 determine_physical_border(w_surf_attr);
421 _wrk_window->init_done();
428 case SMOOTH_VOL_MESQ_WG:
429 case SMOOTH_VOL_MESQ_NG:
434 case SMOOTH_SURF_MEDIAL: {
437 COM::Attribute* w_disps =
438 _wrk_window->new_attribute(
"disps",
'n',
COM_DOUBLE, 3,
"");
439 _wrk_window->resize_array( w_disps, 0);
441 COM::Attribute* w_facenormals =
442 _wrk_window->new_attribute(
"facenormals",
'e',
COM_DOUBLE, 3,
"");
443 _wrk_window->resize_array( w_facenormals, 0);
445 COM::Attribute* w_facecenters =
446 _wrk_window->new_attribute(
"facecenters",
'e',
COM_DOUBLE, 3,
"");
447 _wrk_window->resize_array( w_facecenters, 0);
449 COM::Attribute* w_eigvalues =
450 _wrk_window->new_attribute(
"lambda",
'n',
COM_DOUBLE, 3,
"");
451 _wrk_window->resize_array( w_eigvalues, 0);
453 COM::Attribute* w_vnormals =
454 _wrk_window->new_attribute(
"vnormals",
'n',
COM_DOUBLE, 3,
"");
455 _wrk_window->resize_array( w_vnormals, 0);
457 COM::Attribute* w_awnormals =
458 _wrk_window->new_attribute(
"awnormals",
'n',
COM_DOUBLE, 3,
"");
459 _wrk_window->resize_array( w_awnormals, 0);
461 COM::Attribute* w_uwnormals =
462 _wrk_window->new_attribute(
"uwnormals",
'n',
COM_DOUBLE, 3,
"");
463 _wrk_window->resize_array( w_uwnormals, 0);
465 COM::Attribute* w_eigvecs =
466 _wrk_window->new_attribute(
"eigvecs",
'n',
COM_DOUBLE, 9,
"");
467 _wrk_window->resize_array( w_eigvecs, 0);
469 COM::Attribute* w_tangranks =
470 _wrk_window->new_attribute(
"tangranks",
'n',
COM_INT, 1,
"");
471 _wrk_window->resize_array( w_tangranks, 0);
473 COM::Attribute* w_cntnranks =
474 _wrk_window->new_attribute(
"cntnranks",
'n',
COM_INT, 1,
"");
475 _wrk_window->resize_array( w_cntnranks, 0);
477 COM::Attribute* w_cntnvecs =
478 _wrk_window->new_attribute(
"cntnvecs",
'n',
COM_DOUBLE, 6,
"");
479 _wrk_window->resize_array( w_cntnvecs, 0);
481 COM::Attribute* w_scales =
482 _wrk_window->new_attribute(
"scales",
'n',
COM_DOUBLE, 1,
"");
483 _wrk_window->resize_array( w_scales, 0);
485 COM::Attribute* w_weights =
486 _wrk_window->new_attribute(
"weights",
'n',
COM_DOUBLE, 1,
"");
487 _wrk_window->resize_array( w_weights, 0);
489 COM::Attribute* w_weights2 =
490 _wrk_window->new_attribute(
"weights2",
'n',
COM_DOUBLE, 1,
"");
491 _wrk_window->resize_array( w_weights2, 0);
493 COM::Attribute* w_barycrds =
494 _wrk_window->new_attribute(
"barycrds",
'n',
COM_DOUBLE, 2,
"");
495 _wrk_window->resize_array( w_barycrds, 0);
497 COM::Attribute* w_PNelemids =
498 _wrk_window->new_attribute(
"PNelemids",
'n',
COM_INT, 1,
"");
499 _wrk_window->resize_array( w_PNelemids, 0);
503 COM::Attribute * w_pnt_contrib =
504 _wrk_window->new_attribute(
"pnt_contrib",
'n',
COM_DOUBLE, 3,
"");
505 _wrk_window->resize_array(w_pnt_contrib, 0);
507 COM::Attribute * w_disp_count =
508 _wrk_window->new_attribute(
"disp_count",
'n',
COM_DOUBLE, 1,
"");
509 _wrk_window->resize_array(w_disp_count, 0);
511 _wrk_window->init_done();
526 std::cout <<
" Exiting Rocmop::smoother_specific_init" << std::endl;
532 std::cout <<
"Entering Rocmop::set_value" << std::endl;
537 "Rocmop::set_value does not except NULL parameters");
539 if(opt) option = opt;
540 if ( option ==
"method") {
542 ,
"Illegal value for 'method' option");
543 _method = *((
int*)value);
545 else if ( option ==
"verbose"){
546 _verb = *((
int*)value); }
547 else if ( option ==
"lazy"){
548 _lazy = *((
int*)value); }
549 else if ( option ==
"tol"){
551 ,
"Illegal value for 'method' option");
552 _tol = *((
float*)value); }
553 else if ( option ==
"niter"){
554 _niter = *((
int*)value); }
555 else if ( option ==
"ctol"){
557 ,
"Illegal value for 'method' option");
558 _ctol = *((
float*)value); }
559 else if ( option ==
"ncycle"){
560 _ncycle = *((
int*)value); }
561 else if ( option ==
"inverted"){
562 _invert = *((
int*)value);
567 std::cout <<
"Exiting Rocmop::set_value" << std::endl;
578 bool wg = (ghost_level == 0) ?
false :
true;
596 Pane_communicator pc(att->window(), att->window()->get_communicator());
598 pc.begin_update_shared_nodes();
599 pc.reduce_on_shared_nodes(
MPI_SUM);
600 pc.end_update_shared_nodes();
605 std::cout <<
"Entering Rocmop::determine_pane_border" << std::endl;
607 std::vector<const COM::Pane*> allpanes;
608 _wrk_window->panes(allpanes);
609 int local_npanes = (int)allpanes.size();
611 _is_pane_bnd_node.resize(local_npanes);
612 _is_pane_bnd_elem.resize(local_npanes);
614 for(
int i=0;
i< local_npanes; ++
i){
615 int size_of_real_nodes = allpanes[
i]->size_of_real_nodes();
616 int size_of_real_elems = allpanes[
i]->size_of_real_elements();
617 _is_pane_bnd_node[
i].resize(size_of_real_nodes,0);
619 std::vector<bool> is_isolated;
620 MAP::Pane_boundary pb (allpanes[
i]);
621 pb.determine_border_nodes(_is_pane_bnd_node[i], is_isolated);
624 mark_elems_from_nodes(_is_pane_bnd_node,_is_pane_bnd_elem);
627 std::cout <<
"Exiting Rocmop::determine_pane_border" << std::endl;
633 std::cout <<
"Entering Rocmop::determine_shared_nodes" << std::endl;
635 std::vector<const COM::Pane*> allpanes;
636 _wrk_window->panes(allpanes);
637 int local_npanes = (int)allpanes.size();
639 _is_shared_node.resize(local_npanes);
642 for(
int i=0;
i < (int)(local_npanes); ++
i){
648 _is_shared_node[
i].resize(allpanes[
i]->size_of_real_nodes(),0);
652 for (
int j=0,
nj=vs_size;
j<
nj;
j+=vs[
j+1]+2) {
653 if (_wrk_window->owner_rank( vs[
j]) >=0) ++count;
658 for (
int j=0;
j<count; ++
j, index+=vs[index+1]+2) {
660 while ( _wrk_window->owner_rank(vs[index])<0) {
661 index+=vs[index+1]+2;
665 for(
int k=0;
k<vs[index+1]; ++
k){
666 _is_shared_node[
i][vs[index+2+
k]-1] = 1;
671 mark_elems_from_nodes(_is_shared_node,_is_shared_elem);
674 std::cout <<
"Exiting Rocmop::determine_shared_nodes" << std::endl;
679 std::cout <<
"Entering Rocmop::determine_physical_border()" << std::endl;
681 const std::string surf_attr(
"is_surface");
682 COM::Attribute* w_is_surface = _wrk_window->attribute(surf_attr);
684 int is_surface_id = w_is_surface->id();
686 std::vector<const COM::Pane*> allpanes;
687 _wrk_window->panes(allpanes);
688 int local_npanes = (int)allpanes.size();
690 _is_pane_bnd_node.resize(local_npanes);
692 for(
int i=0;
i < local_npanes; ++
i){
693 _is_pane_bnd_node[
i].resize(allpanes[
i]->size_of_real_nodes());
696 const COM::Attribute *p_is_surface = allpanes[
i]->attribute(is_surface_id);
697 int *is_surface_ptr = (
int*)p_is_surface->pointer();
700 for(
int j=0;
j< allpanes[
i]->size_of_real_nodes(); ++
j){
701 if (is_surface_ptr[
j])
702 _is_pane_bnd_node[
i][
j] =
true;
706 mark_elems_from_nodes(_is_pane_bnd_node,_is_pane_bnd_elem);
709 std::cout <<
"Exiting Rocmop::determine_physical_border()" << std::endl;
713 std::vector<std::vector<bool> > &marked_elems){
715 std::cout <<
"Entering Rocmop::mark_elems_from_nodes" << std::endl;
717 std::vector<const COM::Pane*> allpanes;
718 _wrk_window->panes(allpanes);
719 int local_npanes = (int)allpanes.size();
721 marked_elems.clear();
722 marked_elems.resize(local_npanes);
725 for(
int i=0;
i < (int)(local_npanes); ++
i){
727 marked_elems[
i].clear();
728 marked_elems[
i].resize(allpanes[
i]->size_of_real_elements(),
false);
732 int s_real_elems = allpanes[
i]->size_of_real_elements();
733 std::vector<int> nodes;
734 for(
int j=1;
j<= s_real_elems; ++
j){
735 Element_node_enumerator ene(allpanes[
i],
j);
736 ene.get_nodes(nodes);
737 for(
int k=0,
nk=nodes.size();
k<
nk; ++
k){
738 if (marked_nodes[i][nodes[
k]-1])
739 marked_elems[
i][
j-1] =
true;
745 std::cout <<
"Exiting Rocmop::mark_elems_from_nodes" << std::endl;
749 std::vector<Pane*> allpanes;
750 _wrk_window->panes(allpanes);
751 for(
int i=0,
ni = allpanes.size();
i<
ni; ++
i){
761 std::vector<COM::Pane*> &allpanes){
763 std::cout <<
"Entering Rocmop::check_marked_elems" << std::endl;
765 double worst_angle = 0.0;
766 double angles[] = {0.0, 0.0};
767 for(
int i=0,
ni = allpanes.size();
i<
ni; ++
i){
768 for(
int k =0,
nk=allpanes[
i]->size_of_real_elements();
k<
nk; ++
k){
769 if(marked_elems[
i][
k]){
770 Element_node_enumerator ene(allpanes[
i],k+1);
774 if(angles[1]>worst_angle)
775 worst_angle = angles[1];
782 std::cout <<
"Exiting Rocmop::check_marked_elems" << std::endl;
788 std::cout <<
"Exiting Rocmop::check_all_elem_quality" << std::endl;
791 int ierr = MPI_Comm_rank( _wrk_window->get_communicator(),
792 &
rank); assert( ierr == 0);
793 double worst_angle = 0.0;
794 double angles[] = {0.0, 0.0};
795 for(
int i=0,
ni = allpanes.size();
i<
ni; ++
i){
796 int nk=allpanes[
i]->size_of_real_elements();
798 nk = allpanes[
i]->size_of_elements();
799 for(
int k =0;
k<
nk; ++
k){
800 Element_node_enumerator ene(allpanes[
i],
k+1);
804 if(angles[1]>worst_angle)
805 worst_angle = angles[1];
811 std::cout <<
"Exiting Rocmop::check_all_elem_quality" << std::endl;
817 std::cout <<
"Entering Rocmop::check_all_elem_quality" << std::endl;
820 int ierr = MPI_Comm_rank( _wrk_window->get_communicator(),
821 &
rank); assert( ierr == 0);
823 double worst_angle = 0.0;
824 double angles[] = {0.0, 0.0};
825 for(
int i=0,
ni = allpanes.size();
i<
ni; ++
i){
826 int nk=allpanes[
i]->size_of_real_elements();
828 nk = allpanes[
i]->size_of_elements();
830 for(
int k =0;
k<
nk; ++
k){
831 Element_node_enumerator ene(allpanes[
i],
k+1);
836 if(angles[1]>worst_angle)
837 worst_angle = angles[1];
843 std::cout <<
"Exiting Rocmop::check_all_elem_quality" << std::endl;
848 string outstr(
"angles.txt");
849 ofstream file (outstr.c_str(), std::ios::app);
852 std::vector<Pane*> allpanes;
853 _wrk_window->panes(allpanes);
855 double max_angle = 0.0;
856 double min_angle = 180.0;
857 double angles[] = {0.0, 0.0};
858 for(
int i=0,
ni = allpanes.size();
i<
ni; ++
i){
859 for(
int k =0,
nk=allpanes[
i]->size_of_real_elements();
k<
nk; ++
k){
860 Element_node_enumerator ene(allpanes[
i],
k+1);
864 if(angles[1]>max_angle)
865 max_angle = angles[1];
866 if(angles[0]<min_angle)
867 min_angle = angles[0];
872 agree_double(max_angle,
MPI_MAX);
873 agree_double(min_angle,
MPI_MIN);
874 int ierr = MPI_Comm_rank( _wrk_window->get_communicator(),
875 &
rank); assert( ierr == 0);
878 file << std::left << std::setw(30) << s << std::setw(0)
879 <<
"(" << min_angle <<
" , " << max_angle <<
")\n";
884 std::vector<std::vector<bool> > &to_check){
886 std::vector<std::vector<bool> > elem_to_check;
887 mark_elems_from_nodes(to_check, elem_to_check);
889 std::vector<Pane*> allpanes;
890 _wrk_window->panes(allpanes);
892 double max_angle = 0.0;
893 double min_angle = 180.0;
894 double angles[] = {0.0, 0.0};
896 for(
int i=0,
ni = allpanes.size();
i<
ni; ++
i){
897 for(
int k =0,
nk = elem_to_check[
i].size();
k<
nk; ++
k){
898 if(elem_to_check[
i][
k]){
899 Element_node_enumerator ene(allpanes[
i],k+1);
903 if(angles[1]>max_angle)
904 max_angle = angles[1];
905 if(angles[0]<min_angle){
907 min_angle = angles[0];
913 double temp = min_angle;
915 agree_double(max_angle,
MPI_MAX);
916 agree_double(min_angle,
MPI_MIN);
917 int ierr = MPI_Comm_rank( _wrk_window->get_communicator()
923 string outstr(
"angles.txt");
924 ofstream file (outstr.c_str(), std::ios::app);
927 file << std::left << std::setw(30) << s << std::setw(0)
928 <<
"(" << min_angle <<
" , " << max_angle <<
")";
934 int ierr = MPI_Barrier(_wrk_window->get_communicator());
936 if(min_angle == temp){
938 string outstr(
"angles.txt");
939 ofstream file (outstr.c_str(), std::ios::app);
942 file <<
" worst = (" << rank <<
" , " <<
id <<
")\n";
947 int ierr = MPI_Barrier(_wrk_window->get_communicator());
957 extern "C" void COM_F_FUNC2(rocmop_load_module, ROCMOP_LOAD_MODULE)(
const char *mname,
long int length)
960 extern "C" void COM_F_FUNC2(rocmop_unload_module, ROCMOP_UNLOAD_MODULE)(
const char *mname,
long int length)
static void sub(const Attribute *x, const Attribute *y, Attribute *z)
Operation wrapper for subtraction.
int COM_Type
Indices for derived data types.
void determine_physical_border()
Determine which nodes and elements are on the physical border.
void set_verb(int verb)
Set the MesqPane verbose level (int, >= 0)
Utility for constructing pane connectivities in parallel.
void invert()
Invert Tetrahedrons.
void smooth_in_place(COM::Attribute *pmesh)
Smooth a mesh in place..
virtual void compute(double atts[]) const
Calculate the metric value on this element.
double check_all_elem_quality(std::vector< const COM::Pane * > &allpanes, bool with_ghost=false)
Get the largest dihedral angle of all real elements.
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_GROUP_EMPTY INTEGER MPI_MAX
const char * option(const char *const name, const int argc, const char *const *const argv, const char *defaut, const char *const usage=0)
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 COM_delete_window(const char *wname)
Used to hold the error state and return it to the application.
void determine_pane_border()
Determine which nodes and elements are on pane borders.
#define COM_assertion_msg(EX, msg)
This file contains the prototypes for Roccom API.
3D geometric quality Metric declarations.
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_GROUP_EMPTY INTEGER MPI_MIN
A Roccom mesh optimization module.
virtual void run_instructions(MeshSet &ms, MsqError &err)
run_instructions runs the wrapper on the given MeshSet.
void COM_set_object(const char *wa_str, int pane_id, Type *addr)
Handles communication of shared nodes, ghost nodes or ghost cells across panes.
#define COM_F_FUNC2(lowcase, uppercase)
static void reduce_sum_on_shared_nodes(COM::Attribute *att)
Perform a sum-reduction on the shared nodes for the given attribute.
void Rocmop_unload_module(const char *mname)
double length(Vector3D *const v, int n)
void COM_get_object(const char *wa_str, int pane_id, Type **addr)
static int pconn_offset()
Retrieve an offset to avoid the number of communicating panes when reading a pconn attribute...
void perform_smoothing()
Perform smoothing on _buf_window.
void initialize(const COM::Attribute *pmesh)
Constructs the communication patterns of a distributed mesh.
void Rocmop_load_module(const char *mname)
virtual ~Rocmop()
Destructor.
#define MSQ_CHKERR(err)
Mesquite's Error Checking macro.
A class enabling Mesquite calls on Rocmop panes.
void perform_noniterative_smoothing()
Perform noniterative smoothing.
int COM_compatible_types(COM_Type type1, COM_Type type2)
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.
Wrapper which performs a Feasible Newton solve using an objective function template with inverse mea...
static void unload(const std::string &mname)
Unloads Rocmop from Roccom.
void determine_shared_border()
Determine which nodes and elements are shared.
void COM_window_init_done(const char *w_str, int pane_changed=true)
#define MOP_END_NAMESPACE
void COM_new_window(const char *wname, MPI_Comm c=MPI_COMM_NULL)
virtual void initialize(Vector_3< double > n[], int type)
Initialize a 3D Geometric Metric by nodal coords and element type.
Definition for Rocblas API.
void print_quality(std::string &s)
Print the quality range of all elements, for debugging.
void smooth(const COM::Attribute *pmesh, COM::Attribute *disp)
Smooth the mesh in a Rocmop managed buffer.
void smoother_specific_init()
Perform smoother specific initialization.
static void load(const std::string &mname)
Loads Rocmop onto Roccom with a given module name.
#define MOP_BEGIN_NAMESPACE
3D Max and Min Angle Metric Class
void int int REAL REAL REAL *z blockDim dim * ni
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_set_member_function(const char *wf_str, Member_func_ptr func, const char *wa_str, const char *intents, const COM_Type *types)
Geometric helper function header file.
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 smooth_mesquite(std::vector< COM::Pane * > &allpanes, int ghost_level=0)
Smooth the panes of the working window using MESQUITE.
void add_mesh(Mesquite::Mesh *mesh, MsqError &err)
adds a mesh to the MeshSet.
void perform_iterative_smoothing()
Perform iterative smoothing.
The MeshSet class stores one or more Mesquite::Mesh pointers and manages access to the mesh informati...
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_GROUP_EMPTY INTEGER MPI_SUM