def _convert_geometry(self, options):
        if not _Converter._convert_geometry(self, options):
            return False

        if options.geometry.tilt_rad != 0.0:
            self._warn("Geometry tilt is not supported.", "This options definition was removed.")
            return False

        return True
예제 #2
0
    def _convert_geometry(self, options):
        if not _Converter._convert_geometry(self, options):
            return False

        if options.geometry.tilt_rad != 0.0:
            self._warn("Geometry cannot be tilted in Monaco, only the beam direction.",
                       "This options definition was removed.")
            return False

        for material in options.geometry.get_materials():
            if material.absorption_energy_eV[ELECTRON] < 200.0:
                material.absorption_energy_eV[ELECTRON] = 200.0
                self._warn('Electron absorption energy below limit.',
                           'Set to 200 eV')

        return True
예제 #3
0
    def _convert_geometry(self, options):
        # Replace material with PENLOPE material
        for old_material in options.geometry.get_materials():
            new_material = \
                PenelopeMaterial.from_material(old_material,
                                               self._elastic_scattering,
                                               self._cutoff_energy_inelastic_eV,
                                               self._cutoff_energy_bremsstrahlung_eV,
                                               self._interaction_forcings,
                                               self._maximum_step_length_m)
            replace_material(options, old_material, new_material)

        if not _Converter._convert_geometry(self, options):
            return False

        return True