Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Galerkin-in-Time #104

Open
wants to merge 47 commits into
base: master
Choose a base branch
from
Open

Conversation

ScottMacLachlan
Copy link
Collaborator

We've worked out the UFL manipulation to implement both continuous and discontinuous Galerkin-in-time steppers. CG is, in some instances, equivalent to Gauss-Legendre (and, so symplectic), while DG is dissipative.

@pbrubeck pbrubeck force-pushed the smaclachlan/the_other_git branch from 45bb847 to 5d286c9 Compare December 14, 2024 17:21
edofs = L_trial.entity_dofs()
trial_perm = [*edofs[0][0], *edofs[1][0], *edofs[0][1]]
trial_vals = trial_vals[trial_perm]
trial_dvals = trial_dvals[trial_perm]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We had purposefully put a matching permutation on the test space in earlier code in order to facilitate potential comparisons/compatibility with Rana-style preconditioners, where you'd want to field-split by stages in order by their stage times (in analogy to Gauss-Legendre RK methods). I agree that such a permutation doesn't matter (or even necessarily make sense) in many other cases, but I do think that there's some value to that. Thoughts? Is anything lost by just echoing this structure with a test_perm?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Test space is DG, the interior dofs should be ordered already.

Copy link
Collaborator

Choose a reason for hiding this comment

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

FIAT orders the dofs different for continuous and discontinuous Lagrange?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this is fine, since all DoFs for DG are internal, right? If so, I guess we're at the mercy of whatever FIAT gives us for their ordering, but probably we shouldn't be second-guessing that without cause



@pytest.mark.parametrize("order", [0, 1, 2])
@pytest.mark.parametrize("basis_type", ["Lagrange", ])
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We should be testing more basis types here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've now tested the basis_type values that we've implemented. Are there reasonable choices of variant that we should test as well?

Copy link
Collaborator

Choose a reason for hiding this comment

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

integral since we might be going down that road for coarsening to low-degree in time?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

integral is already there, for both DG and CG cases (this is a thread on an outdated commit before I added that)

tests/test_galerkin.py Outdated Show resolved Hide resolved
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