-
Notifications
You must be signed in to change notification settings - Fork 10
Add an interface for Poisson-like solvers #425
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
base: devel
Are you sure you want to change the base?
Conversation
/** | ||
* @brief Update the coefficients @f$ alpha @f$ and @f$ beta @f$ that define the equation. | ||
* @param[in] alpha The values of alpha at the grid points. | ||
* @param[in] beta The values of beta at the grid points. | ||
*/ | ||
virtual void update_coefficients(const_field_type alpha, const_field_type beta) = 0; | ||
|
||
/** | ||
* @brief An operator which calculates the solution @f$\phi@f$ to Poisson's equation: | ||
* @f$ -\Delta \phi = \rho @f$ | ||
* | ||
* @param[out] phi The solution to Poisson's equation. | ||
* @param[in] rho The right-hand side of Poisson's equation. | ||
* | ||
* @return A reference to the solution to Poisson's equation. | ||
*/ | ||
virtual field_type operator()(field_type phi, field_type rho) const = 0; | ||
|
||
/** | ||
* @brief An operator which calculates the solution @f$\phi@f$ to Poisson's equation and | ||
* its derivative: | ||
* @f$ - \Delta \phi = \rho @f$ | ||
* @f$ E = - \nabla \phi @f$ | ||
* | ||
* @param[out] phi The solution to Poisson's equation. | ||
* @param[out] E The derivative of the solution to Poisson's equation. | ||
* @param[in] rho The right-hand side of Poisson's equation. | ||
* | ||
* @return A reference to the solution to Poisson's equation. | ||
*/ | ||
virtual field_type operator()(field_type phi, vector_field_type E, field_type rho) const = 0; |
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.
@gdgirard Would this interface match what you would like to have in Gysela?
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.
We definitively need virtual field_type operator()(field_type phi, field_type rho) const = 0;
But I realize that not sure that the second one where the derivative are computed would be useful for us because what we will need is not the gradient of Phi but the gradient of J_\mu.Phi which corresponds to the gyroaverage values of Phi.
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.
And we also need the update_coefficients
routine
<Describe your PR here. This will form the basis of the squashed commit message in the devel branch.>
Please complete the checklist to ensure that all tasks are completed before marking your pull request as ready for review.
All Submissions
New Feature Submissions
Changes to Existing Features
Changes to the CI