Example #1
0
 def load_templates(self, gas_dir: GasDir):
     if self.templates is None:
         self.templates = {}
     for gas_file in gas_dir.get_gas_files().values():
         sections = gas_file.get_gas().items
         for section in sections:
             self.load_templates_rec(section)  # recurse into sub-sections
     # recurse into subdirs
     for name, subdir in gas_dir.get_subdirs().items():
         self.load_templates(subdir)
Example #2
0
 def load_node_mesh_guids_recursive(cls, gas_dir: GasDir,
                                    node_mesh_guids: dict):
     for gas_file in gas_dir.get_gas_files().values():
         mesh_file_sections = gas_file.get_gas().find_sections_recursive(
             'mesh_file*')
         for mesh_file_section in mesh_file_sections:
             filename = mesh_file_section.get_attr_value('filename')
             guid = mesh_file_section.get_attr_value('guid')
             node_mesh_guids[guid] = filename
     for subdir in gas_dir.get_subdirs().values():
         cls.load_node_mesh_guids_recursive(subdir, node_mesh_guids)