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
############################################################################### | |
# Try to compile MUMPS. | |
# | |
# Record of revision: | |
# Date Programmer Description of change | |
# ========= ========== ===================== | |
# Nov 2016 YUAN Xi Original | |
# Nov 2017 Richard Otis -DAdd_ for m2w64 support | |
############################################################################### |
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 pycalphad import Database, Model, calculate | |
import pycalphad.variables as v | |
import numpy as np | |
import sympy | |
dbf = Database('NI_AL_DUPIN_2001.TDB') | |
class NewModel(Model): | |
def build_phase(self, dbe, phase_name, symbols, param_search): | |
self.models['test'] = -13000*v.T*v.R*v.Y(phase_name, 0, 'AL')*v.Y(phase_name, 0, 'NI') |
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
""" | |
This module manages interactions with the autograd library. | |
""" | |
import autograd.numpy as anp | |
import numpy as np | |
from autograd import elementwise_grad, jacobian | |
from sympy import lambdify | |
# NumPyPrinter requires unreleased sympy 0.7.7 (in sympy master) | |
# if you aren't using Piecewise or logical operators | |
# you can change NumPyPrinter to LambdaPrinter in this module |