Skip to content

Commit

Permalink
Store edge topology in numdata
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam-Bouten committed Nov 15, 2021
1 parent 48af8aa commit 4ff216f
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/compas_fd/numdata/fd_numerical_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self,
):
self.xyz = vertices
self.fixed = fixed
self.connectivity_matrix = edges
self.edges = edges
self.force_densities = force_densities
self.loads = loads

Expand Down Expand Up @@ -75,15 +75,22 @@ def free(self):
return self._free

@property
def connectivity_matrix(self):
return self._connectivity_matrix
def edges(self):
return self._edges

@connectivity_matrix.setter
def connectivity_matrix(self, edges):
self._connectivity_matrix = connectivity_matrix(edges, 'csr')
@edges.setter
def edges(self, edges):
self._edges = edges
self._connectivity_matrix = None
self._connectivity_matrix_free = None
self._connectivity_matrix_fixed = None

@property
def connectivity_matrix(self):
if self._connectivity_matrix is None:
self._connectivity_matrix = connectivity_matrix(self.edges, 'csr')
return self._connectivity_matrix

@property
def connectivity_matrix_free(self):
if self._connectivity_matrix_free is None:
Expand Down

0 comments on commit 4ff216f

Please sign in to comment.