Skip to content

Commit

Permalink
Merge pull request #5942 from bangerth/manager-rename
Browse files Browse the repository at this point in the history
Rename (has|get)_matching_plugin_object to just (has|get)_matching_plugin.
  • Loading branch information
gassmoeller authored Jun 25, 2024
2 parents 03b29b8 + dde46a8 commit 64f1603
Show file tree
Hide file tree
Showing 37 changed files with 89 additions and 89 deletions.
12 changes: 6 additions & 6 deletions include/aspect/boundary_composition/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ namespace aspect
* argument) is a class derived from the Interface class in this namespace.
*
* @deprecated Instead of this function, use the
* Plugins::ManagerBase::has_matching_plugin_object() and
* Plugins::ManagerBase::get_matching_plugin_object() functions of the base
* Plugins::ManagerBase::has_matching_plugin() and
* Plugins::ManagerBase::get_matching_plugin() functions of the base
* class of the current class.
*/
template <typename BoundaryCompositionType,
Expand All @@ -182,8 +182,8 @@ namespace aspect
* argument) is a class derived from the Interface class in this namespace.
*
* @deprecated Instead of this function, use the
* Plugins::ManagerBase::has_matching_plugin_object() and
* Plugins::ManagerBase::get_matching_plugin_object() functions of the base
* Plugins::ManagerBase::has_matching_plugin() and
* Plugins::ManagerBase::get_matching_plugin() functions of the base
* class of the current class.
*/
template <typename BoundaryCompositionType,
Expand Down Expand Up @@ -264,7 +264,7 @@ namespace aspect
bool
Manager<dim>::has_matching_boundary_composition_model () const
{
return this->template has_matching_plugin_object<BoundaryCompositionType>();
return this->template has_matching_plugin<BoundaryCompositionType>();
}


Expand All @@ -275,7 +275,7 @@ namespace aspect
const BoundaryCompositionType &
Manager<dim>::get_matching_boundary_composition_model () const
{
return this->template get_matching_plugin_object<BoundaryCompositionType>();
return this->template get_matching_plugin<BoundaryCompositionType>();
}


Expand Down
12 changes: 6 additions & 6 deletions include/aspect/boundary_temperature/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ namespace aspect
* argument) is a class derived from the Interface class in this namespace.
*
* @deprecated Instead of this function, use the
* Plugins::ManagerBase::has_matching_plugin_object() and
* Plugins::ManagerBase::get_matching_plugin_object() functions of the base
* Plugins::ManagerBase::has_matching_plugin() and
* Plugins::ManagerBase::get_matching_plugin() functions of the base
* class of the current class.
*/
template <typename BoundaryTemperatureType,
Expand All @@ -216,8 +216,8 @@ namespace aspect
* argument) is a class derived from the Interface class in this namespace.
*
* @deprecated Instead of this function, use the
* Plugins::ManagerBase::has_matching_plugin_object() and
* Plugins::ManagerBase::get_matching_plugin_object() functions of the base
* Plugins::ManagerBase::has_matching_plugin() and
* Plugins::ManagerBase::get_matching_plugin() functions of the base
* class of the current class.
*/
template <typename BoundaryTemperatureType,
Expand Down Expand Up @@ -298,7 +298,7 @@ namespace aspect
bool
Manager<dim>::has_matching_boundary_temperature_model () const
{
return this->template has_matching_plugin_object<BoundaryTemperatureType>();
return this->template has_matching_plugin<BoundaryTemperatureType>();
}


Expand All @@ -308,7 +308,7 @@ namespace aspect
const BoundaryTemperatureType &
Manager<dim>::get_matching_boundary_temperature_model () const
{
return this->template get_matching_plugin_object<BoundaryTemperatureType>();
return this->template get_matching_plugin<BoundaryTemperatureType>();
}


