00001 #ifdef CH_LANG_CC 00002 /* 00003 * _______ __ 00004 * / ___/ / ___ __ _ / / ___ 00005 * / /__/ _ \/ _ \/ V \/ _ \/ _ \ 00006 * \___/_//_/\___/_/_/_/_.__/\___/ 00007 * Please refer to Copyright.txt, in Chombo's root directory. 00008 */ 00009 #endif 00010 00011 #ifndef _CONSTANTVECTORFUNCTION_H_ 00012 #define _CONSTANTVECTORFUNCTION_H_ 00013 00014 #include "VectorFunction.H" 00015 #include "NamespaceHeader.H" 00016 00017 //! \class ConstantVectorFunction 00018 //! This VectorFunction subclass represents a function that returns a 00019 //! constant value everywhere in space and time. 00020 class ConstantVectorFunction: public VectorFunction 00021 { 00022 public: 00023 00024 //! Creates a constant scalar function returning the given value. 00025 //! \param a_value The value returned by the function. 00026 explicit ConstantVectorFunction(const RealVect& a_value); 00027 00028 //! Destructor. 00029 ~ConstantVectorFunction(); 00030 00031 // Overridden methods. 00032 RealVect operator()(const RealVect& a_x, Real a_t) const; 00033 00034 RealVect derivative(const IntVect& a_order, 00035 const RealVect& a_x, 00036 Real a_t) const; 00037 00038 private: 00039 00040 RealVect m_value; 00041 }; 00042 00043 #include "NamespaceFooter.H" 00044 #endif