This file contains hidden or 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
| burnups = np.array([burnup_vals]) | |
| thetas = np.array([theta_vals]) | |
| k = np.array( (len(burnups), len(thetas) ) | |
| for b in smooth_burnups: | |
| kb = np.array(len(thetas)) | |
| for it, theta in enumerat(thetas): | |
| kb[it] = np.interp(k[:,it],b) | |
| idx = np.find(kb,1.0) | |
| t1 = thetas[idx] |
This file contains hidden or 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 numpy as np | |
| import pymoab as mb | |
| def load_model(filename): | |
| mbcore = mb.core.Core() | |
| mbcore.load_file(filename) | |
| return mbcore |
This file contains hidden or 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 numpy as np | |
| num_blocks = 64 | |
| lines_in_block = 300 | |
| skip_lines = 1 | |
| data_offset = { 'up' : 0, 'down' : 17 } | |
| names = ['block',' energy', 's_up', 'p_up', 'd_up', 'f_up', 's_down', 'p_down', 'd_down', 'f_down'] | |
| formats = ['i8', 'f8', 'f8', '3f8', '5f8', '7f8', 'f8', '3f8', '5f8', '7f8'] | |
| rec_type = np.dtype({'names':names, 'formats': formats}) |
This file contains hidden or 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
| num_blocks = 64 | |
| lines_in_block = 300 | |
| skip_lines = 1 | |
| data_offset = { 'up' : 0, 'down' : 17 } | |
| # This could be even more compact, although arguably less readable, | |
| # if you just immediately wrote everything to the output file rather | |
| # that storing in variables. |
This file contains hidden or 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
| /usr/bin/cmake | |
| -- The C compiler identification is GNU 4.8.4 | |
| -- The CXX compiler identification is GNU 4.8.4 | |
| -- Check for working C compiler: /usr/bin/cc | |
| -- Check for working C compiler: /usr/bin/cc -- works | |
| -- Detecting C compiler ABI info | |
| -- Detecting C compiler ABI info - done | |
| -- Check for working CXX compiler: /usr/bin/c++ | |
| -- Check for working CXX compiler: /usr/bin/c++ -- works | |
| -- Detecting CXX compiler ABI info |
This file contains hidden or 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
| cmake: /root/miniconda/lib/liblzma.so.5: no version information available (required by /usr/lib/x86_64-linux-gnu/libarchive.so.13) | |
| cmake: /root/miniconda/lib/libssl.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4) | |
| cmake: /root/miniconda/lib/libssl.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4) | |
| cmake: /root/miniconda/lib/libssl.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4) | |
| cmake: /root/miniconda/lib/libcrypto.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4) | |
| -- The C compiler identification is GNU 5.2.1 | |
| -- The CXX compiler identification is GNU 5.2.1 | |
| -- Check for working C compiler: /usr/bin/cc | |
| -- Check for working C compiler: /usr/bin/cc -- works | |
| -- Detecting C compiler ABI info |
This file contains hidden or 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
| \[\e[33m\]\w\[\e[1;$(get_git_color)m\] $(parse_git_branch)\[\e[0m\]\n> |
This file contains hidden or 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
| Range siblings; | |
| Range::iterator cn; | |
| EntityHandle parent; | |
| siblings.clear() | |
| siblings.insert(head); | |
| cn = siblings.begin(); | |
| insertion = false; |
This file contains hidden or 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
| # put the following into your bash startup files | |
| function parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1) /' | |
| } | |
| function get_git_color() { | |
| isred=`git status -s 2> /dev/null | egrep "^.[^? ]" | wc | awk '{print $1}'` |
This file contains hidden or 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
| mat_lib = MaterialLibrary( | |
| { | |
| 'Water': Material( | |
| density=1.0, | |
| comp={1000: 11.11, 8000: 88.89} | |
| ) | |
| }) | |
| {'Water' : |
NewerOlder