Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: hyperplane() improvements and calculate() parameter vectorization #274

Merged
merged 27 commits into from Jul 1, 2020

Conversation

richardotis
Copy link
Collaborator

@richardotis richardotis commented Apr 20, 2020

  • Adds a obj_parameters_2d function to PhaseRecord, which allows broadcasting an array of degrees of freedom against an array of parameters.
  • Rewrites hyperplane for performance to use the system memory allocator, instead of Python, to create arrays. hyperplane is now a nogil function.
  • An algorithmic improvement to hyperplane uses the fact that points above the candidate hyperplane at a given iteration can never be on the solution hyperplane. This means we only need to compute driving forces for points below the candidate hyperplane.
  • calculate now supports a vector of parameters (dict of equal-length lists) as an argument. An extra dimension is created in the output Dataset to accommodate this. For the case of single-valued parameters, the extra dimension is omitted in the output for backwards compatibility. There's now a data array called param_values with coordinates called samples and param_symbols, where param_symbols is a coordinate with the parameter symbol names as strings

richardotis and others added 20 commits Feb 29, 2020
Copy link
Collaborator

@bocklund bocklund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great.

Beyond just doing vectorized calculations internally for something like ESPEI, this has meaningful implications to giving a faster API to do the post-processing and UQ calculations that are done by PDUQ, given a Markov chain of parameter samples.

pycalphad/codegen/callables.py Show resolved Hide resolved
pycalphad/core/calculate.py Outdated Show resolved Hide resolved
pycalphad/core/calculate.py Outdated Show resolved Hide resolved
pycalphad/core/calculate.py Outdated Show resolved Hide resolved
pycalphad/core/phase_rec.pyx Outdated Show resolved Hide resolved
@richardotis richardotis requested a review from bocklund May 24, 2020
@richardotis richardotis merged commit 925b01b into develop Jul 1, 2020
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants