================================================================================== The solver has been adapted to use Eigen's SparseQR QR decomposition algorithm. The original Dense QR implementation is maintained and can be selected using the Advanced Control TaskBox (see below). The use of SparseQR provides over an order of magnitude improvement in solving time in complex sketches due to the Sparse nature of the Jacobian matrix of the system of equations. The solver advanced control is a new TaskBox in the Sketcher that allows to select which algorithms are to be used for the different solving operations and tweak its parameters. It is not intended to be a user control, but means to debug solving problems and improve the algorithms and their configuration. This commit also introduces multithread support for Eigen. Currently it is only limited to products and does not provide a substantial speed improvement. It is expected to have more multithreaded operations in Eigen in the future. As a bonus, the TaskBoxes in the Taskbar of the Sketcher remember the last state (collapsed or deployed).
82 lines
3.5 KiB
C++
82 lines
3.5 KiB
C++
/***************************************************************************
|
|
* Copyright (c) 2015 Abdullah Tahiri <abdullah.tahiri.yo@gmail.com *
|
|
* *
|
|
* This file is part of the FreeCAD CAx development system. *
|
|
* *
|
|
* This library is free software; you can redistribute it and/or *
|
|
* modify it under the terms of the GNU Library General Public *
|
|
* License as published by the Free Software Foundation; either *
|
|
* version 2 of the License, or (at your option) any later version. *
|
|
* *
|
|
* This library is distributed in the hope that it will be useful, *
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
* GNU Library General Public License for more details. *
|
|
* *
|
|
* You should have received a copy of the GNU Library General Public *
|
|
* License along with this library; see the file COPYING.LIB. If not, *
|
|
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
|
* Suite 330, Boston, MA 02111-1307, USA *
|
|
* *
|
|
***************************************************************************/
|
|
|
|
|
|
#ifndef GUI_TASKVIEW_TaskSketcherSolverAdvanced_H
|
|
#define GUI_TASKVIEW_TaskSketcherSolverAdvanced_H
|
|
|
|
#include <Gui/TaskView/TaskView.h>
|
|
#include <Gui/Selection.h>
|
|
#include <boost/signals.hpp>
|
|
|
|
class Ui_TaskSketcherSolverAdvanced;
|
|
|
|
namespace App {
|
|
class Property;
|
|
}
|
|
|
|
namespace SketcherGui {
|
|
|
|
class ViewProviderSketch;
|
|
|
|
class TaskSketcherSolverAdvanced : public Gui::TaskView::TaskBox
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
TaskSketcherSolverAdvanced(ViewProviderSketch *sketchView);
|
|
~TaskSketcherSolverAdvanced();
|
|
|
|
private Q_SLOTS:
|
|
void on_comboBoxDefaultSolver_currentIndexChanged(int index);
|
|
void on_spinBoxMaxIter_valueChanged(int i);
|
|
void on_checkBoxSketchSizeMultiplier_stateChanged(int state);
|
|
void on_lineEditCovergence_editingFinished();
|
|
void on_comboBoxQRMethod_currentIndexChanged(int index);
|
|
void on_comboBoxRedundantDefaultSolver_currentIndexChanged(int index);
|
|
void on_lineEditRedundantConvergence_editingFinished();
|
|
void on_spinBoxRedundantSolverMaxIterations_valueChanged(int i);
|
|
void on_checkBoxRedundantSketchSizeMultiplier_stateChanged(int state);
|
|
void on_comboBoxDebugMode_currentIndexChanged(int index);
|
|
void on_lineEditSolverParam1_editingFinished();
|
|
void on_lineEditRedundantSolverParam1_editingFinished();
|
|
void on_lineEditSolverParam2_editingFinished();
|
|
void on_lineEditRedundantSolverParam2_editingFinished();
|
|
void on_lineEditSolverParam3_editingFinished();
|
|
void on_lineEditRedundantSolverParam3_editingFinished();
|
|
|
|
protected:
|
|
void updateDefaultMethodParameters(void);
|
|
void updateRedundantMethodParameters(void);
|
|
void updateSketchObject(void);
|
|
protected:
|
|
ViewProviderSketch *sketchView;
|
|
|
|
private:
|
|
QWidget* proxy;
|
|
Ui_TaskSketcherSolverAdvanced* ui;
|
|
};
|
|
|
|
} //namespace SketcherGui
|
|
|
|
#endif // GUI_TASKVIEW_TaskSketcherSolverAdvanced_H
|