Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

ParticleProjector.H

Go to the documentation of this file.
00001 /*   _______              __
00002     / ___/ /  ___  __ _  / /  ___
00003    / /__/ _ \/ _ \/  ' \/ _ \/ _ \
00004    \___/_//_/\___/_/_/_/_.__/\___/
00005 */
00006 //
00007 // This software is copyright (C) by the Lawrence Berkeley
00008 // National Laboratory.  Permission is granted to reproduce
00009 // this software for non-commercial purposes provided that
00010 // this notice is left intact.
00011 //
00012 // It is acknowledged that the U.S. Government has rights to
00013 // this software under Contract DE-AC03-765F00098 between
00014 // the U.S.  Department of Energy and the University of
00015 // California.
00016 //
00017 // This software is provided as a professional and academic
00018 // contribution for joint exchange. Thus it is experimental,
00019 // is provided ``as is'', with no warranties of any kind
00020 // whatsoever, no support, no promise of updates, or printed
00021 // documentation. By using this software, you acknowledge
00022 // that the Lawrence Berkeley National Laboratory and
00023 // Regents of the University of California shall have no
00024 // liability with respect to the infringement of other
00025 // copyrights by any part of this software.
00026 //
00027 
00028 #ifndef _PARTICLEPROJECTOR_H_
00029 #define _PARTICLEPROJECTOR_H_
00030 
00031 
00033 
00039 #include "DisjointBoxLayout.H"
00040 #include "LevelData.H"
00041 #include "BinFab.H"
00042 #include "DragParticle.H"
00043 
00044 class ParticleProjector
00045 {
00046 
00047 public:
00049   ParticleProjector();
00050 
00052 
00055   ParticleProjector(const DisjointBoxLayout& a_grids,
00056                     const DisjointBoxLayout& a_crseGrids,
00057                     const ProblemDomain& a_domain,
00058                     int a_nRefCrse, Real a_dx);
00059 
00061   ~ParticleProjector();
00062 
00064   void define(const DisjointBoxLayout& a_grids,
00065               const DisjointBoxLayout& a_crseGrids,
00066               const ProblemDomain& a_domain,
00067               int a_nRefCrse, Real a_dx);
00068 
00070 
00076   void projectForce(LevelData<FArrayBox>& a_force,
00077                     const LevelData<BinFab<DragParticle> >& a_particles);
00078   
00079 
00081   void setSpreadingRadius(const Real a_rad);
00082 
00084   void setCorrectionRadius(const Real a_rad);
00085 
00086   
00087 
00088 
00090   Real getSpreadingRadius() const;
00091 
00093   Real getCorrectionRadius() const;
00094 
00096   void doImages(bool m_doImages);
00097 
00099   bool doImages() const;
00100 
00102   bool isDefined() const;
00103 
00105   void setVerbosity(int a_verbosity);
00106   
00108   int verbosity() const;
00109   
00110 protected:
00111 
00113   void computeD(LevelData<FArrayBox>& a_D,
00114                 const LevelData<BinFab<DragParticle> >& a_particles);
00115 
00117   void solveForProjForce(LevelData<FArrayBox>& a_projectedForce,
00118                          const LevelData<FArrayBox>& a_D,
00119                          const LevelData<BinFab<DragParticle> >& a_particles);
00120 
00122 
00126   void addImageEffects(FArrayBox& a_rhs, 
00127                        int a_buffer,
00128                        int a_dir) const;
00129 
00131 
00134   void defineImages(const LevelData<BinFab<DragParticle> >& a_particles);
00135     
00136  
00137 
00139   DragParticle* createImageParticle(const DragParticle& a_particle,
00140                                     Real bndryLoc, int dir, 
00141                                     Side::LoHiSide a_side);
00142 
00143   // helper function to manage infinite domain solver interface
00144   void doInfiniteDomainSolve(FArrayBox& phi, 
00145                              const FArrayBox& rhs) const;
00146 
00148   void doNeumannSolve(FArrayBox& a_phi, 
00149                       const FArrayBox& a_rhs) const;
00150 
00152   void setDefaultValues();
00153 
00155   int infiniteDomainPadding() const;
00156   
00157   // data members
00158 
00160   DisjointBoxLayout m_grids;
00161 
00163   DisjointBoxLayout m_crseGrids;
00164 
00166   ProblemDomain m_domain;
00167 
00169   int m_nRefCrse;
00170   
00172   Real m_dx;
00173   
00175   Real m_spreadingRadius;
00176 
00178   Real m_correctionRadius;
00179 
00181 
00183   int m_s;
00185 
00189   int m_s1;
00191   int m_patchSize;
00192 
00194   List<DragParticle> m_imageParticles;
00195 
00197   bool m_doImages;
00198 
00200   bool m_isDefined;
00201 
00203   int m_verbosity;
00204 
00205 private:
00206 
00207   // copy constructor illegal, etc
00208   ParticleProjector (const ParticleProjector& );
00209   ParticleProjector operator= (const ParticleProjector&);
00210 
00211 };
00212 
00213 #endif

Generated on Wed Jun 2 13:53:35 2004 for Chombo&INSwithParticles by doxygen 1.3.2