-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Update and extend ufc_expression #432
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
5c9bbdc
Expression via c++
michalhabera f552b64
Merge branch 'master' into michal/expressions-cpp
michalhabera d05573f
Work on c++ pipeline for ufc_expression
michalhabera 6567b12
Merge branch 'master' into michal/expressions-cpp
michalhabera cc3fdca
Add missing expression info
michalhabera ca8f51f
Merge with main
michalhabera ae1e975
Rename expression rank
michalhabera 12b6b82
Point to branches in CI
michalhabera 6172fc9
Update ufc_expression
michalhabera 7627127
Remove cpp demo file
michalhabera a83f823
Update docs
michalhabera f482358
Stash working tree
michalhabera a15ce11
More updates for expressions
michalhabera 8fe1c86
Merge branch 'main' into michal/expressions-cpp
michalhabera b14995a
Add number of argument dofs
michalhabera 0ac7b4c
Remove old changes
michalhabera cdbaf53
Use f-strings
michalhabera 1625892
More f-strings
michalhabera 9a9c185
Rename to match ufc_form
michalhabera e7b048c
Merge branch 'main' into michal/expressions-cpp
michalhabera e44faa0
Handle more expressions in UFL file at once
michalhabera 6bb4dec
Merge branch 'main' into michal/expressions-cpp
michalhabera dba3258
Add empty form_data
michalhabera b9f295c
Merge branch 'main' into michal/expressions-cpp
jhale 50058e4
ufcx changes
jhale 1aec005
Stash recent changes
michalhabera 3d880d2
Expression updates for Argument handling
michalhabera 42cae85
Update recent test
michalhabera a89580c
Fix naming uniqueness
michalhabera b8dea91
Handle all objects in common pass
michalhabera 11106e7
Fix unique obj handling
michalhabera aa5edbe
Remove print
michalhabera 81acc85
Point to dolfinx branch
michalhabera fe44d16
Merge branch 'main' into michal/expressions-cpp
michalhabera 8e2d6e5
Add missing expression struct members
michalhabera d6633db
Merge branch 'michal/expressions-cpp' of github.com:FEniCS/ffcx into …
michalhabera 0b49981
Add in geometry table
jorgensd 1e1b0e2
Fix flake
michalhabera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright (C) 2021 Michal Habera | ||
# | ||
# This file is part of FFCX. | ||
# | ||
# FFC is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Lesser General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# FFC is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with FFC. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
# Defines an Expression which evaluates gradient of an Argument | ||
# at predefined set of points. | ||
# | ||
# Compile this form with FFC: ffcx GradExpression.ufl | ||
|
||
element = FiniteElement("Lagrange", triangle, 2) | ||
coordinate_el = VectorElement("Lagrange", triangle, 1) | ||
mesh = Mesh(coordinate_el) | ||
|
||
V = FunctionSpace(mesh, element) | ||
|
||
u = TrialFunction(V) | ||
f = Coefficient(V) | ||
c = Constant(mesh) | ||
|
||
grad_u = c * f * grad(u) | ||
|
||
expressions = [(grad_u, [[0.0, 0.1], [0.2, 0.3]]), | ||
(c * f * u, [[0.0, 1.0], [1.0, 0.0]])] |
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 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 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 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is unrelated, but makes complicated kernels more readable.