20 #ifndef __mast_scalar_constant_h__ 21 #define __mast_scalar_constant_h__ 26 template <
typename ScalarType>
39 inline ScalarType&
operator= (
const ScalarType& v) {
52 template <
typename ContextType>
53 inline ScalarType
value(ContextType& c)
const {
57 template <
typename ContextType>
58 inline void value(ContextType& c, ScalarType& v)
const {
62 template <
typename ContextType,
typename ScalarFieldType>
64 const ScalarFieldType& f)
const {
65 return &f==
this?1.:0.;
68 template <
typename ContextType,
typename ScalarFieldType>
70 const ScalarFieldType &f,
71 ScalarType &v)
const {
83 #endif // __mast_scalar_constant_h__ ScalarType value(ContextType &c) const
void derivative(ContextType &c, const ScalarFieldType &f, ScalarType &v) const
ScalarType & operator()()
ScalarType derivative(ContextType &c, const ScalarFieldType &f) const
void value(ContextType &c, ScalarType &v) const
virtual ~ScalarConstant()
ScalarType & operator=(const ScalarType &v)
ScalarConstant(ScalarType v=0.)