Replies: 2 comments 7 replies
-
My first idea is not exactly to encode the orientation by signing the index of the facet since this is confusing for facet zero but instead to index the facets twice, once for the default orientation and then once flipped, like so: Lines 227 to 233 in d02e967 |
Beta Was this translation helpful? Give feedback.
-
So a simpler alternative to #874 was mooted over there.
Consider the example from the test. scikit-fem/tests/test_basis.py Lines 606 to 609 in 33a2513 We have for array([0, 0, 1]), OrientedBoundary([ 8, 9, 431]) which work in this example because array([5, 5, 5]) These are the columns of array([[ 8, 8, 8],
[431, 431, 431],
[ 9, 9, 9]]) I think this is np.nonzero(boundary == self.t2f[:, self.f2t[[boundary.ori, boundary]]])[1] i.e. here boundary == self.t2f[:, self.f2t[[boundary.ori, boundary]]] into the columns of a ir = np.zeros_like(self.t2f).astype(np.bool)
ir[[np.nonzero(boundary == self.t2f[:, self.f2t[[boundary.ori, boundary]]])[1], self.f2t[[boundary.ori, boundary]]]] = True since then (1 << np.arange(self.refdom.nfacets)) @ ir |
Beta Was this translation helpful? Give feedback.
-
#865 added support for orientation in
FacetBasis
, but how do we serialize the ‘boundaries’ (as subsets of facets of aMesh
are known)?…
…
Beta Was this translation helpful? Give feedback.
All reactions