GSL Multidim Minimizer - How to handle unphyiscal values

In summary, the program is trying to calculate the square root of unphysical values and is giving an error.
  • #1
DerBaer
4
0
Hello,

For my master thesis I'm looking at the Two-Higgs-Doublet-Modell at finite Temperature and I'm searching for the Minimum values of the two VEVs of the Doublets. Therefore i have my Potential with Input Parameters v1 and v2 in which I want to minimize the Potential and a Vector with User Input Parameters like the Temperature and the Couplings.

In the Progress of calculating the Potential I have 4 4x4 Matrices which depend on v1 and v2. I calculate the Eigenvalues with Eigen and in my Potential I need these Values to the Power of 3/2.

The actual Problem: For some values of v1 and v2 these Eigenvalues are negative and I need to get rid of these Input set as they are unphysical. The Minimization Process receives and Error at these unphysical values because the programm tries to calculate the square root of these Eigenvalues which gives NaN.
How can I tell the Minimizer to ignore those values? Either as an Option to the Minimizer or as an Output of the Function calculating the Potential.

To Minimize my Potential I use the gsl nmsimplex 2 Method as shown below (similiar to the GSL Manual Example).
Code:
const gsl_multimin_fminimizer_type *T = gsl_multimin_fminimizer_nmsimplex2;
  gsl_multimin_fminimizer *s = NULL;
  gsl_vector *ss, *x;
  gsl_multimin_function minex_func;

size_t iter = 0;
  int status;
  double size;

/* Starting point */
      x = gsl_vector_alloc (2);
      gsl_vector_set (x, 0, v1Start);
      gsl_vector_set (x, 1, v2Start);

/* Set initial step sizes to 1 */
      ss = gsl_vector_alloc (2);
      gsl_vector_set_all (ss, 1.0);

/* Initialize method and iterate */
      minex_func.n = 2;
      minex_func.f = my_f;
      minex_func.params = par;

      s = gsl_multimin_fminimizer_alloc (T, 2);
      gsl_multimin_fminimizer_set (s, &minex_func, x, ss);      do
        {
          iter++;
          status = gsl_multimin_fminimizer_iterate(s);

          if (status)
            break;

          size = gsl_multimin_fminimizer_size (s);
          status = gsl_multimin_test_size (size, C_MinTOL); // Teste Toleranz auf MinTOL

          if (status == GSL_SUCCESS)
            {
              printf ("converged to minimum at\n");
              printf ("%5d %10.3e %10.3e f() = %7.3f size = %.3f\n",
                  iter,
                  gsl_vector_get (s->x, 0),
                  gsl_vector_get (s->x, 1),
                  s->fval, size);
                printf(" at Temperature %lf \n " , Temptmp);
              
            }        }
      while (status == GSL_CONTINUE && iter < 1000);
 
Technology news on Phys.org
  • #2
Another possibility would be to change the Minimization Method (doesn't have to be gsl). So if you know one which could handle this case, please let me know it.
 

1. What is GSL Multidim Minimizer?

GSL Multidim Minimizer is a software library written in C that provides algorithms for multidimensional minimization of differentiable functions. It is part of the GNU Scientific Library (GSL) and is used for solving optimization problems in scientific research and engineering applications.

2. How does GSL Multidim Minimizer handle unphysical values?

GSL Multidim Minimizer has built-in checks to handle unphysical values, such as NaN (Not a Number) or Inf (Infinity). It will automatically terminate the minimization process and return an error message if it encounters such values. This helps to ensure the accuracy and reliability of the minimization results.

3. Can unphysical values be prevented from occurring during the minimization process?

Yes, unphysical values can be prevented by setting appropriate bounds or constraints on the parameters being minimized. This can be done by using the appropriate functions provided by GSL Multidim Minimizer, such as gsl_multimin_fdfminimizer_set_lower_bound() and gsl_multimin_fdfminimizer_set_upper_bound().

4. How are unphysical values handled in the objective function being minimized?

GSL Multidim Minimizer does not directly handle unphysical values in the objective function. It is the responsibility of the user to ensure that the objective function is able to handle and return valid values for all given parameters. The minimization process will be terminated if the objective function returns unphysical values.

5. Are there any common causes for unphysical values in the minimization process?

Unphysical values can occur due to a variety of reasons, such as improper initialization of parameters, numerical instabilities in the objective function, or incorrect implementation of constraints. It is important to carefully check and debug the code to identify and resolve any potential sources of unphysical values.

Similar threads

Replies
6
Views
1K
  • Introductory Physics Homework Help
Replies
11
Views
763
  • Programming and Computer Science
Replies
8
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
0
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
3
Replies
78
Views
17K
  • Beyond the Standard Models
Replies
9
Views
484
  • Special and General Relativity
3
Replies
75
Views
3K
  • Programming and Computer Science
Replies
11
Views
3K
  • Differential Equations
Replies
1
Views
7K
  • Introductory Physics Homework Help
Replies
9
Views
2K
Back
Top