From f84fa2c4bd4dc90a04c330b14ab3961f0ca75691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Thu, 21 Mar 2013 15:01:17 +0100 Subject: [PATCH] Moved the VAG code to namespace Opm. --- opm/core/io/vag/vag.cpp | 16 ++++++++-------- opm/core/io/vag/vag.hpp | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/opm/core/io/vag/vag.cpp b/opm/core/io/vag/vag.cpp index 2b9fb77d..269b0c48 100644 --- a/opm/core/io/vag/vag.cpp +++ b/opm/core/io/vag/vag.cpp @@ -44,7 +44,7 @@ #include #include #include -namespace OPM +namespace Opm { void readPosStruct(std::istream& is,int n,PosStruct& pos_struct){ using namespace std; @@ -88,9 +88,9 @@ namespace OPM os << endl; } } - void readVagGrid(std::istream& is,OPM::VAG& vag_grid){ + void readVagGrid(std::istream& is,Opm::VAG& vag_grid){ using namespace std; - using namespace OPM; + using namespace Opm; while (!is.eof()) { string keyword; is >> keyword; @@ -192,9 +192,9 @@ namespace OPM } } } - void vagToUnstructuredGrid(OPM::VAG& vag_grid,UnstructuredGrid& grid){ + void vagToUnstructuredGrid(Opm::VAG& vag_grid,UnstructuredGrid& grid){ using namespace std; - using namespace OPM; + using namespace Opm; cout << "Converting grid" << endl; cout << "Warning:: orignial grid may not be edge confomal" << endl; cout << " inverse mappings from edges will be wrong" << endl; @@ -233,9 +233,9 @@ namespace OPM } - void unstructuredGridToVag(UnstructuredGrid& grid,OPM::VAG& vag_grid){ + void unstructuredGridToVag(UnstructuredGrid& grid,Opm::VAG& vag_grid){ using namespace std; - using namespace OPM; + using namespace Opm; cout << "Converting grid" << endl; // grid.dimensions=3; vag_grid.number_of_volumes=grid.number_of_cells; @@ -369,7 +369,7 @@ namespace OPM // material // can not be extracted from the grid } - void writeVagFormat(std::ostream& os,OPM::VAG& vag_grid){ + void writeVagFormat(std::ostream& os,Opm::VAG& vag_grid){ using namespace std; os << "File in the Vag grid format\n"; os << "Number of vertices " ; diff --git a/opm/core/io/vag/vag.hpp b/opm/core/io/vag/vag.hpp index 9bf319cf..412e4eaf 100644 --- a/opm/core/io/vag/vag.hpp +++ b/opm/core/io/vag/vag.hpp @@ -44,16 +44,16 @@ #include #include -namespace OPM +namespace Opm { /** - Struct to hold maping from the natural number less than pos.size()-1 to + Struct to hold mapping from the natural numbers less than pos.size()-1 to a set of integers. value(pos(i):pos(i+1)-1) hold the integers corresponding to i. pos(end)-1==value.size(); */ struct PosStruct{ std::vector pos; - std::vector value; + std::vector value; }; /** Structure to represent the unstructured vag grid format. The format is only for @@ -92,14 +92,14 @@ namespace OPM \param[in] is is is stream of the file. \param[out] vag_grid is a reference to a vag_grid struct. */ - void readVagGrid(std::istream& is,OPM::VAG& vag_grid); + void readVagGrid(std::istream& is,Opm::VAG& vag_grid); /** Function to write vag format. \param[out] is is is stream of the file. \param[in] vag_grid is a reference to a vag_grid struct. */ - void writeVagFormat(std::ostream& os,OPM::VAG& vag_grid); + void writeVagFormat(std::ostream& os,Opm::VAG& vag_grid); /** Function to read a vector of some type from a stream. \param[in] os is is stream of the file. @@ -152,14 +152,14 @@ namespace OPM \param[out] vag_grid s is a valid vag_grid struct. \param[in] grid is a grid with have allocated correct size to each pointer. */ - void vagToUnstructuredGrid(OPM::VAG& vag_grid,UnstructuredGrid& grid); + void vagToUnstructuredGrid(Opm::VAG& vag_grid,UnstructuredGrid& grid); /** Fill a vag_grid from UnstructuredGrid \param[out] vag_grid s is a valid vag_grid struct. \param[in] grid is a grid with have allocated correct size to each pointer. */ - void unstructuredGridToVag(UnstructuredGrid& grid, OPM::VAG& vag_grid); + void unstructuredGridToVag(UnstructuredGrid& grid, Opm::VAG& vag_grid); } #endif /* OPM_VAG_HPP_HEADER */