Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~2K People Reached
Favorite Forums
Favorite Tags
c++ x 15
Member Avatar for nahmartin

Hi, I am having trouble outputting to many files [CODE] ifstream sim_dump; sim_dump.open("c_grain.sim_trj"); char dump_file[20]; int itr = 4000; sprintf( dump_file, "%d", itr); ofstream fout(dump_file); while(lammpsdump.good()) { //if(itr % 100 == 0) //{ fout.close(); sprintf( dump_file, "%d", itr); ofstream fout(dump_file); cout << "TIMESTEP " << itr << endl; //} ... …

Member Avatar for nahmartin
0
160
Member Avatar for nahmartin

Quick help please I am writing some data to a file but I do not know the information required in the third line until after the file is completed is there a way to point the ofstream back to the beginning of the file so that i can edit it …

Member Avatar for mike_2000_17
0
405
Member Avatar for nahmartin

I am having problems with sending my array N_List [CODE]int** N_List = create_2d_int_array(len_N_List, 100, "voro:N_List"); double** atoms = create_2d_double_array((int) (8*box_x*box_y*box_z/(lattice*lattice*lattice)), 3, "voro:atoms"); for(i=0;i<len_N_List; i++) for(j=0;j<100;j++) N_List[i][j] = 0; [/CODE] The code runs fine with N_list send and recv omitted but with it, it causes a segmentation fault Send [CODE] if(rank …

Member Avatar for nahmartin
0
464
Member Avatar for nahmartin

Hello Most of my C++ is self taught so please excuse me In my code I am writing a large amount of data to file [CODE] for(int i=0; i<itr_atoms; i++) file_out << i+1 << " 1 " << atoms[i][0] + origin_x << " " << atoms[i][1] + origin_y << " …

Member Avatar for nahmartin
0
185
Member Avatar for nahmartin

I don't know how to solve this problem in my code voro.cpp(200): (col. 5) remark: LOOP WAS VECTORIZED voro.cpp(395): same problem voro.cpp(423): voro.cpp(427): I am using intel compiler 10.1 to compile my code the code works fine on dev C++ 4.9.9.2 and V C++ 2008 200 [CODE] for(j=0; j<3; j++) …

Member Avatar for wildgoose
0
213
Member Avatar for nahmartin

My apologies my c++ abilities are poor (self taught) I have a text file that needs editing the first 10 lines of the file needs replacing but the other 1,000,000 + lines don't I need the information in the first 10 lines to know what to edit them to i …

Member Avatar for nahmartin
0
134