Remove trailing whitespaces

This commit is contained in:
Júlio Hoffimann
2013-07-28 08:34:13 -03:00
parent e45313e918
commit 8385a9bcbb
64 changed files with 1094 additions and 1093 deletions
+3 -3
View File
@@ -60,8 +60,8 @@ int main(int argc, char** argv)
Opm::BlackoilPvtProperties pvt;
int samples = param.getDefault("dead_tab_size", 1025);
pvt.init(deck, samples);
const int n = 1;
std::fstream inos(input_file.c_str());
if(!inos.good()){
@@ -103,7 +103,7 @@ int main(int argc, char** argv)
double p[n];
double z[max_np*n];
int cells[n] = { 0 };
inos >> p[0];
inos >> p[0];
for(int i=0; i < np; ++i){
inos >> z[i];
}
+1 -1
View File
@@ -54,7 +54,7 @@ int main(int argc, char** argv)
grid.cartdims[1] = 1;
grid.cartdims[2] = 1;
Opm::BlackoilPropertiesFromDeck props(deck, grid, param);
std::fstream inos(input_file.c_str());//, std::fstream::in);
if(!inos.good()){
std::cout << "Could not open :" << input_file << std::endl;
+23 -23
View File
@@ -38,13 +38,13 @@ static
void cell_nodes(const UnstructuredGrid * c_grid , int cell , std::vector<int>& nodes) {
int face_offset = c_grid->cell_facepos[cell];
int num_faces = c_grid->cell_facepos[cell + 1] - face_offset;
nodes.clear();
//printf("cell: %d \n",cell);
for (int iface = 0; iface < num_faces; iface++) {
int face = c_grid->cell_faces[ face_offset + iface];
//printf("face[%d] = %d \n",iface , face );
{
int node_offset = c_grid->face_nodepos[ face ];
int num_nodes = c_grid->face_nodepos[ face + 1] - node_offset;
@@ -84,22 +84,22 @@ void cell_nodes(const UnstructuredGrid * c_grid , int cell , std::vector<int>& n
static
void eclExport(Opm::GridManager& grid) {
const UnstructuredGrid * c_grid = grid.c_grid();
printf("dimensions : %d \n",c_grid->dimensions);
printf("number of cells : %d \n",c_grid->number_of_cells);
printf("number of nodes : %d \n",c_grid->number_of_nodes);
printf("number of faces : %d \n",c_grid->number_of_faces);
printf("length(face_nodes) : %d \n",c_grid->face_nodepos[ c_grid->number_of_faces ]);
printf("cartdims : %d %d %d \n",
c_grid->cartdims[0] ,
c_grid->cartdims[1] ,
c_grid->cartdims[2]);
c_grid->cartdims[0] ,
c_grid->cartdims[1] ,
c_grid->cartdims[2]);
printf("global_cell : %d %d %d %d %d\n",
c_grid->global_cell[0] ,
c_grid->global_cell[1] ,
c_grid->global_cell[2] ,
c_grid->global_cell[3] ,
c_grid->global_cell[0] ,
c_grid->global_cell[1] ,
c_grid->global_cell[2] ,
c_grid->global_cell[3] ,
c_grid->global_cell[4]);
{
@@ -109,20 +109,20 @@ void eclExport(Opm::GridManager& grid) {
cell_nodes( c_grid , 20 , nodes );
cell_nodes( c_grid , 25 , nodes );
}
{
ecl_grid_type * ecl_grid;
int num_coords = c_grid->number_of_cells;
int coords_size = 4;
int nx = c_grid->cartdims[0];
int ny = c_grid->cartdims[1];
int nz = c_grid->cartdims[2];
int nz = c_grid->cartdims[2];
int ** coords;
float ** corners;
// float * mapaxes = NULL;
std::vector<int> nodes;
corners = (float **) malloc( num_coords * sizeof * corners );
coords = (int **) malloc( num_coords * sizeof * coords );
@@ -132,12 +132,12 @@ void eclExport(Opm::GridManager& grid) {
corners[c] = (float *) malloc( 24 * sizeof * corners[c] );
coords[c] = (int *) malloc( coords_size * sizeof * coords[c] );
}
for (c=0; c < num_coords; c++) {
cell_nodes( c_grid , c , nodes );
for (int p=0; p < 8; p++) {
int n = nodes[p];
for (int d=0; d < c_grid->dimensions; d++)
for (int d=0; d < c_grid->dimensions; d++)
corners[c][3*p + d] = c_grid->node_coordinates[ c_grid->dimensions * n + d ];
}
@@ -146,7 +146,7 @@ void eclExport(Opm::GridManager& grid) {
{
int g = c_grid->global_cell[ c ];
k = g / nx*ny; g -= k * nx*ny;
j = g / nx; g -= j * nx;
j = g / nx; g -= j * nx;
i = g;
}
@@ -161,7 +161,7 @@ void eclExport(Opm::GridManager& grid) {
ecl_grid = ecl_grid_alloc( "/private/joaho/ERT/NR/libenkf/src/Gurbat/EXAMPLE_01_BASE.EGRID" );
printf("Grid loaded ... \n");
ecl_grid_free( ecl_grid );
printf("Grid discarded ... \n");
ecl_grid = ecl_grid_alloc_GRID_data( num_coords , nx , ny , nz , coords_size , coords , corners , NULL );
@@ -174,7 +174,7 @@ void eclExport(Opm::GridManager& grid) {
}
ecl_grid_free( ecl_grid );
{
for (int c=0; c < num_coords; c++) {
free(corners[c]);
@@ -189,7 +189,7 @@ void eclExport(Opm::GridManager& grid) {
/*
#ifdef HAVE_ERT
ecl_grid_type * create_ecl_grid( const struct UnstructuredGrid * g) {
int num_coords = g->number_of_cells;
@@ -200,7 +200,7 @@ ecl_grid_type * create_ecl_grid( const struct UnstructuredGrid * g) {
int ** coords;
float ** corners;
float * mapaxes = NULL;
corners = malloc( num_coords * sizeof * corners );
coords = malloc( num_coords * sizeof * coords );
@@ -221,7 +221,7 @@ ecl_grid_type * create_ecl_grid( const struct UnstructuredGrid * g) {
coords[global_index][1] = j;
coords[global_index][2] = k;
coords[global_index][3] = 1;
}
}
}
@@ -255,6 +255,6 @@ int main(int /*argc*/ , char **argv)
//eclParser.saveEGRID_INIT("/tmp" , "OPM" );
grid.reset(new Opm::GridManager(eclParser));
props.reset(new Opm::IncompPropertiesFromDeck(eclParser , *grid->c_grid()));
}
+1 -1
View File
@@ -96,7 +96,7 @@ int main()
std::vector<double> AB(nrowAB*N, 0.);
BandMatrixCoeff bmc(N, ku, kl);
// Rewrite AA matrix in band format AB
// Rewrite AA matrix in band format AB
for (MAT_SIZE_T i = 0; i < N; ++i) {
for (MAT_SIZE_T j = -1; j < 2; ++j) {
if (i + j > -1 && i + j < N)
+5 -5
View File
@@ -61,7 +61,7 @@ int main(int argc, char** argv)
// Size of mappings found
std::cout << " faces_to_vertices " << vag_grid.faces_to_vertices.value.size() << endl;
std::cout << " volumes_to_faces " << vag_grid.volumes_to_vertices.value.size() << endl;
grid = allocate_grid(3,
vag_grid.number_of_volumes,
vag_grid.number_of_faces,
@@ -70,15 +70,15 @@ int main(int argc, char** argv)
vag_grid.number_of_vertices);
vagToUnstructuredGrid(vag_grid,*grid);
//}
// {
std::cout << "*************************************************************\n";
VAG vag_grid_new;
unstructuredGridToVag(*grid,vag_grid_new);
writeVagFormat(std::cout,vag_grid_new);
writeVagFormat(std::cout,vag_grid_new);
// }
destroy_grid(grid);
}
+9 -9
View File
@@ -1,13 +1,13 @@
//===========================================================================
//
// File: test_readpolymer.cpp
//
// Created: Thu Jan 12 15:18:46 2012
//
//
// File: test_readpolymer.cpp
//
// Created: Thu Jan 12 15:18:46 2012
//
// Author: Bjørn Spjelkavik <bsp@sintef.no>
//
//
// Revision: $Id$
//
//
//===========================================================================
#ifdef HAVE_CONFIG_H
@@ -42,13 +42,13 @@ int main(int argc, char** argv)
if (parser.hasField("PLYROCK")) {
parser.getPLYROCK().write(std::cout);
}
if (parser.hasField("PLYADS")) {
if (parser.hasField("PLYADS")) {
parser.getPLYADS().write(std::cout);
}
if (parser.hasField("TLMIXPAR")) {
parser.getTLMIXPAR().write(std::cout);
}
if (parser.hasField("PLYMAX")) {
if (parser.hasField("PLYMAX")) {
parser.getPLYMAX().write(std::cout);
}
if (parser.hasField("WPOLYMER")) {
+1 -1
View File
@@ -109,7 +109,7 @@ BOOST_AUTO_TEST_CASE(construction_and_queries)
row[j] = elem[s];
}
BOOST_CHECK(st2 == st2_allocate);
// One element too few.
BOOST_CHECK_THROW(const SparseTable<int> st3(elem, elem + num_elem - 1, rowsizes, rowsizes + num_rows), std::exception);