@@ -352,12 +352,10 @@ namespace aspect
352352
353353 EquationOfState::MulticomponentCompressible<dim>::declare_parameters (prm);
354354
355- prm.declare_entry (" Use compressible equation of state" ," false" ,
356- Patterns::Bool (),
357- " Whether to use an incompressible or compressible equation of state. "
358- " If set to true, the material model will switch from using the "
359- " multicomponent incompressible multicomponent compressible equation "
360- " of state model. " );
355+ prm.declare_entry (" Equation of state" , " multicomponent incompressible" ,
356+ Patterns::Selection (" multicomponent incompressible|multicomponent compresssible" ),
357+ " Select the equation of state model to use between the options "
358+ " multicomponent incompressible and multicomponent incompressible." );
361359
362360 Rheology::ViscoPlastic<dim>::declare_parameters (prm);
363361
@@ -406,8 +404,14 @@ namespace aspect
406404 n_phases = phase_function.n_phases_over_all_chemical_compositions ();
407405
408406 // Equation of state parameters
409- use_compressible_equation_of_state = prm.get_bool (" Use compressible equation of state" );
410- if (use_compressible_equation_of_state == false )
407+ if (prm.get (" Equation of state" ) == " multicomponent incompressible" )
408+ equation_of_state = multicomponent_incompressible;
409+ else if (prm.get (" Equation of state" ) == " multicomponent compressible" )
410+ equation_of_state = multicomponent_compressible;
411+ else
412+ AssertThrow (false , ExcMessage (" Not a valid equation of state model" ));
413+
414+ if (equation_of_state == multicomponent_incompressible)
411415 {
412416 equation_of_state_incompressible.initialize_simulator (this ->get_simulator ());
413417 equation_of_state_incompressible.parse_parameters (prm,
0 commit comments