forked from FEniCS/fiat
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Point Cell and PointExpansionSet
Allows the Point class to be used as a reference cell with the ability to define a P0 finite element. Minimal modifications needed made to get this working. Unit tests modified to include new P=Point() cell and DiscontinuousLagrange(P, 0) element.
- Loading branch information
1 parent
ccc94c3
commit 09c34de
Showing
6 changed files
with
65 additions
and
7 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,3 +73,6 @@ Contributors: | |
|
||
Cyrus Cheng | ||
email: [email protected] | ||
|
||
Reuben W. Hill | ||
email: [email protected] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
# | ||
# Modified by David A. Ham ([email protected]), 2014 | ||
# Modified by Lizao Li ([email protected]), 2016 | ||
|
||
""" | ||
Abstract class and particular implementations of finite element | ||
reference simplex geometry/topology. | ||
|
@@ -482,6 +483,15 @@ def __init__(self): | |
topology = {0: {0: (0,)}} | ||
super(Point, self).__init__(POINT, verts, topology) | ||
|
||
def construct_subelement(self, dimension): | ||
"""Constructs the reference element of a cell subentity | ||
specified by subelement dimension. | ||
:arg dimension: subentity dimension (integer). Must be zero. | ||
""" | ||
assert dimension == 0 | ||
return self | ||
|
||
|
||
class DefaultLine(Simplex): | ||
"""This is the reference line with vertices (-1.0,) and (1.0,).""" | ||
|
@@ -968,6 +978,8 @@ def ufc_cell(cell): | |
return UFCQuadrilateral() | ||
elif celltype == "hexahedron": | ||
return UFCHexahedron() | ||
elif celltype == "vertex": | ||
return ufc_simplex(0) | ||
elif celltype == "interval": | ||
return ufc_simplex(1) | ||
elif celltype == "triangle": | ||
|
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