Skip to content

Commit

Permalink
rename N_theta -> N_observers
Browse files Browse the repository at this point in the history
  • Loading branch information
Pausch committed Feb 27, 2014
1 parent 6b1a8bc commit 9e487ec
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace picongpu
const numtype2 thetaMax = gamma_times_thetaMax / gamma; /* max angle */

/* stepwith of theta for from [-thetaMax : +thetaMax] */
const numtype2 delta_theta = 2.0 * gamma_times_thetaMax / (parameters::N_theta);
const numtype2 delta_theta = 2.0 * gamma_times_thetaMax / (parameters::N_observer);

/* compute angle theta for index */
const numtype2 theta(my_theta_id * delta_theta - gamma_times_thetaMax + picongpu::PI);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ namespace parameters

const float RadiationGamma = 5.;

const unsigned int N_theta = 128; // number of looking directions
const unsigned int N_observer = 128; // number of looking directions



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ namespace parameters

const float RadiationGamma = 5.;

const unsigned int N_theta = 256; // number of looking directions
const unsigned int N_observer = 256; // number of looking directions



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ namespace parameters

const float RadiationGamma = 5.;

const unsigned int N_theta = 128; // number of looking directions
const unsigned int N_observer = 128; // number of looking directions



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ namespace parameters

const float RadiationGamma = 5.;

const unsigned int N_theta = 128; // number of looking directions
const unsigned int N_observer = 128; // number of looking directions



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace picongpu
const numtype2 thetaMax = gamma_times_thetaMax / gamma; /* max angle */

/* stepwith of theta for from [-thetaMax : +thetaMax] */
const numtype2 delta_theta = 2.0 * gamma_times_thetaMax / (parameters::N_theta);
const numtype2 delta_theta = 2.0 * gamma_times_thetaMax / (parameters::N_observer);

/* compute angle theta for index */
const numtype2 theta(my_theta_id * delta_theta - gamma_times_thetaMax + picongpu::PI);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ namespace parameters

const float RadiationGamma = 5.f;

const unsigned int N_theta = 128; // number of looking directions
const unsigned int N_observer = 128; // number of looking directions



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ namespace parameters

const float RadiationGamma = 5.;

const unsigned int N_theta = 256; // number of looking directions
const unsigned int N_observer = 256; // number of looking directions



Expand Down
14 changes: 7 additions & 7 deletions src/picongpu/include/plugins/Radiation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ class Radiation : public ISimulationIO, public IPluginModule
{
/*only rank 0 create a file*/
isMaster = reduce.hasResult(mpi::reduceMethods::Reduce());
const int elements_amplitude = radiation_frequencies::N_omega * parameters::N_theta; // storage for amplitude results on GPU
const int elements_amplitude = radiation_frequencies::N_omega * parameters::N_observer; // storage for amplitude results on GPU

radiation = new GridBuffer<Amplitude, DIM1 > (DataSpace<DIM1 > (elements_amplitude)); //create one int on gpu und host

Expand Down Expand Up @@ -719,7 +719,7 @@ class Radiation : public ISimulationIO, public IPluginModule
void combineData(const DataSpace<simDim> currentGPUpos)
{

const unsigned int elements_amplitude = radiation_frequencies::N_omega * parameters::N_theta; // storage for amplitude results on GPU
const unsigned int elements_amplitude = radiation_frequencies::N_omega * parameters::N_observer; // storage for amplitude results on GPU
Amplitude *result = new Amplitude[elements_amplitude];


Expand Down Expand Up @@ -816,7 +816,7 @@ class Radiation : public ISimulationIO, public IPluginModule
}
else
{
for (unsigned int index_direction = 0; index_direction < parameters::N_theta; ++index_direction) // over all directions
for (unsigned int index_direction = 0; index_direction < parameters::N_observer; ++index_direction) // over all directions
{
for (unsigned index_omega = 0; index_omega < radiation_frequencies::N_omega; ++index_omega) // over all frequencies
{
Expand Down Expand Up @@ -850,7 +850,7 @@ class Radiation : public ISimulationIO, public IPluginModule
}
else
{
outFile.write((char*) values, sizeof (Amplitude) * parameters::N_theta * radiation_frequencies::N_omega);
outFile.write((char*) values, sizeof (Amplitude) * parameters::N_observer * radiation_frequencies::N_omega);
}

outFile.close();
Expand All @@ -867,7 +867,7 @@ class Radiation : public ISimulationIO, public IPluginModule
}
else
{
inFile.read((char*) values, sizeof (Amplitude) * parameters::N_theta * radiation_frequencies::N_omega);
inFile.read((char*) values, sizeof (Amplitude) * parameters::N_observer * radiation_frequencies::N_omega);
std::cout << "Radiation: backup files have been loaded." << std::endl;
}

Expand Down Expand Up @@ -907,8 +907,8 @@ class Radiation : public ISimulationIO, public IPluginModule
* turned out to be slower on fermis (couple percent) and
* definitly slower on kepler k20)
*/
const int N_theta = parameters::N_theta;
const dim3 gridDim_rad(N_theta);
const int N_observer = parameters::N_observer;
const dim3 gridDim_rad(N_observer);

/* number of threads per block = number of cells in a super cell
* = number of particles in a Frame
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ namespace parameters

const float RadiationGamma = 5.;

const unsigned int N_theta = 256; // number of looking directions
const unsigned int N_observer = 256; // number of looking directions



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ namespace picongpu
namespace parameters
{

const unsigned int gridsize_theta = N_theta; // size of grid /dim: y); radiation
const unsigned int gridsize_theta = N_observer; // size of grid /dim: y); radiation

}

Expand Down

0 comments on commit 9e487ec

Please sign in to comment.