idaholab/moose — pull request #4472 by dschwen (2014-12-23 19:35:28+00:00)
Title: Rewrite of variable coupling in Derivative Material System

This is the alternative rewrite of the Derivative Material system, that does not need the framework change #4466 @friedmud is 1000% opposed to.

Closes #4441. Requires application patch (Grizzly and Marmot).

This PR implements a new method for mapping MOOSE variables to FParser Expression variables in parsed materials, and improves the coupling semantics to ```DerivativeBaseMaterial``` descendants.

Previously the variable names in Function Parser expressions and ExpressionBuilder materials had to be _identical_ to the actual MOOSE variable names in a simulation. This is contrary to what the user expects, as in other materials the mapping of a non-linear variable to the meaning it has to the material is done in the input file:

```
concentration = c
```

We retain this identity mapping for the ```DerivativeParsedMaterial``` (where the free energy expression is given in the input file), but add a new mapping for all other materials that will require separate ```addRequiredCoupledVariable``` entries for each coupled variable. The material (e.g. ```ExpressionBuilder``` based material) will use the input parameter name for each coupling as the variable name.

To achieve this we moved the catch-all ```args``` vector coupling out of the base class. Every derived class now has to add required coupled variables to its own input parameters. This gives us better control and error checking.

The base class ```DerivativeBaseMaterial``` still needs to know about _all_ coupled variables to set up all derivative material properties. It gets those by iterating from ```_pars.coupledVarsBegin()``` to ```_pars.coupledVarsEnd()``` and inspecting ```_coupled_vars```.

We also provide a convenience vector ```_arg_numbers``` that holds the libMesh variable number for each of the coupled variables. Check ```DerivativeTwoPhaseMaterial.C``` for an example on how to single out a specific derivative (in this case the eta derivative).