mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-26 15:40:09 -05:00
art2dgf: put vertex parsing in separate method
This commit is contained in:
1 parent
74a9004dcf
commit
ff2a495ae6
1 file changed
+15
-7
+15
-7
@@ -103,13 +103,7 @@ private:
|
||||
continue;
|
||||
|
||||
if (curParseMode == ParseMode::Vertex) {
|
||||
GlobalPosition coord;
|
||||
std::istringstream iss(curLine);
|
||||
// parse only the first two numbers as the vertex
|
||||
// coordinate. the last number is the Z coordinate
|
||||
// which we ignore (so far)
|
||||
iss >> coord[0] >> coord[1];
|
||||
vertexPos.push_back( std::make_pair( coord, 0 ) );
|
||||
vertexPos.emplace_back(parseVertex(curLine), 0);
|
||||
}
|
||||
else if (curParseMode == ParseMode::Edge) {
|
||||
// read an edge and update the fracture mapper
|
||||
@@ -217,6 +211,20 @@ private:
|
||||
write(dgfFile, precision);
|
||||
}
|
||||
|
||||
//! \brief Parses a vertex from a string.
|
||||
//! \param curLine String to parse
|
||||
static GlobalPosition parseVertex(const std::string& curLine)
|
||||
{
|
||||
GlobalPosition coord;
|
||||
std::istringstream iss(curLine);
|
||||
// parse only the first two numbers as the vertex
|
||||
// coordinate. the last number is the Z coordinate
|
||||
// which we ignore (so far)
|
||||
iss >> coord[0] >> coord[1];
|
||||
|
||||
return coord;
|
||||
}
|
||||
|
||||
//! \brief Writes out the data to the output stream.
|
||||
//! \param dgfFile Stream to write to
|
||||
//! \param precision Precision to write at
|
||||
|
||||
Reference in new issue
Block a user