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 _ZRESIDUALBASEDREFINEMENT_H_ 00012 #define _ZRESIDUALBASEDREFINEMENT_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 ZResidualBasedRefinement: public RefinementCriterion 00025 { 00026 public: 00027 //constructors 00028 ZResidualBasedRefinement(const bool & a_refineInZ = false, 00029 const bool & a_refineWithResidual = false, 00030 const Real & a_tolerance = MACHINEPRECISION); 00031 00032 ZResidualBasedRefinement(const ZResidualBasedRefinement & a_ZresidualBasedRefinement); 00033 00034 //destructor 00035 virtual ~ZResidualBasedRefinement(); 00036 00037 virtual bool doRefine(Vector<int> & a_refineInDir, 00038 const int & a_dim, 00039 const Vector<Real> & a_dx, 00040 const Vector< Vector<Real> > & a_residual); 00041 00042 int m_numOfRefinement; 00043 00044 protected: 00045 Real m_tolerance; 00046 bool m_refineWithResidual; 00047 }; 00048 00049 #include "NamespaceFooter.H" 00050 00051 #endif 00052