Expand Down
12 changes: 6 additions & 6 deletions include/aspect/heating_model/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ namespace aspect
* argument) is a class derived from the Interface class in this namespace.
*
* @deprecated Instead of this function, use the
* Plugins::ManagerBase::has_matching_plugin_object() and
* Plugins::ManagerBase::get_matching_plugin_object() functions of the base
* Plugins::ManagerBase::has_matching_plugin() and
* Plugins::ManagerBase::get_matching_plugin() functions of the base
* class of the current class.
*/
template <typename HeatingModelType,
Expand All @@ -297,8 +297,8 @@ namespace aspect
* argument) is a class derived from the Interface class in this namespace.
*
* @deprecated Instead of this function, use the
* Plugins::ManagerBase::has_matching_plugin_object() and
* Plugins::ManagerBase::get_matching_plugin_object() functions of the base
* Plugins::ManagerBase::has_matching_plugin() and
* Plugins::ManagerBase::get_matching_plugin() functions of the base
* class of the current class.
*/
template <typename HeatingModelType,
Expand Down Expand Up @@ -345,7 +345,7 @@ namespace aspect
bool
Manager<dim>::has_matching_heating_model () const
{
return this->template has_matching_plugin_object<HeatingModelType>();
return this->template has_matching_plugin<HeatingModelType>();
}


Expand All @@ -355,7 +355,7 @@ namespace aspect
const HeatingModelType &
Manager<dim>::get_matching_heating_model () const
{
return this->template get_matching_plugin_object<HeatingModelType>();
return this->template get_matching_plugin<HeatingModelType>();
}


Expand Down
12 changes: 6 additions & 6 deletions include/aspect/initial_composition/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ namespace aspect
* argument) is a class derived from the Interface class in this namespace.
*
* @deprecated Instead of this function, use the
* Plugins::ManagerBase::has_matching_plugin_object() and
* Plugins::ManagerBase::get_matching_plugin_object() functions of the base
* Plugins::ManagerBase::has_matching_plugin() and
* Plugins::ManagerBase::get_matching_plugin() functions of the base
* class of the current class.
*/
template <typename InitialCompositionType,
Expand All @@ -171,8 +171,8 @@ namespace aspect
* argument) is a class derived from the Interface class in this namespace.
*
* @deprecated Instead of this function, use the
* Plugins::ManagerBase::has_matching_plugin_object() and
* Plugins::ManagerBase::get_matching_plugin_object() functions of the base
* Plugins::ManagerBase::has_matching_plugin() and
* Plugins::ManagerBase::get_matching_plugin() functions of the base
* class of the current class.
*/
template <typename InitialCompositionType,
Expand Down Expand Up @@ -226,7 +226,7 @@ namespace aspect
bool
Manager<dim>::has_matching_initial_composition_model () const
{
return this->template has_matching_plugin_object<InitialCompositionType>();
return this->template has_matching_plugin<InitialCompositionType>();
}


Expand All @@ -236,7 +236,7 @@ namespace aspect
const InitialCompositionType &
Manager<dim>::get_matching_initial_composition_model () const
{
return this->template get_matching_plugin_object<InitialCompositionType>();
return this->template get_matching_plugin<InitialCompositionType>();
}


Expand Down
12 changes: 6 additions & 6 deletions include/aspect/initial_temperature/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ namespace aspect
* argument) is a class derived from the Interface class in this namespace.
*
* @deprecated Instead of this function, use the
* Plugins::ManagerBase::has_matching_plugin_object() and
* Plugins::ManagerBase::get_matching_plugin_object() functions of the base
* Plugins::ManagerBase::has_matching_plugin() and
* Plugins::ManagerBase::get_matching_plugin() functions of the base
* class of the current class.
*/
template <typename InitialTemperatureType,
Expand All @@ -168,8 +168,8 @@ namespace aspect
* argument) is a class derived from the Interface class in this namespace.
*
* @deprecated Instead of this function, use the
* Plugins::ManagerBase::has_matching_plugin_object() and
* Plugins::ManagerBase::get_matching_plugin_object() functions of the base
* Plugins::ManagerBase::has_matching_plugin() and
* Plugins::ManagerBase::get_matching_plugin() functions of the base
* class of the current class.
*/
template <typename InitialTemperatureType,
Expand Down Expand Up @@ -224,7 +224,7 @@ namespace aspect
bool
Manager<dim>::has_matching_initial_temperature_model () const
{
return this->template has_matching_plugin_object<InitialTemperatureType>();
return this->template has_matching_plugin<InitialTemperatureType>();
}


Expand All @@ -234,7 +234,7 @@ namespace aspect
const InitialTemperatureType &
Manager<dim>::get_matching_initial_temperature_model () const
{
return this->template get_matching_plugin_object<InitialTemperatureType>();
return this->template get_matching_plugin<InitialTemperatureType>();
}


