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 // ANAG, LBNL, BVS 00012 00013 #ifndef _EBALIAS_H_ 00014 #define _EBALIAS_H_ 00015 00016 #include "EBCellFAB.H" 00017 #include "LevelData.H" 00018 #include "FArrayBox.H" 00019 #include "NamespaceHeader.H" 00020 00021 class EBAliasDataFactory : public DataFactory<FArrayBox> 00022 { 00023 public: 00024 virtual ~EBAliasDataFactory() 00025 { 00026 } 00027 00028 void define(LevelData<EBCellFAB>& aliases); 00029 00030 /// factory function. creates a new 'T' object using an aliased dataPtr for T 00031 /** creates a new 'T' object and returns a pointer to it. Responsiblitly 00032 for calling operator 'delete' on this pointer is passed to the user. */ 00033 virtual FArrayBox* create(const Box& box, int ncomps, const DataIndex& a_datInd) const; 00034 00035 protected: 00036 LayoutData<Real*> aliasPtrs; 00037 }; 00038 00039 void aliasEB(LevelData<FArrayBox>& a_output, LevelData<EBCellFAB>& a_input); 00040 00041 #include "NamespaceFooter.H" 00042 #endif