Moved the VAG code to namespace Opm.
This commit is contained in:
parent
e770b1a6b4
commit
f84fa2c4bd
@ -44,7 +44,7 @@
|
|||||||
#include <set>
|
#include <set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
namespace OPM
|
namespace Opm
|
||||||
{
|
{
|
||||||
void readPosStruct(std::istream& is,int n,PosStruct& pos_struct){
|
void readPosStruct(std::istream& is,int n,PosStruct& pos_struct){
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -88,9 +88,9 @@ namespace OPM
|
|||||||
os << endl;
|
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 std;
|
||||||
using namespace OPM;
|
using namespace Opm;
|
||||||
while (!is.eof()) {
|
while (!is.eof()) {
|
||||||
string keyword;
|
string keyword;
|
||||||
is >> 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 std;
|
||||||
using namespace OPM;
|
using namespace Opm;
|
||||||
cout << "Converting grid" << endl;
|
cout << "Converting grid" << endl;
|
||||||
cout << "Warning:: orignial grid may not be edge confomal" << endl;
|
cout << "Warning:: orignial grid may not be edge confomal" << endl;
|
||||||
cout << " inverse mappings from edges will be wrong" << 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 std;
|
||||||
using namespace OPM;
|
using namespace Opm;
|
||||||
cout << "Converting grid" << endl;
|
cout << "Converting grid" << endl;
|
||||||
// grid.dimensions=3;
|
// grid.dimensions=3;
|
||||||
vag_grid.number_of_volumes=grid.number_of_cells;
|
vag_grid.number_of_volumes=grid.number_of_cells;
|
||||||
@ -369,7 +369,7 @@ namespace OPM
|
|||||||
// material // can not be extracted from the grid
|
// 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;
|
using namespace std;
|
||||||
os << "File in the Vag grid format\n";
|
os << "File in the Vag grid format\n";
|
||||||
os << "Number of vertices " ;
|
os << "Number of vertices " ;
|
||||||
|
@ -44,10 +44,10 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
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.
|
a set of integers. value(pos(i):pos(i+1)-1) hold the integers corresponding to i.
|
||||||
pos(end)-1==value.size();
|
pos(end)-1==value.size();
|
||||||
*/
|
*/
|
||||||
@ -92,14 +92,14 @@ namespace OPM
|
|||||||
\param[in] is is is stream of the file.
|
\param[in] is is is stream of the file.
|
||||||
\param[out] vag_grid is a reference to a vag_grid struct.
|
\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.
|
Function to write vag format.
|
||||||
\param[out] is is is stream of the file.
|
\param[out] is is is stream of the file.
|
||||||
\param[in] vag_grid is a reference to a vag_grid struct.
|
\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.
|
Function to read a vector of some type from a stream.
|
||||||
\param[in] os is is stream of the file.
|
\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[out] vag_grid s is a valid vag_grid struct.
|
||||||
\param[in] grid is a grid with have allocated correct size to each pointer.
|
\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
|
Fill a vag_grid from UnstructuredGrid
|
||||||
\param[out] vag_grid s is a valid vag_grid struct.
|
\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.
|
\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 */
|
#endif /* OPM_VAG_HPP_HEADER */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user