45 RP::add(
"Harris.Scale_size",
"Harris sheet scale size (m)", 150000.0);
46 RP::add(
"Harris.BX0",
"Magnetic field at infinity (T)", 8.33061003094e-8);
47 RP::add(
"Harris.BY0",
"Magnetic field at infinity (T)", 8.33061003094e-8);
48 RP::add(
"Harris.BZ0",
"Magnetic field at infinity (T)", 8.33061003094e-8);
54 RP::add(pop +
"_Harris.Temperature",
"Temperature (K)", 2.0e6);
55 RP::add(pop +
"_Harris.rho",
"Number density at infinity (m^-3)", 1.0e7);
62 RP::get(
"Harris.Scale_size", this->
SCA_LAMBDA);
63 RP::get(
"Harris.BX0", this->
BX0);
64 RP::get(
"Harris.BY0", this->
BY0);
65 RP::get(
"Harris.BZ0", this->
BZ0);
73 RP::get(pop +
"_Harris.Temperature", sP.
TEMPERATURE);
74 RP::get(pop +
"_Harris.rho", sP.
DENSITY);
94 const Real initV0X = 0;
95 const Real initV0Y = 0;
96 const Real initV0Z = 0;
98 initRho *= (1.0 + 5.0 / pow(cosh(x / (this->
SCA_LAMBDA)), 2.0));
117 vmesh->getBlockInfo(blockGID,&blockCoords[0]);
118 creal vxBlock = blockCoords[0];
119 creal vyBlock = blockCoords[1];
120 creal vzBlock = blockCoords[2];
121 creal dvxCell = blockCoords[3];
122 creal dvyCell = blockCoords[4];
123 creal dvzCell = blockCoords[5];
125 creal vx = vxBlock + (
i+0.5)*dvxCell - initV0X;
126 creal vy = vyBlock + (
j+0.5)*dvyCell - initV0Y;
127 creal vz = vzBlock + (
k+0.5)*dvzCell - initV0Z;
154 const Real initV0X = 0;
155 const Real initV0Y = 0;
156 const Real initV0Z = 0;
158 initRho *= (1.0 + 5.0 / pow(cosh(x / (this->
SCA_LAMBDA)), 2.0));
159 creal vx = vx_in - initV0X;
160 creal vy = vy_in - initV0Y;
161 creal vz = vz_in - initV0Z;
174 vector<std::array<Real, 3>> V0;
175 std::array<Real, 3> v = {{0.0, 0.0, 0.0 }};
187 const auto BX0_l = this->
BX0;
188 const auto BY0_l = this->
BY0;
189 const auto BZ0_l = this->
BZ0;
192 fsgrid.parallel_for([](
int timerId) -> phiprof::Timer {
return phiprof::Timer{timerId}; },
193 phiprof::initializeTimer(
"setProjectBField-loop"), technical,
194 [=](
const fsgrid::Coordinates &coordinates,
const fsgrid::FsStencil& stencil,
cuint sysBoundaryFlag,
cuint sysBoundaryLayer) {
195 const std::array<Real, 3> xyz = coordinates.getPhysicalCoords(stencil.i, stencil.j, stencil.k);
196 const std::array<Real, 3> gridSpacing = coordinates.physicalGridSpacing;
197 auto& cell = perb[stencil.ooo()];
#define ARCH_INNER_BODY(...)
void setBackgroundFieldToZero(FieldSolverGrid &fsgrid, fsgrids::technicalspan technical, fsgrids::bgbspan bgb)
virtual Realf probePhaseSpace(spatial_cell::SpatialCell *cell, const uint popID, Real vx_in, Real vy_in, Real vz_in) const override
virtual bool initialize(void) override
static void addParameters(void)
virtual std::vector< std::array< Real, 3 > > getV0(creal x, creal y, creal z, const uint popID) const override
Return a vector containing the velocity coordinate of the centre of each ion population in the distri...
virtual void calcCellParameters(spatial_cell::SpatialCell *cell, creal &t) override
virtual void setProjectBField(fsgrids::perbspan perb, fsgrids::bgbspan bgb, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid) override
std::vector< HarrisSpeciesParameters > speciesParams
virtual void getParameters(void) override
virtual Realf fillPhaseSpace(spatial_cell::SpatialCell *cell, const uint popID, const uint nRequested) const override
virtual bool initialize()
virtual void getParameters()
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