@gassmoeller. Hi Rene, I noticed that the variable "phase_index" is used in a couple of places in the source/material_model/utilities.cc file. First, it appears in the PhaseFunction.compute_value function as in.phase_index, where it’s used as an input. Then, it shows up in the phase_average_value function, where "phase_index" is used to loop over all the phases.
From the way these variables interact with phase_function_values, it seems like they might have slightly different meanings—one potentially indicating the index of the phase transition and the other referring to the index of the phase.
In the first case, here is a piece of the code link
for (unsigned int j=0; j < phase_function.n_phase_transitions(); ++j)
{
phase_inputs.phase_index = j;
phase_function_values[j] = phase_function.compute_value(phase_inputs);
}
Does this interpretation align with your understanding as well? If so, perhaps we could rename in.phase_index to in.phase_transition_index for clarity.
@gassmoeller. Hi Rene, I noticed that the variable "phase_index" is used in a couple of places in the source/material_model/utilities.cc file. First, it appears in the PhaseFunction.compute_value function as in.phase_index, where it’s used as an input. Then, it shows up in the phase_average_value function, where "phase_index" is used to loop over all the phases.
From the way these variables interact with phase_function_values, it seems like they might have slightly different meanings—one potentially indicating the index of the phase transition and the other referring to the index of the phase. In the first case, here is a piece of the code link
And in the second case link
Does this interpretation align with your understanding as well? If so, perhaps we could rename in.phase_index to in.phase_transition_index for clarity.