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

Question about Non-Cubic (Spherical) Mesh Support #108

Closed
hz-xiaxz opened this issue Jan 6, 2025 · 2 comments
Closed

Question about Non-Cubic (Spherical) Mesh Support #108

hz-xiaxz opened this issue Jan 6, 2025 · 2 comments

Comments

@hz-xiaxz
Copy link

hz-xiaxz commented Jan 6, 2025

Question about Non-Cubic (Spherical) Mesh Support

Thanks for creating this excellent package!

Current Need

I'm working with a 3D Green's function that has a UV cutoff |k| < Λ, requiring a spherical mesh in k-space.

Question

  1. Does MeshArray support non-cubic meshes (specifically spherical coordinates)? I've reviewed the documentation and source code but only found cubic-like mesh examples.

  2. If spherical meshes aren't directly supported, what's the practical impact of using a cubic mesh with a spherical cutoff in physical calculations? Specifically:

    • Would using a cubic mesh be a reasonable approximation?
    • Are there known numerical issues or artifacts when using this approach?

Thanks for your time and help!

@kunyuan
Copy link
Member

kunyuan commented Jan 6, 2025

Thank you for your post.

The package is compatible with non-cubic meshes.

You can use the CompositeGrids.jl package to create three 1D meshes for ( k ), ( \theta ), and ( \phi ), respectively. Then, you can use these three meshes to create a Green's function object using the syntax: MeshArray(k, theta, phi, tau; dtype=Float64).

The Green's function object, "MeshArray," is essentially a high-dimensional array, with each dimension corresponding to a specific grid.

If you have any further questions, please let me know.

@hz-xiaxz
Copy link
Author

hz-xiaxz commented Jan 6, 2025

Ah, yeah! You are definitely right. Thanks for your help!

@hz-xiaxz hz-xiaxz closed this as completed Jan 6, 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

No branches or pull requests

2 participants