geodynamics / aspect

A parallel, extensible finite element code to simulate convection in both 2D and 3D models.
https://aspect.geodynamics.org/
Other
223 stars 234 forks source link

automatic plugin prm subsection name #97

Open tjhei opened 10 years ago

tjhei commented 10 years ago

Provide a way for a plugin to query its name so that it can be used in enter/leave_subsection.

bangerth commented 8 years ago

Out of curiosity, how did you think this could be implemented automatically?

tjhei commented 8 years ago

A plugin is registered with a name as a string, which means the plugin should be able to ask the manager what its name is. I think I was tempted to have something like:

...::declare_parameters (ParameterHandler &prm)
    {
        prm.enter_subsection(this->my_name());
bangerth commented 8 years ago

The problem is that the name of the plugin and the section name are not the same. The latter is typically capitalized. It is probably true almost always, the two are the same with just the very first letter capitalized. It would be interesting to investigate how many outliers there are.