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 _CONSTANTTENSORFUNCTION_H_ 00012 #define _CONSTANTTENSORFUNCTION_H_ 00013 00014 #include "TensorFunction.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 ConstantTensorFunction: public TensorFunction 00021 { 00022 public: 00023 00024 //! Creates a constant function returning the given value. 00025 //! \param a_value The value returned by the function. 00026 explicit ConstantTensorFunction(const RealTensor& a_value); 00027 00028 //! Destructor. 00029 ~ConstantTensorFunction(); 00030 00031 // Overridden methods. 00032 RealTensor operator()(const RealVect& a_x, Real a_t) const; 00033 00034 private: 00035 00036 RealTensor m_value; 00037 }; 00038 00039 #include "NamespaceFooter.H" 00040 #endif