예제 #1
0
        private void applybutton_Click(object sender, EventArgs e)
        {
            FPSParameters plocal = new FPSParameters();

            StoreCurrentValues(ref plocal);
            _param[config_comboBox.SelectedItem.ToString()] = plocal;

            // permanently save current values
            _lastsaved       = new Dictionary <string, FPSParameters>(_param);
            _convp_lastsaved = _convp;
            _avp_lastsaved   = _avp;
        }
예제 #2
0
        private void config_comboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            // store current parameters, display new
            if (_lastconfig != null)
            {
                FPSParameters plocal = new FPSParameters();
                StoreCurrentValues(ref plocal);
                _param[_lastconfig] = plocal;
            }

            _lastconfig = config_comboBox.SelectedItem.ToString();
            DisplayStoredValues(_param[_lastconfig]);

            groupBox1.Enabled            = (config_comboBox.SelectedIndex < ProjectData.DockModes.Length);
            groupBox2.Enabled            = (config_comboBox.SelectedIndex < ProjectData.DockModes.Length);
            rkt_numericBoxDouble.Enabled = (config_comboBox.SelectedIndex == 3);
        }
예제 #3
0
 private void DisplayStoredValues(FPSParameters sp)
 {
     this.viscosity_numericBoxDouble.Value         = sp.ViscosityFactor;
     this.dt_numericBoxDouble.Value                = sp.TimeStepFactor;
     this.niter_numericBoxDouble.Value             = sp.MaxIterations / 1000.0;
     this.maxF_numericBoxDouble.Value              = sp.MaxForce;
     this.clashtol_numericBoxDouble.Value          = sp.ClashTolerance;
     this.rkt_numericBoxDouble.Value               = sp.rkT;
     this.etol_numericBoxDouble.Value              = sp.ETolerance;
     this.ktol_numericBoxDouble.Value              = sp.KTolerance;
     this.ftol_numericBoxDouble.Value              = sp.FTolerance;
     this.ttol_numericBoxDouble.Value              = sp.TTolerance;
     this.selR_comboBox.SelectedIndex              = (Int32)sp.OptimizeSelected;
     this.R0_numericBoxDouble.Value                = _convp.R0;
     this.polorder_numericBoxInt32.Value           = _convp.PolynomOrder;
     this.avgrid_rel_numericBoxDouble.Value        = _avp.GridSize;
     this.avgrid_min_numericBoxDouble.Value        = _avp.MinGridSize;
     this.av_linkersphere_numericBoxDouble.Value   = _avp.LinkerInitialSphere;
     this.av_linksearchorder_numericBoxInt32.Value = _avp.LinkSearchNodes;
     this.esamples_numericBoxInt32.Value           = (Int32)(_avp.ESamples / 1000);
 }
예제 #4
0
 private void StoreCurrentValues(ref FPSParameters sp)
 {
     sp.ViscosityFactor       = this.viscosity_numericBoxDouble.Value;
     sp.TimeStepFactor        = this.dt_numericBoxDouble.Value;
     sp.MaxIterations         = (Int32)(this.niter_numericBoxDouble.Value * 1000.0);
     sp.MaxForce              = this.maxF_numericBoxDouble.Value;
     sp.ClashTolerance        = this.clashtol_numericBoxDouble.Value;
     sp.rkT                   = this.rkt_numericBoxDouble.Value;
     sp.ETolerance            = this.etol_numericBoxDouble.Value;
     sp.KTolerance            = this.ktol_numericBoxDouble.Value;
     sp.FTolerance            = this.ftol_numericBoxDouble.Value;
     sp.TTolerance            = this.ttol_numericBoxDouble.Value;
     sp.OptimizeSelected      = (OptimizeSelected)this.selR_comboBox.SelectedIndex;
     _convp.R0                = this.R0_numericBoxDouble.Value;
     _convp.PolynomOrder      = this.polorder_numericBoxInt32.Value;
     _avp.ESamples            = esamples_numericBoxInt32.Value * 1000;
     _avp.GridSize            = avgrid_rel_numericBoxDouble.Value;
     _avp.MinGridSize         = avgrid_min_numericBoxDouble.Value;
     _avp.LinkerInitialSphere = av_linkersphere_numericBoxDouble.Value;
     _avp.LinkSearchNodes     = av_linksearchorder_numericBoxInt32.Value;
 }
