ConstantSigma.h
00001 #ifndef gridripper_amr1d_sigma_ConstantSigma_h
00002 #define gridripper_amr1d_sigma_ConstantSigma_h
00003
00004 #include <gridripper/Parameters.h>
00005 #include <gridripper/amr1d/Sigma.h>
00006
00007 namespace gridripper { namespace amr1d { namespace sigma {
00008
00009 using namespace gridripper::util;
00010 using namespace std;
00011
00019 class ConstantSigma: public Sigma
00020 {
00021 private:
00022 GReal_t sigma;
00023
00024 public:
00025 ConstantSigma(const string& cmd, const Parameters& parameters,
00026 const PDE& pde);
00027
00028 ConstantSigma(GReal_t s) {
00029 sigma = s;
00030 }
00031
00032 GReal_t getValue(GReal_t x, int ileft, int iright) const {
00033 return sigma;
00034 }
00035
00040 Sigma* cloneSigma() const {
00041 return new ConstantSigma(sigma);
00042 }
00043 };
00044
00045 } } }
00046
00047 #endif