-
Notifications
You must be signed in to change notification settings - Fork 84
PBC Layer #252
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
PBC Layer #252
Conversation
| 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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
pina/model/layers/embedding.py
Outdated
| @@ -0,0 +1,142 @@ | |||
| """ Embedding modulus. """ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Periodic Boundary Embedding module
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
pina/model/layers/embedding.py
Outdated
| from pina.utils import check_consistency | ||
|
|
||
|
|
||
| class PBCEmbedding(torch.nn.Module): |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PeriodicBoundaryEmbeddingBlock ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah nice
5e7f0f7 to
85c6646
Compare
* 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]>
* 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]>
* 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]>
* 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]>
Introducing a PBC layer for square domains.