예제 #5
0
        // default values
        public ProjectData()
        {
            ProjectFPSMode      = FPSMode.None;
            this._fpsparameters = new Dictionary <string, FPSParameters>(DockModes.Length + FilterModes.Length);

            // default search parameters
            FPSParameters dockParameters = new FPSParameters()
            {
                ViscosityFactor  = 1.0,
                TimeStepFactor   = 1.0,
                MaxIterations    = 200000,
                MaxForce         = 400.0,
                ClashTolerance   = 1.0,
                rkT              = 10,
                ETolerance       = 100,
                KTolerance       = 0.001,
                FTolerance       = 0.001,
                TTolerance       = 0.02,
                OptimizeSelected = OptimizeSelected.Selected
            };

            this._fpsparameters.Add("Dock", dockParameters);

            // default refine parameters
            FPSParameters refineParameters = new FPSParameters()
            {
                ViscosityFactor  = 0.7,
                TimeStepFactor   = 0.5,
                MaxIterations    = 500000,
                MaxForce         = 10000.0,
                ClashTolerance   = 0.5,
                rkT              = 10,
                ETolerance       = 100,
                KTolerance       = 0.0005,
                FTolerance       = 0.0005,
                TTolerance       = 0.01,
                OptimizeSelected = OptimizeSelected.All
            };

            this._fpsparameters.Add("Refine", refineParameters);

            // default error estimation parameters
            FPSParameters errorParameters = new FPSParameters()
            {
                ViscosityFactor  = 0.7,
                TimeStepFactor   = 1.0,
                MaxIterations    = 100000,
                MaxForce         = 10000.0,
                ClashTolerance   = 0.5,
                rkT              = 10,
                ETolerance       = 100,
                KTolerance       = 0.001,
                FTolerance       = 0.001,
                TTolerance       = 0.02,
                OptimizeSelected = OptimizeSelected.All
            };

            this._fpsparameters.Add("Error estimation", errorParameters);

            // default error estimation parameters
            FPSParameters sampleParameters = new FPSParameters()
            {
                ViscosityFactor  = 1.0,
                TimeStepFactor   = 1.0,
                MaxIterations    = 8000,
                MaxForce         = 400.0,
                ClashTolerance   = 1.0,
                rkT              = 10,
                ETolerance       = 100,
                KTolerance       = 0.001,
                FTolerance       = 0.001,
                TTolerance       = 0.02,
                OptimizeSelected = OptimizeSelected.Selected
            };

            this._fpsparameters.Add("Sample", sampleParameters);

            // default screening parameters
            FPSParameters screeningParameters = new FPSParameters()
            {
                ViscosityFactor  = 1.0,
                TimeStepFactor   = 1.0,
                MaxIterations    = 200000,
                MaxForce         = 400.0,
                ClashTolerance   = 1.0,
                rkT              = 10,
                ETolerance       = 100,
                KTolerance       = 0.001,
                FTolerance       = 0.001,
                TTolerance       = 0.02,
                OptimizeSelected = OptimizeSelected.Selected
            };

            this._fpsparameters.Add("Screening", screeningParameters);

            // default conversion parameters
            _conversionParameters.R0           = 52.0;
            _conversionParameters.PolynomOrder = 3;

            // default AV parameters
            AVGlobalParameters _avGlobalParameters = new AVGlobalParameters()
            {
                GridSize            = 0.2,
                MinGridSize         = 0.4,
                LinkerInitialSphere = 0.5,
                LinkSearchNodes     = 3,
                ESamples            = 200000
            };

            this.AVGlobalParameters = _avGlobalParameters;
        }
예제 #6
0
 public void SetFpsParameters(string key, FPSParameters value)
 {
     this._fpsparameters[key] = value;
 }