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

Introduce new Constant #2927

Merged
merged 52 commits into from
Jun 14, 2023
Merged

Introduce new Constant #2927

merged 52 commits into from
Jun 14, 2023

Conversation

JDBetteridge
Copy link
Member

@JDBetteridge JDBetteridge commented May 10, 2023

Description

This PR is dependent on all of COFFEE being removed first.

Associated Pull Requests:

  • 701
  • 294
  • 98
  • After Firedrake is merged this can go in also: 51

Fixes Issues:

  • Maybe

Checklist for author:

  • I have linted the codebase (make lint in the firedrake source directory).
  • My changes generate no new warnings.
  • All of my functions and classes have appropriate docstrings.
  • I have commented my code where its purpose may be unclear.
  • I have included and updated any relevant documentation.
  • Documentation builds locally (make linkcheck; make html; make latexpdf in firedrake/docs directory)
  • I have added tests specific to the issues fixed in this PR.
  • I have added tests that exercise the new functionality I have introduced
  • Tests pass locally (pytest tests in the firedrake source directory) (useful, but not essential if you don't have suitable hardware).
  • I have performed a self-review of my own code using the below guidelines.

Checklist for reviewer:

  • Docstrings present
  • New tests present
  • Code correctly commented
  • No bad "code smells"
  • No issues in parallel
  • No CI issues (excessive parallelism/memory usage/time/warnings generated)
  • Upstream/dependent branches and PRs are ready

@JDBetteridge JDBetteridge force-pushed the JDBetteridge/constant_rethink branch 2 times, most recently from 4527de5 to 11abb75 Compare May 15, 2023 10:52
firedrake/constant.py Outdated Show resolved Hide resolved
@JDBetteridge JDBetteridge force-pushed the JDBetteridge/constant_rethink branch from d83293a to 73d7f51 Compare May 22, 2023 11:59
@JDBetteridge JDBetteridge changed the title Introduce Constant literals Introduce Constant ~literals~ Jun 7, 2023
@JDBetteridge JDBetteridge changed the title Introduce Constant ~literals~ Introduce new Constant Jun 7, 2023
@JDBetteridge JDBetteridge force-pushed the JDBetteridge/constant_rethink branch from 7d76a71 to 17a81db Compare June 7, 2023 13:52
@JDBetteridge JDBetteridge marked this pull request as ready for review June 7, 2023 14:10
firedrake/assemble.py Outdated Show resolved Hide resolved
firedrake/function.py Outdated Show resolved Hide resolved
firedrake/function.py Outdated Show resolved Hide resolved
firedrake/slate/slac/kernel_builder.py Outdated Show resolved Hide resolved
firedrake/ufl_expr.py Show resolved Hide resolved
tests/regression/test_solver_error_checking.py Outdated Show resolved Hide resolved
Co-authored-by: David A. Ham <[email protected]>
@JDBetteridge JDBetteridge force-pushed the JDBetteridge/constant_rethink branch from 1e75ce2 to 485af36 Compare June 8, 2023 14:13
firedrake/adjoint/variational_solver.py Outdated Show resolved Hide resolved
firedrake/constant.py Outdated Show resolved Hide resolved
firedrake/constant.py Outdated Show resolved Hide resolved
element = ufl.TensorElement("R", cell, 0, shape=shape)

R = FunctionSpace(domain, element, name="firedrake.Constant")
return Function(R, val=dat).assign(value)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same question about value.

Copy link
Member Author

Choose a reason for hiding this comment

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

The assign needs to happen for annotation to occur. We can get away with not zeroing the dat, but we need to assign to create an assign block.

firedrake/function.py Outdated Show resolved Hide resolved
firedrake/projection.py Outdated Show resolved Hide resolved
firedrake/slate/slac/kernel_builder.py Outdated Show resolved Hide resolved
firedrake/solving.py Outdated Show resolved Hide resolved
firedrake/solving.py Outdated Show resolved Hide resolved
firedrake/tsfc_interface.py Outdated Show resolved Hide resolved
JDBetteridge and others added 6 commits June 14, 2023 12:08
Co-authored-by: Connor Ward <[email protected]>
Co-authored-by: Connor Ward <[email protected]>
Co-authored-by: Connor Ward <[email protected]>
Co-authored-by: Connor Ward <[email protected]>
Co-authored-by: Connor Ward <[email protected]>
.github/workflows/build.yml Outdated Show resolved Hide resolved
@dham dham merged commit 34f930d into master Jun 14, 2023
@dham dham deleted the JDBetteridge/constant_rethink branch June 14, 2023 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants