Esempio n. 1
0
    def make_opencg_geometry(self):
        """Create OpenCG geometry based on the information contained in the summary
        file. The geometry is stored as the 'opencg_geometry' attribute.

        """

        try:
            from openmc.opencg_compatible import get_opencg_geometry
        except ImportError:
            msg = 'Unable to import opencg which is needed ' \
                  'by Summary.make_opencg_geometry()'
            raise ImportError(msg)

        if self.opencg_geometry is None:
            self.opencg_geometry = get_opencg_geometry(self.openmc_geometry)
Esempio n. 2
0
 def opencg_geometry(self):
     if self._opencg_geometry is None:
         from openmc.opencg_compatible import get_opencg_geometry
         self._opencg_geometry = get_opencg_geometry(self.openmc_geometry)
     return self._opencg_geometry
Esempio n. 3
0
 def opencg_geometry(self):
     if self._opencg_geometry is None:
         from openmc.opencg_compatible import get_opencg_geometry
         self._opencg_geometry = get_opencg_geometry(self.openmc_geometry)
     return self._opencg_geometry