Changeset cd0fed
- Timestamp:
- May 10, 2012, 12:22:46 PM (14 years ago)
- Children:
- 06e153
- Parents:
- ae05b4
- Location:
- src
- Files:
-
- 10 edited
-
base/command_list.cpp (modified) (3 diffs)
-
comm/mpi/datatype.cpp (modified) (2 diffs)
-
comm/mpi/settings.cpp (modified) (1 diff)
-
level/level_operator_cs.cpp (modified) (2 diffs)
-
level/level_operator_fas.cpp (modified) (1 diff)
-
units/particle/bspline.hpp (modified) (1 diff)
-
units/particle/comm_mpi_particle.cpp (modified) (2 diffs)
-
units/particle/interface_particles.cpp (modified) (2 diffs)
-
units/particle/interpolation.cpp (modified) (4 diffs)
-
units/particle/interpolation.hpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/base/command_list.cpp
rae05b4 rcd0fed 35 35 Request request; 36 36 Request final_request = (commands.size() == 0 ? StopCycleNow : Continue); 37 Comm* comm = MG::GetComm();38 37 39 38 for (CommandList::iterator iter=commands.begin(); iter!=commands.end(); ++iter) { … … 48 47 MPI_Barrier(MPI_COMM_WORLD); 49 48 #endif 50 comm->PrintStringOnce("Command \"%s\" start", iter->first.c_str());49 MG::GetComm()->PrintStringOnce("Command \"%s\" start", iter->first.c_str()); 51 50 #endif 52 51 … … 59 58 MPI_Barrier(MPI_COMM_WORLD); 60 59 #endif 61 comm->PrintStringOnce("Command \"%s\" done", iter->first.c_str());60 MG::GetComm()->PrintStringOnce("Command \"%s\" done", iter->first.c_str()); 62 61 #endif 63 62 -
src/comm/mpi/datatype.cpp
rae05b4 rcd0fed 67 67 68 68 Index i; 69 int c = 0;69 unsigned int c = 0; 70 70 const Index end = _starts + _subsizes; 71 71 const size_t memcpy_size = _subsizes.Z() * sizeof(vmg_float); … … 100 100 101 101 Index i; 102 int c = 0;102 unsigned int c = 0; 103 103 const Index end = _starts + _subsizes; 104 104 const size_t memcpy_size = _subsizes.Z() * sizeof(vmg_float); -
src/comm/mpi/settings.cpp
rae05b4 rcd0fed 64 64 void VMG::MPI::Settings::ComputeSettings(Multigrid& sol, Multigrid& rhs, MPI_Comm& comm_global) 65 65 { 66 int rank; 67 MPI_Comm comm_last, comm_new; 66 68 67 std::map<const Grid*, Grid*>::const_iterator grid_iter; 69 68 -
src/level/level_operator_cs.cpp
rae05b4 rcd0fed 30 30 Grid& sol_f = sol(sol.Level()); 31 31 Grid& rhs_f = rhs(rhs.Level()); 32 33 Grid& sol_c_dist = sol(sol.Level()-1);34 32 Grid& rhs_c_dist = rhs(rhs.Level()-1); 35 36 Grid& sol_c_undist = comm.GetCoarserGrid(sol);37 33 Grid& rhs_c_undist = comm.GetCoarserGrid(rhs); 38 34 … … 88 84 89 85 Grid& sol_c = sol(sol.Level()); 90 Grid& rhs_c = rhs(rhs.Level());91 92 86 Grid& sol_f_dist = sol(sol.Level()+1); 93 Grid& rhs_f_dist = rhs(rhs.Level()+1);94 95 87 Grid& sol_f_undist = comm.GetFinerGrid(sol); 96 88 Grid& rhs_f_undist = comm.GetFinerGrid(rhs); -
src/level/level_operator_fas.cpp
rae05b4 rcd0fed 98 98 99 99 Grid& sol_c = sol(sol.Level()); 100 Grid& rhs_c = rhs(rhs.Level());101 102 100 Grid& sol_f_dist = sol(sol.Level()+1); 103 101 Grid& rhs_f_dist = rhs(rhs.Level()+1); 104 105 102 Grid& sol_f_undist = comm.GetFinerGrid(sol); 106 103 Grid& rhs_f_undist = comm.GetFinerGrid(rhs); -
src/units/particle/bspline.hpp
rae05b4 rcd0fed 43 43 assert(p.Pos().Z() >= grid.Extent().Begin().Z() && p.Pos().Z() < grid.Extent().End().Z()); 44 44 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)); 46 46 vmg_float temp_val; 47 47 vmg_float int_val = 0.0; -
src/units/particle/comm_mpi_particle.cpp
rae05b4 rcd0fed 57 57 std::vector< std::vector<vmg_float> > recv_buffer_q(size); 58 58 std::vector< std::vector<vmg_int> > recv_buffer_ind(size); 59 MPI_Datatype dt_temp;60 59 61 60 std::memcpy(&global_extent[6*rank], grid.Global().LocalBegin().vec(), 3*sizeof(int)); … … 199 198 // Add potential values 200 199 for (int i=0; i<size; ++i) 201 for ( unsignedint j=0; j<size_receive[i]; ++j) {200 for (vmg_int j=0; j<size_receive[i]; ++j) { 202 201 p[recv_buffer_index[i][j]] = recv_buffer_float[i][4*j]; 203 202 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 117 117 * Get parameters and arrays 118 118 */ 119 const vmg_int& num_particles_local = factory.GetObjectStorageVal<vmg_int>("PARTICLE_NUM_LOCAL");120 119 const vmg_int& near_field_cells = factory.GetObjectStorageVal<int>("PARTICLE_NEAR_FIELD_CELLS"); 121 120 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");124 121 125 122 Particle::Interpolation ip(interpolation_degree); … … 198 195 #ifdef DEBUG_OUTPUT 199 196 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 200 201 201 202 e_long = comm.GlobalSumRoot(e_long); -
src/units/particle/interpolation.cpp
rae05b4 rcd0fed 14 14 using namespace VMG; 15 15 16 Particle::Interpolation::Interpolation(const unsignedint& degree) :16 Particle::Interpolation::Interpolation(const int& degree) : 17 17 deg(degree), 18 18 deg_1(degree+1), … … 36 36 Index i; 37 37 38 const Index begin = index - (static_cast<int>(deg_1)-1)/2 - 1;38 const Index begin = index - deg/2 - 1; 39 39 40 40 h = grid.Extent().MeshWidth(); … … 68 68 vmg_float power = 1.0; 69 69 unsigned long faculty = 1; 70 unsignedint c;70 int c; 71 71 Index i; 72 72 … … 77 77 ++i[direction]; 78 78 for (c=1; c<deg_1; ++i[direction], ++c) { 79 for ( unsignedint j=0; j<deg_1-c; ++j)79 for (int j=0; j<deg_1-c; ++j) 80 80 coeff_buffer[j] = coeff_buffer[j+1] - coeff_buffer[j]; 81 81 faculty *= c; -
src/units/particle/interpolation.hpp
rae05b4 rcd0fed 20 20 { 21 21 public: 22 Interpolation(const unsignedint& degree);22 Interpolation(const int& degree); 23 23 ~Interpolation(); 24 24 … … 43 43 vmg_float* coeff; 44 44 vmg_float* coeff_buffer; 45 unsignedint deg, deg_1;45 int deg, deg_1; 46 46 Vector pos_begin; 47 47 Vector h;
Note:
See TracChangeset
for help on using the changeset viewer.
