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 _FACESREFINEMENT_H_ 00012 #define _FACESREFINEMENT_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 "RefinementCriterion.H" 00021 00022 #include "NamespaceHeader.H" 00023 00024 class FacesRefinement: public RefinementCriterion 00025 { 00026 public: 00027 // constructors 00028 FacesRefinement(const bool & a_refinedOnce=true, 00029 const bool & a_refinedTwice=true, 00030 const bool & a_refinedThree=true, 00031 const bool & a_refinedFour=true); 00032 00033 FacesRefinement(const FacesRefinement& a_facesRefinement); 00034 00035 // destructor 00036 virtual ~FacesRefinement(); 00037 00038 virtual bool doRefine(Vector<int> & a_refineInDir, 00039 const int & a_dim, 00040 const Vector<Real> & a_dx, 00041 const Vector<Vector<Real> > & a_residual); 00042 00043 virtual bool doRefine(const int & a_dim, 00044 const Real & a_dxRatio); 00045 00046 virtual bool doRefine(const Vector< Vector<Real> > & a_residual); 00047 00048 void setRefinedOnce(); 00049 00050 void setRefinedTwice(); 00051 00052 void setRefinedThree(); 00053 00054 void setRefinedFour(); 00055 00056 protected: 00057 // member data 00058 bool m_refinedOnce; 00059 bool m_refinedTwice; 00060 bool m_refinedThree; 00061 bool m_refinedFour; 00062 }; 00063 00064 #include "NamespaceFooter.H" 00065 00066 #endif 00067