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 support for planar periodic meshes #23

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

andrewdnolan
Copy link
Collaborator

Fixes #15.

@andrewdnolan andrewdnolan added the enhancement New feature or request label Dec 19, 2024
@andrewdnolan andrewdnolan self-assigned this Dec 19, 2024
@andrewdnolan
Copy link
Collaborator Author

Testing

import mosaic
import matplotlib.pyplot as plt

def test_periodic(descriptor, ds, loc):
    fig, ax = plt.subplots()

    mosaic.polypcolor(ax, descriptor, ds.indexToCellID * 0.0, ec='k', cmap='binary')
    mosaic.polypcolor(ax, descriptor, ds[f"indexTo{loc}ID"], alpha=0.5, ec='tab:orange')

    ax.scatter(ds[f"x{loc}"], ds[f"y{loc}"], color="tab:blue")

ds = mosaic.datasets.open_dataset("doubly_periodic_4x4")

descriptor = mosaic.Descriptor(ds)

for loc in ["Cell", "Edge", "Vertex"]:
    test_periodic(descriptor, ds, loc)

plt.show()

@andrewdnolan andrewdnolan force-pushed the periodic_planar branch 2 times, most recently from 9de3628 to b5bba02 Compare December 20, 2024 23:37
Further testing is need to move the spherical wrapping into the
new method used by planar periodic meshes.
WIP: There's debugging that's needed for vertex patches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Planar periodic meshes are not supported
1 participant