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 _TENSORFINESTENCILSET_H_ 00012 #define _TENSORFINESTENCILSET_H_ 00013 00014 #include "SPACE.H" 00015 #include <stdlib.h> 00016 #include "IntVectSet.H" 00017 #include "ProblemDomain.H" 00018 #include "QuadCFStencil.H" 00019 #include "NamespaceHeader.H" 00020 00022 00028 class TensorFineStencilSet 00029 { 00030 public: 00032 00034 TensorFineStencilSet(); 00035 00037 TensorFineStencilSet(const IntVectSet& a_fineIVS, 00038 const ProblemDomain& a_domain, 00039 int a_normalDir); 00040 00042 ~TensorFineStencilSet(); 00043 00045 void define(const IntVectSet& a_fineIVS, 00046 const ProblemDomain& a_domain, 00047 int a_dir); 00048 00050 00055 const IntVectSet& getCenteredStencilSet(int a_tanDir) const; 00056 00058 00063 const IntVectSet& getForwardStencilSet(int a_tanDir) const; 00064 00066 00070 const IntVectSet& getBackwardStencilSet(int a_tanDir) const; 00071 00073 bool isDefined() const; 00074 00076 bool isEmpty() const; 00077 00078 protected: 00080 bool m_isDefined; 00081 00083 bool m_isEmpty; 00084 00086 int m_normalDir; 00087 00088 #if CH_SPACEDIM == 1 00090 int m_tangentialDirections[SpaceDim]; 00091 #else 00093 int m_tangentialDirections[SpaceDim-1]; 00094 #endif 00095 00097 #if CH_SPACEDIM == 1 00098 IntVectSet m_centeredSet[SpaceDim]; 00099 #else 00100 IntVectSet m_centeredSet[SpaceDim-1]; 00101 #endif 00102 00103 #if CH_SPACEDIM == 1 00105 IntVectSet m_forwardSet[SpaceDim]; 00106 #else 00107 IntVectSet m_forwardSet[SpaceDim-1]; 00108 #endif 00109 00111 #if CH_SPACEDIM == 1 00112 IntVectSet m_backwardSet[SpaceDim]; 00113 #else 00114 IntVectSet m_backwardSet[SpaceDim-1]; 00115 #endif 00116 00117 }; 00118 00119 #include "NamespaceFooter.H" 00120 #endif 00121