Skip to content

Conversation

@dario-coscia
Copy link
Collaborator

Introducing a PBC layer for square domains.

@dario-coscia dario-coscia added the pr-to-review Label for PR that are ready to been reviewed label Feb 24, 2024
@dario-coscia dario-coscia requested a review from ndem0 February 24, 2024 19:38
can correctly compute the PBC on the derivatives up to the order
:math:`\sim 2,3`, while it is not guarantee the periodicity for
:math:`>3`. The PINA code is tested only for function PBC and not for
its derivatives.
Copy link
Member

Choose a reason for hiding this comment

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

A small example to show the minimal usage

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok I will add it.

@@ -0,0 +1,142 @@
""" Embedding modulus. """
Copy link
Member

Choose a reason for hiding this comment

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

Periodic Boundary Embedding module

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In the future I plan to put other embeddings, that's why I used this name. What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

But I would keep one class per file, it's cleaner

from pina.utils import check_consistency


class PBCEmbedding(torch.nn.Module):
Copy link
Member

Choose a reason for hiding this comment

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

What about the extended class name? PeriodicBoundaryEmbedding maybe? Too many acronyms make things very complex for new user

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

PeriodicBoundaryEmbeddingBlock ?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah nice

@ndem0 ndem0 merged commit 4cfd90b into mathLab:master Mar 1, 2024
@dario-coscia dario-coscia deleted the trigfeatures branch March 1, 2024 17:27
AleDinve pushed a commit to AleDinve/PINA that referenced this pull request Mar 4, 2024
* update docs/tests
* tutorial and device fix

---------

Co-authored-by: Dario Coscia <[email protected]>
Co-authored-by: Dario Coscia <[email protected]>
Co-authored-by: Dario Coscia <[email protected]>
Co-authored-by: Dario Coscia <[email protected]>
AleDinve pushed a commit to AleDinve/PINA that referenced this pull request Mar 25, 2024
* update docs/tests
* tutorial and device fix

---------

Co-authored-by: Dario Coscia <[email protected]>
Co-authored-by: Dario Coscia <[email protected]>
Co-authored-by: Dario Coscia <[email protected]>
Co-authored-by: Dario Coscia <[email protected]>
dario-coscia added a commit that referenced this pull request Mar 12, 2025
* update docs/tests
* tutorial and device fix

---------

Co-authored-by: Dario Coscia <[email protected]>
Co-authored-by: Dario Coscia <[email protected]>
Co-authored-by: Dario Coscia <[email protected]>
Co-authored-by: Dario Coscia <[email protected]>
dario-coscia added a commit that referenced this pull request Apr 17, 2025
* update docs/tests
* tutorial and device fix

---------

Co-authored-by: Dario Coscia <[email protected]>
Co-authored-by: Dario Coscia <[email protected]>
Co-authored-by: Dario Coscia <[email protected]>
Co-authored-by: Dario Coscia <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-to-review Label for PR that are ready to been reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants