File indexing completed on 2026-04-09 07:48:52
0001
0002 #include "scuda.h"
0003 #include "squad.h"
0004 #include "sqat4.h"
0005
0006
0007 #ifdef WITH_OLD_FRAME
0008 #include "sframe.h"
0009 #else
0010 #include "sfr.h"
0011 #include "stree.h"
0012 #endif
0013
0014 #include "spath.h"
0015
0016 #include "SSim.hh"
0017 #include "SEvt.hh"
0018 #include "SFrameGenstep.hh"
0019 #include "NP.hh"
0020 #include "OPTICKS_LOG.hh"
0021 #include "CSGFoundry.h"
0022
0023 int main(int argc, char** argv)
0024 {
0025 OPTICKS_LOG(argc, argv);
0026
0027 SEvt::Create_ECPU() ;
0028
0029 CSGFoundry* fd = CSGFoundry::Load();
0030 const stree* tree = fd->getTree();
0031
0032 #ifdef WITH_OLD_FRAME
0033 sframe fr = fd->getFrame() ;
0034 NP* gs0 = SFrameGenstep::MakeCenterExtentGenstep_FromFrame(fr) ;
0035 #else
0036 sfr fr = tree->get_frame_moi();
0037 NP* gs0 = SFrameGenstep::MakeCenterExtentGenstep_FromFrame(fr) ;
0038 #endif
0039
0040 SEvt::AddGenstep(gs0);
0041
0042 NP* gs = SEvt::GatherGenstep(SEvt::ECPU);
0043
0044 #ifdef WITH_OLD_FRAME
0045 NP* pp = SFrameGenstep::GenerateCenterExtentGenstepPhotons_( gs, fr.gridscale() );
0046 #else
0047 NP* pp = SFrameGenstep::GenerateCenterExtentGenstepPhotons_( gs, fr.get_gridscale() );
0048 assert( fr.get_gridscale() > 0.f );
0049
0050 #endif
0051
0052
0053
0054 std::cout << " fr " << std::endl << fr << std::endl ;
0055
0056 gs->save("$FOLD/genstep.npy");
0057 pp->save("$FOLD/photon.npy");
0058 fr.save("$FOLD") ;
0059
0060 return 0 ;
0061 }
0062