void lcsEnthalpySourcePluginFunction::doEvaluation()
{
    typedef DimensionedField<scalar,volMesh> dimScalarField;
    autoPtr<dimScalarField> pSh;

    // pick up the first fitting class
    castAndCall(pSh,dimScalarField,basicThermoCloud,thermoCloud,hsTrans());
    castAndCall(pSh,dimScalarField,basicReactingCloud,reactingCloud,hsTrans());
    castAndCall(pSh,dimScalarField,basicReactingMultiphaseCloud,reactingMultiphaseCloud,hsTrans());

    noCloudFound(pSh);

    const dimScalarField &Sh=pSh();

    autoPtr<volScalarField> pSource(
        new volScalarField(
            IOobject(
                cloudName()+"EnthalpySource",
                mesh().time().timeName(),
                mesh(),
                IOobject::NO_READ,
                IOobject::NO_WRITE
            ),
            mesh(),
            Sh.dimensions()/(dimTime*dimVolume),
            "zeroGradient"
        )
    );

    pSource->internalField()=Sh.field()/(mesh().V()*mesh().time().deltaT().value());

    result().setObjectResult(pSource);
}
autoPtr<lcsEnthalpySourcePluginFunction::dimScalarField>
coalCloudEnthalpySourcePluginFunction::internalEvaluate()
{
    // pick up the first fitting class
#ifdef FOAM_REACTINGCLOUD_TEMPLATED
    tryCall(dimScalarField,constThermoCoalCloud,reactingMultiphaseCloud,Sh());
    tryCall(dimScalarField,thermoCoalCloud,reactingMultiphaseCloud,Sh());
    tryCall(dimScalarField,icoPoly8ThermoCoalCloud,reactingMultiphaseCloud,Sh());
#else
    tryCall(dimScalarField,coalCloud,reactingMultiphaseCloud,hsTrans());
#endif

    return lcsEnthalpySourcePluginFunction::internalEvaluate();
}