Expand Down
12 changes: 6 additions & 6 deletions include/aspect/mesh_refinement/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ namespace aspect
* argument) is a class derived from the Interface class in this namespace.
*
* @deprecated Instead of this function, use the
* Plugins::ManagerBase::has_matching_plugin_object() and
* Plugins::ManagerBase::get_matching_plugin_object() functions of the base
* Plugins::ManagerBase::has_matching_plugin() and
* Plugins::ManagerBase::get_matching_plugin() functions of the base
* class of the current class.
*/
template <typename MeshRefinementType,
Expand All @@ -184,8 +184,8 @@ namespace aspect
* argument) is a class derived from the Interface class in this namespace.
*
* @deprecated Instead of this function, use the
* Plugins::ManagerBase::has_matching_plugin_object() and
* Plugins::ManagerBase::get_matching_plugin_object() functions of the base
* Plugins::ManagerBase::has_matching_plugin() and
* Plugins::ManagerBase::get_matching_plugin() functions of the base
* class of the current class.
*/
template <typename MeshRefinementType,
Expand Down Expand Up @@ -273,7 +273,7 @@ namespace aspect
bool
Manager<dim>::has_matching_mesh_refinement_strategy () const
{
return this->template has_matching_plugin_object<MeshRefinementType>();
return this->template has_matching_plugin<MeshRefinementType>();
}


Expand All @@ -284,7 +284,7 @@ namespace aspect
const MeshRefinementType &
Manager<dim>::get_matching_mesh_refinement_strategy () const
{
return this->template get_matching_plugin_object<MeshRefinementType>();
return this->template get_matching_plugin<MeshRefinementType>();
}


Expand Down
12 changes: 6 additions & 6 deletions include/aspect/particle/property/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,8 @@ namespace aspect
* argument) is a class derived from the Interface class in this namespace.
*
* @deprecated Instead of this function, use the
* Plugins::ManagerBase::has_matching_plugin_object() and
* Plugins::ManagerBase::get_matching_plugin_object() functions of the base
* Plugins::ManagerBase::has_matching_plugin() and
* Plugins::ManagerBase::get_matching_plugin() functions of the base
* class of the current class.
*/
template <typename ParticlePropertyType,
Expand All @@ -638,8 +638,8 @@ namespace aspect
* argument) is a class derived from the Interface class in this namespace.
*
* @deprecated Instead of this function, use the
* Plugins::ManagerBase::has_matching_plugin_object() and
* Plugins::ManagerBase::get_matching_plugin_object() functions of the base
* Plugins::ManagerBase::has_matching_plugin() and
* Plugins::ManagerBase::get_matching_plugin() functions of the base
* class of the current class.
*/
template <typename ParticlePropertyType,
Expand Down Expand Up @@ -771,7 +771,7 @@ namespace aspect
bool
Manager<dim>::has_matching_property () const
{
return this->template has_matching_plugin_object<ParticlePropertyType>();
return this->template has_matching_plugin<ParticlePropertyType>();
}


Expand All @@ -781,7 +781,7 @@ namespace aspect
const ParticlePropertyType &
Manager<dim>::get_matching_property () const
{
return this->template get_matching_plugin_object<ParticlePropertyType>();
return this->template get_matching_plugin<ParticlePropertyType>();
}


Expand Down
10 changes: 5 additions & 5 deletions include/aspect/plugins.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ namespace aspect
template <typename PluginType,
typename = typename std::enable_if_t<std::is_base_of<InterfaceType,PluginType>::value>>
bool
has_matching_plugin_object () const;
has_matching_plugin () const;

