50 RP::add(
"Shocktest.rho1",
"Number density, left state (m^-3)", 0.0);
51 RP::add(
"Shocktest.rho2",
"Number density, right state (m^-3)", 0.0);
52 RP::add(
"Shocktest.T1",
"Temperature, left state (K)", 0.0);
53 RP::add(
"Shocktest.T2",
"Temperature, right state (K)", 0.0);
54 RP::add(
"Shocktest.Vx1",
"Bulk velocity x component, left state (m/s)", 0.0);
55 RP::add(
"Shocktest.Vx2",
"Bulk velocity x component, right state (m/s)", 0.0);
56 RP::add(
"Shocktest.Vy1",
"Bulk velocity y component, left state (m/s)", 0.0);
57 RP::add(
"Shocktest.Vy2",
"Bulk velocity y component, right state (m/s)", 0.0);
58 RP::add(
"Shocktest.Vz1",
"Bulk velocity z component, left state (m/s)", 0.0);
59 RP::add(
"Shocktest.Vz2",
"Bulk velocity z component, right state (m/s)", 0.0);
60 RP::add(
"Shocktest.Bx1",
"Magnetic field x component, left state (T)", 0.0);
61 RP::add(
"Shocktest.Bx2",
"Magnetic field x component, right state (T)", 0.0);
62 RP::add(
"Shocktest.By1",
"Magnetic field y component, left state (T)", 0.0);
63 RP::add(
"Shocktest.By2",
"Magnetic field y component, right state (T)", 0.0);
64 RP::add(
"Shocktest.Bz1",
"Magnetic field z component, left state (T)", 0.0);
65 RP::add(
"Shocktest.Bz2",
"Magnetic field z component, right state (T)", 0.0);
72 std::cerr <<
"The selected project does not support multiple particle populations! Aborting in " << __FILE__ <<
" line " << __LINE__ << std::endl;
93 RP::get(
"Shocktest.rho1", this->
rho[this->
LEFT]);
94 RP::get(
"Shocktest.rho2", this->
rho[this->
RIGHT]);
95 RP::get(
"Shocktest.T1", this->
T[this->LEFT]);
96 RP::get(
"Shocktest.T2", this->
T[this->RIGHT]);
97 RP::get(
"Shocktest.Vx1", this->
Vx[this->LEFT]);
98 RP::get(
"Shocktest.Vx2", this->
Vx[this->RIGHT]);
99 RP::get(
"Shocktest.Vy1", this->
Vy[this->LEFT]);
100 RP::get(
"Shocktest.Vy2", this->
Vy[this->RIGHT]);
101 RP::get(
"Shocktest.Vz1", this->
Vz[this->LEFT]);
102 RP::get(
"Shocktest.Vz2", this->
Vz[this->RIGHT]);
103 RP::get(
"Shocktest.Bx1", this->
Bx[this->LEFT]);
104 RP::get(
"Shocktest.Bx2", this->
Bx[this->RIGHT]);
105 RP::get(
"Shocktest.By1", this->
By[this->LEFT]);
106 RP::get(
"Shocktest.By2", this->
By[this->RIGHT]);
107 RP::get(
"Shocktest.Bz1", this->
Bz[this->LEFT]);
108 RP::get(
"Shocktest.Bz2", this->
Bz[this->RIGHT]);
113 const uint nRequested
123 Real initRho = this->
rho[side];
124 Real initT = this->
T[side];
125 const Real initV0X = this->
Vx[side];
126 const Real initV0Y = this->
Vy[side];
127 const Real initV0Z = this->
Vz[side];
146 vmesh->getBlockInfo(blockGID,&blockCoords[0]);
147 creal vxBlock = blockCoords[0];
148 creal vyBlock = blockCoords[1];
149 creal vzBlock = blockCoords[2];
150 creal dvxCell = blockCoords[3];
151 creal dvyCell = blockCoords[4];
152 creal dvzCell = blockCoords[5];
154 creal vx = vxBlock + (
i+0.5)*dvxCell - initV0X;
155 creal vy = vyBlock + (
j+0.5)*dvyCell - initV0Y;
156 creal vz = vzBlock + (
k+0.5)*dvzCell - initV0Z;
181 Real initRho = this->
rho[side];
182 Real initT = this->
T[side];
183 const Real initV0X = this->
Vx[side];
184 const Real initV0Y = this->
Vy[side];
185 const Real initV0Z = this->
Vz[side];
187 creal vx = vx_in - initV0X;
188 creal vy = vy_in - initV0Y;
189 creal vz = vz_in - initV0Z;
205 vector<std::array<Real, 3>> centerPoints;
207 std::array<Real, 3> V0 {{this->
Vx[side], this->
Vy[side], this->
Vz[side]}};
208 centerPoints.push_back(V0);
226 const auto Bx_l = this->
Bx;
227 const auto By_l = this->
By;
228 const auto Bz_l = this->
Bz;
229 const auto LEFT_l = this->
LEFT;
230 const auto RIGHT_l = this->
RIGHT;
231 fsgrid.parallel_for([](
int timerId) -> phiprof::Timer {
return phiprof::Timer{timerId}; },
232 phiprof::initializeTimer(
"setProjectBField-loop"), technical,
233 [=](
const fsgrid::Coordinates &coordinates,
const fsgrid::FsStencil& stencil,
cuint sysBoundaryFlag,
cuint sysBoundaryLayer) {
234 const std::array<Real, 3> xyz = coordinates.getPhysicalCoords(stencil.i, stencil.j, stencil.k);
235 auto& cell = perb[stencil.ooo()];
#define ARCH_INNER_BODY(...)
void setBackgroundFieldToZero(FieldSolverGrid &fsgrid, fsgrids::technicalspan technical, fsgrids::bgbspan bgb)
virtual bool initialize()
virtual void getParameters()
static void addParameters(void)
virtual bool initialize(void) override
virtual std::vector< std::array< Real, 3 > > getV0(creal x, creal y, creal z, const uint popID) const override
virtual void getParameters(void) override
virtual Realf fillPhaseSpace(spatial_cell::SpatialCell *cell, const uint popID, const uint nRequested) const override
virtual void setProjectBField(fsgrids::perbspan perb, fsgrids::bgbspan bgb, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid) override
virtual Realf probePhaseSpace(spatial_cell::SpatialCell *cell, const uint popID, Real vx_in, Real vy_in, Real vz_in) const override
virtual void calcCellParameters(spatial_cell::SpatialCell *cell, creal &t) override
vmesh::VelocityMesh * get_velocity_mesh(const size_t &popID)
vmesh::VelocityBlockContainer * get_velocity_blocks(const size_t &popID)
std::array< Real, CellParams::N_SPATIAL_CELL_PARAMS > parameters
vmesh::VelocityBlockContainer * dev_get_velocity_blocks(const size_t &popID)
vmesh::VelocityMesh * dev_get_velocity_mesh(const size_t &popID)
ARCH_HOSTDEV Realf * getData()
fsgrid::FsGrid< FS_STENCIL_WIDTH > FieldSolverGrid
ObjectWrapper & getObjectWrapper()
static void parallel_reduce(const uint(&limits)[NDim], Lambda loop_body, T &sum)
std::span< std::array< Real, fsgrids::bfield::N_BFIELD > > perbspan
std::span< technical > technicalspan
std::span< std::array< Real, bgbfield::N_BGB > > bgbspan
ARCH_HOSTDEV Realf MaxwellianPhaseSpaceDensity(creal &vx, creal &vy, creal &vz, creal &T, creal &rho, creal &mass)
std::vector< species::Species > particleSpecies