質問編集履歴
1
コードの追加
    
        title	
    CHANGED
    
    | 
            File without changes
         | 
    
        body	
    CHANGED
    
    | @@ -22,11 +22,49 @@ | |
| 22 22 | 
             
                  |              std::basic_ostream<char>       std::ifstream {aka std::basic_ifstream<char>}
         | 
| 23 23 | 
             
            ```
         | 
| 24 24 |  | 
| 25 | 
            +
            ### 該当すると思われるプログラム
         | 
| 26 | 
            +
            プログラムが長く、また複数のファイルに及ぶので、エラーが出た辺りのコードのみを載せます。
         | 
| 27 | 
            +
            ```c++
         | 
| 28 | 
            +
               maxx = minx + ( numcols - 1 ) * delgrid;
         | 
| 29 | 
            +
               maxy = miny + ( numrows - 1 ) * delgrid;
         | 
| 30 | 
            +
               dx = maxx - minx;
         | 
| 31 | 
            +
               dy = maxy - miny;
         | 
| 32 | 
            +
               di = numcols;
         | 
| 33 | 
            +
               dj = numrows;
         | 
| 34 | 
            +
               // create matrix from input file:
         | 
| 35 | 
            +
               tMatrix< double > elev( numrows, numcols );
         | 
| 36 | 
            +
               for( j=0; j<numrows; j++ )
         | 
| 37 | 
            +
               {
         | 
| 38 | 
            +
                  for( i=0; i<numcols; i++ )
         | 
| 39 | 
            +
                  {
         | 
| 40 | 
            +
                     if( gridfile.eof() )
         | 
| 41 | 
            +
                         ReportFatalError( "Reached end-of-file while reading points." );
         | 
| 42 | 
            +
                     gridfile >> elev( j, i );
         | 
| 43 | 
            +
                  }
         | 
| 44 | 
            +
               }
         | 
| 45 | 
            +
               gridfile.close();
         | 
| 46 | 
            +
               std::cout << "finished reading file," << gridfile << std::endl;
         | 
| 47 | 
            +
               // Create the 3 nodes that form the supertriangle and place them on the
         | 
| 48 | 
            +
               // node list in counter-clockwise order. (Note that the base and height
         | 
| 49 | 
            +
               // of the supertriangle are 5 times the
         | 
| 50 | 
            +
               // width and height, respectively, of the rectangle that encloses the
         | 
| 51 | 
            +
               // points.) Assigning the IDs allows us to retrieve and delete these
         | 
| 52 | 
            +
               // nodes when we're done creating the mesh.
         | 
| 53 | 
            +
               tempnode.set3DCoords( minx-2*dx, miny-2*dy, 0.0 );
         | 
| 54 | 
            +
               tempnode.setBoundaryFlag( kClosedBoundary );
         | 
| 55 | 
            +
               tempnode.setID( -3 );
         | 
| 56 | 
            +
               nodeList.insertAtBack( tempnode );
         | 
| 57 | 
            +
               tempnode.set3DCoords( maxx+2*dx, miny-2*dy, 0.0 );
         | 
| 58 | 
            +
               tempnode.setID( -2 );
         | 
| 59 | 
            +
               nodeList.insertAtBack( tempnode );
         | 
| 60 | 
            +
               tempnode.set3DCoords( minx+0.5*dx, maxy+2*dy, 0.0 );
         | 
| 61 | 
            +
               tempnode.setID( -1 );
         | 
| 62 | 
            +
               nodeList.insertAtBack( tempnode );
         | 
| 25 63 |  | 
| 64 | 
            +
            ```
         | 
| 26 65 |  | 
| 27 66 |  | 
| 28 67 |  | 
| 29 | 
            -
             | 
| 30 68 | 
             
            ### 補足情報(FW/ツールのバージョンなど)
         | 
| 31 69 |  | 
| 32 70 | 
             
            windows10
         | 
