[aspect-devel] Big changes
Wolfgang Bangerth
bangerth at math.tamu.edu
Mon Dec 10 14:53:50 PST 2012
All,
over the past couple of days, I've made a number of big changes
throughout the code. Nothing should have changed as far as computations
are concerned, but the structure of the code has changed in a lot of places:
- Introspection: It has long bothered me that we had so many places in
the code where we use "magic numbers" such as "dim+2+c" to refer to the
c'th compositional field's vector component. This is error prone and
does not allow for much later reworking. Eric has pointed this out
recently as well. So what I did is introduce a class "Introspection" and
corresponding object "introspection" that is accessible from both the
main simulator object as well as through SimulatorAccess and that
provides this kind of information using symbolic names. For example,
from any kind of plugin, you can now write
this->introspection().component_indices.compositional_fields[c]
to get the same number as above but without having to remember its exact
value. Introspection has many more frequently used fields; in
particular, it has all the FEValues extractors for all components.
Please use it in the future! (Some documentation is provided in section
7.1 of the current version of the manual.)
- This primarily for Juliane: There were many places where we selected
between the temperature and a compositional field because they satisfy
almost exactly the same equations and we wanted to share common
infrastructure rather than duplicate code. This selection was made using
an unsigned int 'index'. I've now changed this to an explicit data type:
TemperatureOrComposition that gives symbolic names to what this index
means. What it does is, of course, exactly the same as before. It's
simply more text but less magic :-)
- Mesh refinement is now handled through plugins as well. Take a look at
the mesh refinement related parameters in the manual.
- Handling error estimators and seismic anomalies as "normal"
visualization plugins. These are quantities that are computed per-cell,
not as pointwise functions of the solution, and so didn't quite fit into
the framework of visualization plugins. There is now a second category
of visualization postprocessors that support computing a vector of
one-per-cell data. The advantage is that error estimators and Vs/Vp
anomalies now no longer show up in every output file unless specifically
selected.
I've of course tried to be careful not to break anything but these are
big changes -- if you find anything being amiss, please let me know!
Cheers
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth at math.tamu.edu
www: http://www.math.tamu.edu/~bangerth/
More information about the Aspect-devel
mailing list