-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Field): add
VertexField
to support data at vertices
- Loading branch information
1 parent
2279d1e
commit 6c010cf
Showing
1 changed file
with
44 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
from discretisedfield import Field | ||
|
||
|
||
class VertexField(Field): | ||
def _repr_html_(self): | ||
pass # @Martin | ||
|
||
def __call__(self, point): | ||
raise NotImplementedError | ||
|
||
def diff(self, direction, order=1, restrict2valid=True): | ||
"""Maybe this is slighly wrong and we should ask Claas about this.""" | ||
super().diff(direction, order=order, restrict2valid=restrict2valid) | ||
|
||
def integrate(self, direction=None, cumulative=False): | ||
"""Maybe this is slighly wrong and we should ask Claas about this.""" | ||
super().integrate(direction=direction, cumulative=cumulative) | ||
|
||
def line(self, p1, p2, n): | ||
pass # @Martin | ||
|
||
def __getitem__(self, item): | ||
raise NotImplementedError | ||
|
||
def to_vtk(self): | ||
pass # @Martin | ||
|
||
def mpl(self): | ||
pass # @Swapneel | ||
|
||
def hv(self): | ||
pass # @Swapneel | ||
|
||
# NOTE: We are ignoring all the FFTs for now. | ||
|
||
def to_xarray(self, name="field", unit=None): | ||
pass # @Swapneel | ||
|
||
@classmethod | ||
def from_xarray(cls, xa): | ||
raise NotImplementedError | ||
|
||
|
||
# TODO: reimplement the _as_array functions. @Swapneel |