/**
* Go through the list of all plugins that have been selected
Expand All @@ -248,7 +248,7 @@ namespace aspect
template <typename PluginType,
typename = typename std::enable_if_t<std::is_base_of<InterfaceType,PluginType>::value>>
const PluginType &
get_matching_plugin_object () const;
get_matching_plugin () const;

protected:
/**
Expand Down Expand Up @@ -320,7 +320,7 @@ namespace aspect
template <typename PluginType, typename>
inline
bool
ManagerBase<InterfaceType>::has_matching_plugin_object () const
ManagerBase<InterfaceType>::has_matching_plugin () const
{
for (const auto &p : plugin_objects)
if (Plugins::plugin_type_matches<PluginType>(*p))
Expand All @@ -333,9 +333,9 @@ namespace aspect
template <typename PluginType, typename>
inline
const PluginType &
ManagerBase<InterfaceType>::get_matching_plugin_object () const
ManagerBase<InterfaceType>::get_matching_plugin () const
{
AssertThrow(has_matching_plugin_object<PluginType> (),
AssertThrow(has_matching_plugin<PluginType> (),
ExcMessage("You asked the object managing a collection of plugins for a "
"plugin object of type <" + boost::core::demangle(typeid(PluginType).name()) + "> "
"that could not be found in the current model. You need to "
Expand Down
14 changes: 7 additions & 7 deletions include/aspect/postprocess/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ namespace aspect
* This can be done by deriving your postprocessor from
* SimulatorAccess, and then using the
* SimulatorAccess::get_postprocess_manager() function, followed
* by asking the resulting object via get_matching_plugin_object()
* by asking the resulting object via get_matching_plugin()
* for a specific postprocessor object.
*/
virtual
Expand Down Expand Up @@ -196,8 +196,8 @@ namespace aspect
* argument) is a class derived from the Interface class in this namespace.
*
* @deprecated Instead of this function, use the
* Plugins::ManagerBase::has_matching_plugin_object() and
* Plugins::ManagerBase::get_matching_plugin_object() functions of the base
* Plugins::ManagerBase::has_matching_plugin() and
* Plugins::ManagerBase::get_matching_plugin() functions of the base
* class of the current class.
*/
template <typename PostprocessorType,
Expand All @@ -218,8 +218,8 @@ namespace aspect
* argument) is a class derived from the Interface class in this namespace.
*
* @deprecated Instead of this function, use the
* Plugins::ManagerBase::has_matching_plugin_object() and
* Plugins::ManagerBase::get_matching_plugin_object() functions of the base
* Plugins::ManagerBase::has_matching_plugin() and
* Plugins::ManagerBase::get_matching_plugin() functions of the base
* class of the current class.
*/
template <typename PostprocessorType,
Expand Down Expand Up @@ -352,7 +352,7 @@ namespace aspect
bool
Manager<dim>::has_matching_postprocessor () const
{
return this->template has_matching_plugin_object<PostprocessorType>();
return this->template has_matching_plugin<PostprocessorType>();
}


Expand All @@ -363,7 +363,7 @@ namespace aspect
const PostprocessorType &
Manager<dim>::get_matching_postprocessor () const
{
return this->template get_matching_plugin_object<PostprocessorType>();
return this->template get_matching_plugin<PostprocessorType>();
}


Expand Down
4 changes: 2 additions & 2 deletions source/boundary_temperature/dynamic_core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -594,11 +594,11 @@ namespace aspect
// It is not available at the time initialize() function of boundary temperature is called.
if (is_first_call==true)
{
AssertThrow(this->get_postprocess_manager().template has_matching_plugin_object<const Postprocess::CoreStatistics<dim>>(),
AssertThrow(this->get_postprocess_manager().template has_matching_plugin<const Postprocess::CoreStatistics<dim>>(),
ExcMessage ("Dynamic core boundary condition has to work with dynamic core statistics postprocessor."));

const Postprocess::CoreStatistics<dim> &core_statistics
= this->get_postprocess_manager().template get_matching_plugin_object<const Postprocess::CoreStatistics<dim>>();
= this->get_postprocess_manager().template get_matching_plugin<const Postprocess::CoreStatistics<dim>>();
// The restart data is stored in 'core statistics' postprocessor.
// If restart from checkpoint, extract data from there.
core_data = core_statistics.get_core_data();
Expand Down
4 changes: 2 additions & 2 deletions source/heating_model/interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace aspect
bool
Manager<dim>::adiabatic_heating_enabled() const
{
return this->template has_matching_plugin_object<HeatingModel::AdiabaticHeating<dim>>() ;
return this->template has_matching_plugin<HeatingModel::AdiabaticHeating<dim>>() ;
}


Expand All @@ -68,7 +68,7 @@ namespace aspect
bool
Manager<dim>::shear_heating_enabled() const
{
return this->template has_matching_plugin_object<HeatingModel::ShearHeating<dim>>() ;
return this->template has_matching_plugin<HeatingModel::ShearHeating<dim>>() ;
}


Expand Down
Loading

0 comments on commit 64f1603

Please sign in to comment.