Skip to content

Commit

Permalink
Address comments from Rene 11/15/2024
Browse files Browse the repository at this point in the history
Co-authored-by: Rene Gassmoeller <[email protected]>
  • Loading branch information
lhy11009 and gassmoeller committed Nov 15, 2024
1 parent 3be90bc commit 6b26f58
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
7 changes: 4 additions & 3 deletions include/aspect/material_model/utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -570,16 +570,17 @@ namespace aspect

/**
* Percentage of material that has already undergone the phase
* transition to the higher-pressure material (this is done
* individually for each transition and summed up in the end)
* transition to the higher-pressure material. For this class
* this function only returns 1.0 or 0.0, depending on whether
* the selected phase transition has been crossed or not.
*/
double compute_value (const PhaseFunctionInputs<dim> &in) const;

/**
* Return the derivative of the phase function with respect to
* pressure.
*/
double compute_derivative (const PhaseFunctionInputs<dim> &in) const;
double compute_derivative () const;

/**
* Return the total number of phase transitions.
Expand Down
2 changes: 1 addition & 1 deletion include/aspect/material_model/visco_plastic.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ namespace aspect
bool use_dominant_phase_for_viscosity;

/**
* Object that handles phase transitions.
* Object that handles discrete phase transitions for the rheology if requested by the variable use_dominant_phase_for_viscosity.
*/
MaterialUtilities::PhaseFunctionDiscrete<dim> phase_function_discrete;

Expand Down
13 changes: 7 additions & 6 deletions include/aspect/structured_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,13 @@ namespace aspect
double get_maximum_component_value(const unsigned int component) const;

/**
Retrieve the number of table points for a given dimension.
Equivalent to calling get_interpolation_point_coordinates().size().
@param dimension The index of the dimension for which to get the number of table points.
@return The number of points along the specified dimension.
*/
unsigned get_number_of_coordinates(const unsigned int dimension) const;
* Retrieve the number of table points for a given dimension.
* Equivalent to calling get_interpolation_point_coordinates().size().
*
* @param dimension The index of the dimension for which to get the number of table points.
* @return The number of points along the specified dimension.
*/
unsigned int get_number_of_coordinates(const unsigned int dimension) const;

private:
/**
Expand Down
6 changes: 3 additions & 3 deletions source/material_model/utilities.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ namespace aspect
material_lookup[i]->load_file(data_directory+material_file_names[i],
this->get_mpi_communicator());

assert(material_lookup[i]->has_equidistant_coordinates());
Assert(material_lookup[i]->has_equidistant_coordinates(), ExcMessage("The loaded lookup tables do not use equidistant coordinates. The class 'PhaseFunctionDiscrete' cannot currently handle non equidistant coordinates."));

minimum_temperature[i] = material_lookup[i]->get_interpolation_point_coordinates(0).front();
maximum_temperature[i] = material_lookup[i]->get_interpolation_point_coordinates(0).back();
Expand Down Expand Up @@ -1254,7 +1254,7 @@ namespace aspect

template <int dim>
double
PhaseFunctionDiscrete<dim>::compute_derivative (const PhaseFunctionInputs<dim> &in) const
PhaseFunctionDiscrete<dim>::compute_derivative () const
{
// make sure the phase derivative of this phase function is not asked for.
AssertThrow(false, ExcNotImplemented());
Expand Down Expand Up @@ -1348,7 +1348,7 @@ namespace aspect
"The file names of the material data (material "
"data is assumed to be in order with the ordering "
"of the compositional fields). Note that there are "
"three options on how many files need to be listed "
"two options on how many files need to be listed "
"here: 1. If only one file is provided, it is used "
"for the whole model domain, and compositional fields "
"are ignored. 2. If there is one more file name than the "
Expand Down

0 comments on commit 6b26f58

Please sign in to comment.