-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Decouple ChargeDensityCalculator and FFT PoissonSolver
Part 1 of #218 See merge request gysela-developpers/gyselalibxx!476 --------------------------------------------
- Loading branch information
1 parent
3502c52
commit fbf35a3
Showing
33 changed files
with
883 additions
and
644 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
#include <cassert> | ||
#include <cmath> | ||
#include <complex> | ||
#include <iostream> | ||
|
||
#include <ddc/ddc.hpp> | ||
|
||
#include <geometry.hpp> | ||
|
||
#include "qnsolver.hpp" | ||
|
||
QNSolver::QNSolver(PoissonSolver const& solve_poisson, IChargeDensityCalculator const& compute_rho) | ||
: m_solve_poisson(solve_poisson) | ||
, m_compute_rho(compute_rho) | ||
{ | ||
} | ||
|
||
void QNSolver::operator()( | ||
DSpanX const electrostatic_potential, | ||
DSpanX const electric_field, | ||
DViewSpXVx const allfdistribu) const | ||
{ | ||
Kokkos::Profiling::pushRegion("QNSolver"); | ||
assert(electrostatic_potential.domain() == ddc::get_domain<IDimX>(allfdistribu)); | ||
IDomainX const x_dom = electrostatic_potential.domain(); | ||
// Compute the RHS of the Quasi-Neutrality equation. | ||
DFieldX rho(x_dom); | ||
|
||
m_compute_rho(rho, allfdistribu); | ||
|
||
m_solve_poisson(electrostatic_potential, electric_field, rho); | ||
|
||
Kokkos::Profiling::popRegion(); | ||
} |
Oops, something went wrong.