Skip to content

Conversation

@pbrubeck
Copy link

Refactor Functional

Copy link

@rckirby rckirby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great start. The main issue is whether this is just some "window dressing" or we want to go "block-forward" and refactor all the to_riesz business. We also need a way to store these blocks as such in the finite element so we can try to automate zany maps. By using extend on the list of nodes, I think we're losing that structure?

nodes = [block.nodes[index]]
super().__init__(nodes)

def completion(self):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commentary: For later with zany map.

super().__init__(ref_el, x, 2)


class PointDirectionalDerivativeBlock(PointFunctionalBlock):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we generalize the "view" idea to capture that this is a linear combination of the pieces of the gradient?

super().__init__(nodes)


class PointNormalTangentialDerivativeBlock(PointDirectionalDerivativeBlock):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More generally: Gradient block doesn't require a particular basis. Is this and the gradient instances of a common abstract gradient?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the Cartesian case is special, since it is the only one we can use to enforce continuity of derivatives at a vertex

super().__init__(ref_el, entity_dim, entity_id, Q_ref, Phis)


class FacetNormalIntegralMomentBlock(FacetDirectionalIntegralMomentBlock):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow (later) there are pieces of this that want attention so we can automated H(div) zany things (MTW, AW)

def __init__(self, nodes):
self.nodes = nodes

def __iter__(self):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this means when we extend a list of functionals with a block, that we just get back all of the functionals in the block.

@pbrubeck pbrubeck force-pushed the pbrubeck/refactor-duals branch from d62ca0f to ac856a0 Compare July 17, 2025 18:25
Base automatically changed from pbrubeck/macro-hdiv to release July 30, 2025 23:52
@rckirby rckirby mentioned this pull request Aug 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants