Custom fix does not compute scalar?

Continuing the discussion from Custom fix does not compute scalar?:

sorry this might be way too late but im documentating my solution for future googlers:

you need to set scalar_flag and extscalar in your Fix subclass constructor:

  scalar_flag = 1;
  extscalar = 0;

from fix.h:

  int scalar_flag;                 // 0/1 if compute_scalar() function exists
  int vector_flag;                 // 0/1 if compute_vector() function exists
  int array_flag;                  // 0/1 if compute_array() function exists
  int size_vector;                 // length of global vector
  int size_array_rows;             // rows in global array
  int size_array_cols;             // columns in global array
  int size_vector_variable;        // 1 if vec length is unknown in advance
  int size_array_rows_variable;    // 1 if array rows is unknown in advance
  int global_freq;                 // frequency s/v data is available at

  int extscalar;    // 0/1 if global scalar is intensive/extensive
  int extvector;    // 0/1/-1 if global vector is all int/ext/extlist
  int *extlist;     // list of 0/1 int/ext for each vec component
  int extarray;     // 0/1 if global array is intensive/extensive
2 Likes

Thank you – this is a generous use of your time. :grinning: