Commit ca30bab8 authored by Jean-François Remacle's avatar Jean-François Remacle

A

Merge branch 'master' of http://gitlab.onelab.info/gmsh/gmsh
parents 8b2d1925 67f92052
......@@ -348,7 +348,7 @@ void partition_dialog()
Fl_Value_Input *const o =
new Fl_Value_Input(WB, y, 2 * BB / 3, BH, "Triangle");
dlg.inputTriWeight = o;
o->minimum(1);
o->minimum(-1);
o->maximum(std::numeric_limits<int>::max());
o->step(1);
o->align(FL_ALIGN_RIGHT);
......@@ -357,7 +357,7 @@ void partition_dialog()
Fl_Value_Input *const o = new Fl_Value_Input(
2 * WB + (w / 3 - WB), y, 2 * BB / 3, BH, "Tetrahedron");
dlg.inputTetWeight = o;
o->minimum(1);
o->minimum(-1);
o->maximum(std::numeric_limits<int>::max());
o->step(1);
o->align(FL_ALIGN_RIGHT);
......@@ -366,7 +366,7 @@ void partition_dialog()
Fl_Value_Input *const o = new Fl_Value_Input(3 * WB + 2 * (w / 3 - WB), y,
2 * BB / 3, BH, "Prism");
dlg.inputPriWeight = o;
o->minimum(1);
o->minimum(-1);
o->maximum(std::numeric_limits<int>::max());
o->step(1);
o->align(FL_ALIGN_RIGHT);
......@@ -377,7 +377,7 @@ void partition_dialog()
Fl_Value_Input *const o =
new Fl_Value_Input(WB, y, 2 * BB / 3, BH, "Quadrangle");
dlg.inputQuaWeight = o;
o->minimum(1);
o->minimum(-1);
o->maximum(std::numeric_limits<int>::max());
o->step(1);
o->align(FL_ALIGN_RIGHT);
......@@ -386,7 +386,7 @@ void partition_dialog()
Fl_Value_Input *const o = new Fl_Value_Input(
2 * WB + (w / 3 - WB), y, 2 * BB / 3, BH, "Hexahedron");
dlg.inputHexWeight = o;
o->minimum(1);
o->minimum(-1);
o->maximum(std::numeric_limits<int>::max());
o->step(1);
o->align(FL_ALIGN_RIGHT);
......@@ -395,7 +395,7 @@ void partition_dialog()
Fl_Value_Input *const o = new Fl_Value_Input(3 * WB + 2 * (w / 3 - WB), y,
2 * BB / 3, BH, "Pyramid");
dlg.inputPyrWeight = o;
o->minimum(1);
o->minimum(-1);
o->maximum(std::numeric_limits<int>::max());
o->step(1);
o->align(FL_ALIGN_RIGHT);
......
......@@ -127,19 +127,35 @@ public:
return;
_vwgt = new unsigned int[_ne];
for(unsigned int i = 0; i < _ne; i++) {
if(!_element[i]) {
_vwgt[i] = 1;
continue;
}
switch(_element[i]->getType()) {
case TYPE_TRI: _vwgt[i] = CTX::instance()->mesh.partitionTriWeight; break;
case TYPE_QUA: _vwgt[i] = CTX::instance()->mesh.partitionQuaWeight; break;
case TYPE_TET: _vwgt[i] = CTX::instance()->mesh.partitionTetWeight; break;
case TYPE_PYR: _vwgt[i] = CTX::instance()->mesh.partitionPyrWeight; break;
case TYPE_PRI: _vwgt[i] = CTX::instance()->mesh.partitionPriWeight; break;
case TYPE_HEX: _vwgt[i] = CTX::instance()->mesh.partitionHexWeight; break;
default: _vwgt[i] = 1; break;
if(CTX::instance()->mesh.partitionTriWeight == -1 ||
CTX::instance()->mesh.partitionQuaWeight == -1 ||
CTX::instance()->mesh.partitionTetWeight == -1 ||
CTX::instance()->mesh.partitionPyrWeight == -1 ||
CTX::instance()->mesh.partitionPriWeight == -1 ||
CTX::instance()->mesh.partitionHexWeight == -1) {
for(unsigned int i = 0; i < _ne; i++) {
if(!_element[i]) {
_vwgt[i] = (_element[i]->getDim() == _dim ? 1 : 0);
continue;
}
}
}
else{
for(unsigned int i = 0; i < _ne; i++) {
if(!_element[i]) {
_vwgt[i] = 1;
continue;
}
switch(_element[i]->getType()) {
case TYPE_TRI: _vwgt[i] = CTX::instance()->mesh.partitionTriWeight; break;
case TYPE_QUA: _vwgt[i] = CTX::instance()->mesh.partitionQuaWeight; break;
case TYPE_TET: _vwgt[i] = CTX::instance()->mesh.partitionTetWeight; break;
case TYPE_PYR: _vwgt[i] = CTX::instance()->mesh.partitionPyrWeight; break;
case TYPE_PRI: _vwgt[i] = CTX::instance()->mesh.partitionPriWeight; break;
case TYPE_HEX: _vwgt[i] = CTX::instance()->mesh.partitionHexWeight; break;
default: _vwgt[i] = 1; break;
}
}
}
}
......
......@@ -272,37 +272,37 @@ Default value: @code{-1}@*
Saved in: @code{General.OptionsFileName}
@item Mesh.PartitionHexWeight
Weight of hexahedral element for METIS load balancing@*
Weight of hexahedral element for METIS load balancing (if -1: partition weights are set to 1 for elements having the same dimension as the geometry, otherwise there are set to 0)@*
Default value: @code{1}@*
Saved in: @code{General.OptionsFileName}
@item Mesh.PartitionPrismWeight
Weight of prismatic element (wedge) for METIS load balancing@*
Weight of prismatic element (wedge) for METIS load balancing (if -1: partition weights are set to 1 for elements having the same dimension as the geometry, otherwise there are set to 0)@*
Default value: @code{1}@*
Saved in: @code{General.OptionsFileName}
@item Mesh.PartitionPyramidWeight
Weight of pyramidal element for METIS load balancing@*
Weight of pyramidal element for METIS load balancing (if -1: partition weights are set to 1 for elements having the same dimension as the geometry, otherwise there are set to 0)@*
Default value: @code{1}@*
Saved in: @code{General.OptionsFileName}
@item Mesh.PartitionTrihedronWeight
Weight of trihedron element for METIS load balancing@*
Weight of trihedron element for METIS load balancing (if -1: partition weights are set to 1 for elements having the same dimension as the geometry, otherwise there are set to 0)@*
Default value: @code{0}@*
Saved in: @code{General.OptionsFileName}
@item Mesh.PartitionQuadWeight
Weight of quadrangle for METIS load balancing@*
Weight of quadrangle for METIS load balancing (if -1: partition weights are set to 1 for elements having the same dimension as the geometry, otherwise there are set to 0)@*
Default value: @code{1}@*
Saved in: @code{General.OptionsFileName}
@item Mesh.PartitionTetWeight
Weight of tetrahedral element for METIS load balancing@*
Weight of tetrahedral element for METIS load balancing (if -1: partition weights are set to 1 for elements having the same dimension as the geometry, otherwise there are set to 0)@*
Default value: @code{1}@*
Saved in: @code{General.OptionsFileName}
@item Mesh.PartitionTriWeight
Weight of triangle element for METIS load balancing@*
Weight of triangle element for METIS load balancing (if -1: partition weights are set to 1 for elements having the same dimension as the geometry, otherwise there are set to 0)@*
Default value: @code{1}@*
Saved in: @code{General.OptionsFileName}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment