Changeset cd0fed for src/units/particle


Ignore:
Timestamp:
May 10, 2012, 12:22:46 PM (14 years ago)
Author:
Julian Iseringhausen <isering@…>
Children:
06e153
Parents:
ae05b4
Message:

Fixed some warnings.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@1804 5161e1c8-67bf-11de-9fd5-51895aff932f

Location:
src/units/particle
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/units/particle/bspline.hpp

    rae05b4 rcd0fed  
    4343    assert(p.Pos().Z() >= grid.Extent().Begin().Z() && p.Pos().Z() < grid.Extent().End().Z());
    4444
    45     vmg_float vals[Helper::intpow(2*near_field_cells+1,3)];
     45    std::vector<vmg_float> vals(Helper::intpow(2*near_field_cells+1,3));
    4646    vmg_float temp_val;
    4747    vmg_float int_val = 0.0;
  • src/units/particle/comm_mpi_particle.cpp

    rae05b4 rcd0fed  
    5757  std::vector< std::vector<vmg_float> > recv_buffer_q(size);
    5858  std::vector< std::vector<vmg_int> > recv_buffer_ind(size);
    59   MPI_Datatype dt_temp;
    6059
    6160  std::memcpy(&global_extent[6*rank], grid.Global().LocalBegin().vec(), 3*sizeof(int));
     
    199198  // Add potential values
    200199  for (int i=0; i<size; ++i)
    201     for (unsigned int j=0; j<size_receive[i]; ++j) {
     200    for (vmg_int j=0; j<size_receive[i]; ++j) {
    202201      p[recv_buffer_index[i][j]] = recv_buffer_float[i][4*j];
    203202      std::memcpy(&f[recv_buffer_index[i][j]], &recv_buffer_float[i][4*j+1], 3*sizeof(vmg_float));
  • src/units/particle/interface_particles.cpp

    rae05b4 rcd0fed  
    117117   * Get parameters and arrays
    118118   */
    119   const vmg_int& num_particles_local = factory.GetObjectStorageVal<vmg_int>("PARTICLE_NUM_LOCAL");
    120119  const vmg_int& near_field_cells = factory.GetObjectStorageVal<int>("PARTICLE_NEAR_FIELD_CELLS");
    121120  const vmg_int& interpolation_degree = factory.GetObjectStorageVal<int>("PARTICLE_INTERPOLATION_DEGREE");
    122   vmg_float* p = factory.GetObjectStorageArray<vmg_float>("PARTICLE_POTENTIAL_ARRAY");
    123   vmg_float* f = factory.GetObjectStorageArray<vmg_float>("PARTICLE_FIELD_ARRAY");
    124121
    125122  Particle::Interpolation ip(interpolation_degree);
     
    198195#ifdef DEBUG_OUTPUT
    199196  vmg_float* q = factory.GetObjectStorageArray<vmg_float>("PARTICLE_CHARGE_ARRAY");
     197  const vmg_int& num_particles_local = factory.GetObjectStorageVal<vmg_int>("PARTICLE_NUM_LOCAL");
     198  const vmg_float* p = factory.GetObjectStorageArray<vmg_float>("PARTICLE_POTENTIAL_ARRAY");
     199  const vmg_float* f = factory.GetObjectStorageArray<vmg_float>("PARTICLE_FIELD_ARRAY");
     200
    200201
    201202  e_long = comm.GlobalSumRoot(e_long);
  • src/units/particle/interpolation.cpp

    rae05b4 rcd0fed  
    1414using namespace VMG;
    1515
    16 Particle::Interpolation::Interpolation(const unsigned int& degree) :
     16Particle::Interpolation::Interpolation(const int& degree) :
    1717  deg(degree),
    1818  deg_1(degree+1),
     
    3636  Index i;
    3737
    38   const Index begin = index - (static_cast<int>(deg_1)-1)/2 - 1;
     38  const Index begin = index - deg/2 - 1;
    3939
    4040  h = grid.Extent().MeshWidth();
     
    6868  vmg_float power = 1.0;
    6969  unsigned long faculty = 1;
    70   unsigned int c;
     70  int c;
    7171  Index i;
    7272
     
    7777  ++i[direction];
    7878  for (c=1; c<deg_1; ++i[direction], ++c) {
    79     for (unsigned int j=0; j<deg_1-c; ++j)
     79    for (int j=0; j<deg_1-c; ++j)
    8080      coeff_buffer[j] = coeff_buffer[j+1] - coeff_buffer[j];
    8181    faculty *= c;
  • src/units/particle/interpolation.hpp

    rae05b4 rcd0fed  
    2020{
    2121public:
    22   Interpolation(const unsigned int& degree);
     22  Interpolation(const int& degree);
    2323  ~Interpolation();
    2424
     
    4343  vmg_float* coeff;
    4444  vmg_float* coeff_buffer;
    45   unsigned int deg, deg_1;
     45  int deg, deg_1;
    4646  Vector pos_begin;
    4747  Vector h;
Note: See TracChangeset for help on using the changeset viewer.