Skip to content

Commit

Permalink
feat(Field): add VertexField to support data at vertices
Browse files Browse the repository at this point in the history
  • Loading branch information
swapneelap committed Nov 22, 2023
1 parent 2279d1e commit 6c010cf
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions discretisedfield/vertex_field.py
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

0 comments on commit 6c010cf

Please sign in to comment.