This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python | |
import sys | |
from PySide6.QtWidgets import ( | |
QApplication, QTabWidget, QVBoxLayout, QWidget, QTreeWidget, QTreeWidgetItem, QMessageBox | |
) | |
from PySide6.QtCore import Qt, QThread, Signal | |
import openmc | |
class LoadGeometryThread(QThread): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python | |
for (group_name, group_id) in cubit.group_names_ids(): | |
# ignore group "picked". It is always present by default and isn't | |
# relevant for DAGMC metadata | |
if group_name == 'picked': | |
continue | |
tokens = group_name.split('_') | |
properties = [f'{p}:{v}' for p, v in zip(tokens[::2], tokens[1::2])] | |
new_name = '/'.join(properties) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python | |
import numpy as np | |
import sys | |
# sys.path.append( r"C:\Program Files\Coreform Cubit 2023.11\bin") | |
# import cubit | |
def compute_tri_surf_dist_err(surface_id=None): | |
"""Compute the maximum distance between a surface's triangles the closest point on a surface.""" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
template = 'https://docs.google.com/presentation/d/{}/export/pdf' | |
document_id = sys.argv[1] | |
print(template.format(document_id)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from matplotlib import pyplot as plt | |
import openmc | |
import numpy as np | |
def threaded_scaling(threads, model, output_filename=None): | |
"""Run simulation with various threads and collect timing results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cubit | |
for (name, gid) in cubit.group_names_ids(): | |
# skip the 'picked' group and other groups | |
# that aren't materials | |
if name == 'picked' or 'mat' not in name: | |
continue | |
mat = name.split('/')[0].split(':')[1] | |
if not mat: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder