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 _AMRLEVELADVECTDIFFUSEFACTORY_H_ 00012 #define _AMRLEVELADVECTDIFFUSEFACTORY_H_ 00013 00014 #include "AMRLevelFactory.H" 00015 00016 #include "AdvectionFunctions.H" 00017 #include "AMRLevelAdvectDiffuse.H" 00018 00019 #include "NamespaceHeader.H" 00020 00021 /// 00022 /** 00023 */ 00024 class AMRLevelAdvectDiffuseFactory: public AMRLevelFactory 00025 { 00026 public: 00027 00028 /// Constructor 00029 /** 00030 */ 00031 AMRLevelAdvectDiffuseFactory(/// advection physics class 00032 const AdvectPhysics& a_gphys, 00033 /// velocity function providing the advection velocity 00034 AdvectionVelocityFunction a_advFunc, 00035 /// boundary condition class for diffusion solve 00036 BCHolder a_bcFunc, 00037 /// CFL number 00038 const Real& a_cfl, 00039 /// physical length of domain 00040 const Real& a_domainLength, 00041 /// undivided gradient size over which a cell will be tagged for refinement 00042 const Real& a_refineThresh, 00043 /// number of buffer cells around each tagged cell that will also be tagged 00044 const int& a_tagBufferSize, 00045 /// CFL number at beginning of calculation 00046 const Real& a_initialDtMultiplier, 00047 /// whether to use van Leer limiting 00048 const bool& a_useLimiting, 00049 /// diffusion coefficient 00050 const Real& a_nu); 00051 00052 00053 /// Destructor 00054 virtual ~AMRLevelAdvectDiffuseFactory() 00055 { 00056 } 00057 00058 00059 /// 00060 virtual AMRLevel* new_amrlevel() const; 00061 00062 protected: 00063 00064 Real m_cfl; 00065 Real m_domainLength; 00066 Real m_refineThresh; 00067 int m_tagBufferSize; 00068 Real m_initialDtMultiplier; 00069 bool m_useLimiting; 00070 Real m_nu; 00071 RefCountedPtr<AdvectPhysics> m_advPhys; 00072 AdvectionVelocityFunction m_advFunc; 00073 BCHolder m_bcFunc; //bc for diffusion solve 00074 00075 private: 00076 00077 /// Weak construction is disallowed 00078 AMRLevelAdvectDiffuseFactory() 00079 { 00080 MayDay::Error("invalid operator"); 00081 } 00082 00083 // Disallowed for all the usual reasons 00084 void operator=(const AMRLevelAdvectDiffuseFactory&); 00085 AMRLevelAdvectDiffuseFactory(const AMRLevelAdvectDiffuseFactory&); 00086 }; 00087 00088 #include "NamespaceFooter.H" 00089 00090 #endif