def testCompositeScatteringKernel(self):
        'CompositeScatteringKernel'
        shape = mccompositebp.Block(1, 1, 1)

        from neutron_printer3 import cKernel as Printer
        printer = Printer()

        kernels = mccomponentsbp.pointer_vector_Kernel(0)
        kernels.append(printer)

        weights = mccomponentsbp.vector_double(0)
        weights.append(1.)

        average = False
        kernelcomposite = mccomponentsbp.CompositeScatteringKernel(
            kernels, weights, average)

        mcweights = mccomponentsbp.MCWeights_AbsorptionScatteringTransmission()
        scatterer = mccomponentsbp.HomogeneousNeutronScatterer(
            shape, kernelcomposite, mcweights)

        for i in range(10):
            ev = mcni.neutron(r=(0, 0, -5), v=(0, 0, 1))
            scatterer.scatter(ev)
            continue
        return
    def testCompositeScatteringKernel(self):
        'CompositeScatteringKernel'
        shape = mccompositebp.Block(1,1,1)

        from neutron_printer3 import cKernel as Printer
        printer = Printer( )

        kernels = mccomponentsbp.pointer_vector_Kernel(0)
        kernels.append( printer )
        
        weights = mccomponentsbp.vector_double(0)
        weights.append(1.)

        rotmats = mccomponentsbp.vector_rotmat(0)
        rotmat = mcnibp.RotationMatrix_double(1,0,0, 0,1,0, 0,0,1)
        rotmats.append(rotmat)
        
        average=False
        kernelcomposite = mccomponentsbp.CompositeScatteringKernel( 
            kernels, weights, rotmats, average)

        mcweights = mccomponentsbp.MCWeights_AbsorptionScatteringTransmission()
        scatterer = mccomponentsbp.HomogeneousNeutronScatterer(
            shape, kernelcomposite, mcweights )

        for i in range(10):
            ev = mcni.neutron( r = (0,0,-5), v = (0,0,1) )
            scatterer.scatter(ev)
            continue
        return
Ejemplo n.º 3
0
 def kernelcontainer(self, size=0):
     return binding.pointer_vector_Kernel(size)
Ejemplo n.º 4
0
 def kernelcontainer(self, size=0):
     return binding.pointer_vector_Kernel(size)