Skip to content

[BG fields] Add refactored TWTS laser#704

Merged
ax3l merged 24 commits into
ComputationalRadiationPhysics:devfrom
BeyondEspresso:topic-redoTWTS-libPMaccComplex-BeyondEspresso
Mar 26, 2015
Merged

[BG fields] Add refactored TWTS laser#704
ax3l merged 24 commits into
ComputationalRadiationPhysics:devfrom
BeyondEspresso:topic-redoTWTS-libPMaccComplex-BeyondEspresso

Conversation

@BeyondEspresso
Copy link
Copy Markdown
Member

By re-implementing the TWTS laser as functors, this request concludes a series based on the original pull request #597. Refactoring its separate features led to the subsequent pull requests #600 (BG Fields in mySimulation.hpp, merged), the #664 (Complex class in libPMacc, open) and now this one.

  • Compared to Add twts laser #597, the implementation also includes the correct back-rotation of vector components on the staggered components of the field grids, improved support for 2D and .
  • Functionality tests with and without fields show the same results than a parallel implementation without functors, which directly proceeded Add twts laser #597.
  • Performance tests show a lower performance (~10% without particles and currents, ~1% with particles and currents) than the reference implementation. This performance probably arises from an increased number of float_64 variables. This penalty in performance is currently acceptable.
  • The full sources and documentation of the equations and program that generated the core code for the fields are now at Klaus for cross-checking. However, since this chross-check is done independently and will take some time (probably ~1 month), the focus of this pull request will be more on the implementation aspects.
  • The code includes the current unmerged status of Close #608 Complex Math in libPMacc #664.
  • Future: This code will be updated as soon as the const expression feature becomes available in CUDA and PIConGPU. The aim of this update will be improved speed and a further generalization of the field rotation routines as functors for general use in PIConGPU/libPMacc.

Happy code ripping! 😋

To Do

@BeyondEspresso
Copy link
Copy Markdown
Member Author

The 2D case is currently not passing.

@ax3l ax3l added this to the Open Beta milestone Feb 13, 2015
@ax3l ax3l added feature component: core in PIConGPU (core application) labels Feb 13, 2015
@ax3l ax3l self-assigned this Feb 13, 2015
@ax3l
Copy link
Copy Markdown
Member

ax3l commented Feb 13, 2015

thank you for the pull request 👍
looks nice already - great work. We will do a detailed review next week ✨

Have a good weekend! :)

@BeyondEspresso
Copy link
Copy Markdown
Member Author

Above fix is very dirty 🙈 . Suggestions on improvements, without resorting to pre-compiler directives, are welcome 😇 .

@bussmann
Copy link
Copy Markdown
Member

Nice!

@ax3l
Copy link
Copy Markdown
Member

ax3l commented Feb 17, 2015

it's still a bit hard to review due to the missing rebase against the merged complex pull and the huge number of single commits.

I will try a first swipe, but no guarantee :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

since you return the result in SI pls use float3_64 here, too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Since the result is a normalized quantity the datatype is correct, but I renamed the function.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

makes sense, well done.

@BeyondEspresso BeyondEspresso force-pushed the topic-redoTWTS-libPMaccComplex-BeyondEspresso branch from 7ebe4b9 to cfbe35a Compare February 20, 2015 18:42
@BeyondEspresso
Copy link
Copy Markdown
Member Author

Pull request repository is rebased. (Not just rebased, but the history is cleaner now.)

@BeyondEspresso BeyondEspresso force-pushed the topic-redoTWTS-libPMaccComplex-BeyondEspresso branch from a715496 to 264b416 Compare February 27, 2015 12:23
@BeyondEspresso
Copy link
Copy Markdown
Member Author

In addition to your suggestions I further cleaned up code and interface. Now the code precision can be changed on an individual basis and the coordinate normalization should make it possible now to use the speedier float_X datatype.

Since this round of refactoring has now ended, please go ahead with the review and hack this to pieces! 😄

@ax3l
Copy link
Copy Markdown
Member

ax3l commented Mar 3, 2015

sounds great, we will have a look! ✨

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@BeyondEspresso you have become a very gentle developer in a steep curve, I like that! Nice and clean. 👍

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

please use PMACC_ALIGN

@BeyondEspresso
Copy link
Copy Markdown
Member Author

@psychocoderHPC 's suggestions are now online.

@ax3l
Copy link
Copy Markdown
Member

ax3l commented Mar 20, 2015

small reminder: spaces around operators increase readability (and are part of our coding guidelines).

@BeyondEspresso
Copy link
Copy Markdown
Member Author

Fixed this.
Wrote #766 as constructive criticism on the "spacings around division operator coding guideline".

@ax3l
Copy link
Copy Markdown
Member

ax3l commented Mar 24, 2015

@BeyondEspresso great work!

@psychocoderHPC since this is a bigger pull request and I think it is ready for a merge for now - are you d'accord? :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

field-vectors ;)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@ax3l Note that this is currently unique code that applies to the B-field only (because of intra-cell position offsets). My intention is to generalize this in the upcoming feature update when I introduce different polarizations for the TWTS laser field. (Update: I understand now you were correcting a spelling mistake. 👻 )

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

:)

@BeyondEspresso
Copy link
Copy Markdown
Member Author

Ok, I found and fixed another bug in the 2D section. In addition I did some more polishing on the comments. Let's merge this now. 😉

@BeyondEspresso
Copy link
Copy Markdown
Member Author

Bad bugs kick the bucket last...

@ax3l
Copy link
Copy Markdown
Member

ax3l commented Mar 26, 2015

merge-able now? ;)

ax3l added a commit that referenced this pull request Mar 26, 2015
…mplex-BeyondEspresso

[BG fields] Add refactored TWTS laser
@ax3l ax3l merged commit bb6f295 into ComputationalRadiationPhysics:dev Mar 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: core in PIConGPU (core application)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants