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
#!/usr/bin/env python | |
from http import server as SimpleHTTPServer | |
import argparse | |
TEMPLATE = """ | |
<html> | |
<head> | |
<title>Page moved</title> | |
</head> | |
<body style="display: flex; margin: 10rem; flex-direction: column; align-items: center;font-weight: bolder;"> |
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
[tool.poetry] | |
name = "gpbuilder" | |
version = "1.0.0rc1" | |
description = "" | |
authors = [""] | |
license = "MIT" | |
readme = "README.md" | |
[tool.poetry.group.pyd4.dependencies] | |
pyd4 = { git = "https://github.com/dotinspace/d4-format.git", branch = "arm-docker", subdirectory = "pyd4" } |
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 enum | |
import operator | |
OperatorEnum = enum.Enum( | |
"operator", | |
{"==": operator.eq, ">=": operator.ge, "<=": operator.le, ">": operator.gt, "<": operator.lt}, | |
) | |
print(OperatorEnum["=="].value) |
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 enum | |
import operator | |
OperatorEnum = enum.Enum( | |
"operator", | |
{"==": operator.eq, ">=": operator.ge, "<=": operator.le, ">": operator.gt, "<": operator.lt}, | |
) | |
print(OperatorEnum["=="].value) |
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
def Al_h2(x): | |
return (1.00698 + 0.08183*x + 0.00537*x**2 + 0.0016*x**3 + -5.75818*10**(-5)*x**4 + 7.32321*10**(-7)*x**5 + -3.92223*10**(-9)*x**6 + 7.0807*10**(-12)*x**7)/100 | |
def SiO2(x): | |
return (50 - Al_h2)/100 | |
def aSi(x): | |
return (25 + Al_h2/2)/100 | |
def void(x): |
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
from dolfin import * | |
import numpy as np | |
import mshr | |
from IPython import embed | |
from cbcpost.utils.mpi_utils import gather, broadcast | |
def vec(x): return as_backend_type(x).vec() | |
def mat(A): return as_backend_type(A).mat() | |
class NormalRotation(PETScMatrix): |