00001 #ifndef gridripper_amr1d_error_NormalizedL2ComponentError_h
00002 #define gridripper_amr1d_error_NormalizedL2ComponentError_h
00003
00004 #include <gridripper/amr1d/AMError.h>
00005 #include <gridripper/lang/IllegalArgumentException.h>
00006
00007 namespace gridripper { namespace amr1d { namespace error {
00008
00009 using namespace gridripper::amr1d;
00010 using namespace std;
00011
00012 class NormalizedL2ComponentError: public AMError
00013 {
00014 private:
00015 unsigned int offset;
00016 unsigned int nMaxComponents;
00017
00018 GReal_t calculateNormalization(const Grid& grid) const;
00019
00020 public:
00021 NormalizedL2ComponentError(const PDE& pde, const string& arg)
00022 throw(IllegalArgumentException&);
00023
00024 void calcErrors(const PDE* pde, const Grad* d,
00025 const Grid& g, const Grid& g2,
00026 GReal_t t, double c, tvalarray<double>& errors) const;
00027 };
00028
00029 } } }
00030
00031 #endif