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 _RESIDUALBASEDREFINEMENT_H_ 00012 #define _RESIDUALBASEDREFINEMENT_H_ 00013 00014 #if defined(CH_Darwin) && defined(__GNUC__) && ( __GNUC__ == 3 ) 00015 // deal with the broken isnan()/isinf() in GCC on MacOS 00016 #include <unistd.h> 00017 #define _GLIBCPP_USE_C99 1 00018 #endif 00019 00020 #include "MayDay.H" 00021 00022 #include "NamespaceHeader.H" 00023 00024 class ResidualBasedRefinement: public RefinementCriterion 00025 { 00026 public: 00027 // constructors 00028 ResidualBasedRefinement(const Real & a_tolerance = REFINEMENTTHRESHOLD); 00029 00030 ResidualBasedRefinement(const ResidualBasedRefinement & a_residualBasedRefinement); 00031 00032 // destructor 00033 virtual ~ResidualBasedRefinement(); 00034 00035 virtual bool doRefine(const int & a_dim, 00036 const Real & a_dxRatio); 00037 00038 virtual bool doRefine(const Vector< Vector<Real> > & a_residual); 00039 00040 protected: 00041 int m_numOfRefinement; 00042 Real m_tolerance; 00043 }; 00044 00045 #include "NamespaceFooter.H" 00046 00047 #endif 00048