Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chaofan Chen
ogs
Commits
f0b60312
Commit
f0b60312
authored
9 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[A/U] Removed unused and unusable tool generateBCFromPolyline.
parent
70795dc8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Applications/Utils/FileConverter/CMakeLists.txt
+1
-4
1 addition, 4 deletions
Applications/Utils/FileConverter/CMakeLists.txt
Applications/Utils/FileConverter/generateBCFromPolyline.cpp
+0
-109
0 additions, 109 deletions
Applications/Utils/FileConverter/generateBCFromPolyline.cpp
with
1 addition
and
113 deletions
Applications/Utils/FileConverter/CMakeLists.txt
+
1
−
4
View file @
f0b60312
...
...
@@ -18,9 +18,6 @@ if (QT4_FOUND)
add_executable
(
generateBCandGLI generateBCandGLI.cpp
)
target_link_libraries
(
generateBCandGLI FileIO
)
add_executable
(
generateBCFromPolyline generateBCFromPolyline.cpp
)
target_link_libraries
(
generateBCFromPolyline FileIO
)
set_target_properties
(
generateBCandGLI generateBCFromPolyline
PROPERTIES FOLDER Utilities
)
...
...
@@ -68,7 +65,7 @@ install(TARGETS generateMatPropsFromMatID GMSH2OGS OGS2VTK VTK2OGS VTK2TIN
RUNTIME DESTINATION bin COMPONENT ogs_converter
)
if
(
QT4_FOUND
)
install
(
TARGETS ConvertSHPToGLI generateBCandGLI
generateBCFromPolyline
generateBCandGLI
install
(
TARGETS ConvertSHPToGLI generateBCandGLI generateBCandGLI
FEFLOW2OGS RUNTIME DESTINATION bin COMPONENT ogs_converter
)
endif
()
...
...
This diff is collapsed.
Click to expand it.
Applications/Utils/FileConverter/generateBCFromPolyline.cpp
deleted
100644 → 0
+
0
−
109
View file @
70795dc8
/**
* \file
* \author Thomas Fischer
* \date 2011-03-08
* \brief Implementation of the generateBCFromPolyline tool.
*
* \copyright
* Copyright (c) 2012-2016, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#include
<fstream>
#include
<QString>
// GeoLib
#include
"GEOObjects.h"
#include
"PolylineVec.h"
// OGS
#include
"Applications/ApplicationsLib/ProjectData.h"
// FileIO
#include
"XmlIO/Qt/XmlGmlInterface.h"
int
main
(
int
argc
,
char
*
argv
[])
{
if
(
argc
==
1
)
{
std
::
cout
<<
"Usage: "
<<
argv
[
0
]
<<
" gml-file"
<<
std
::
endl
;
std
::
cout
<<
"
\t
gives you the name of all polylines in the file"
<<
std
::
endl
;
std
::
cout
<<
"Usage: "
<<
argv
[
0
]
<<
" gml-file polyline-to-convert"
<<
std
::
endl
;
std
::
cout
<<
"
\t
creates for the given polyline points boundary conditions"
<<
std
::
endl
;
return
-
1
;
}
GeoLib
::
GEOObjects
geo_objs
;
FileIO
::
XmlGmlInterface
xml
(
geo_objs
);
std
::
string
fname
(
argv
[
1
]);
xml
.
readFile
(
QString
::
fromStdString
(
fname
));
std
::
vector
<
std
::
string
>
geo_names
;
geo_objs
.
getGeometryNames
(
geo_names
);
if
(
geo_names
.
empty
())
{
std
::
cout
<<
"no geometries found"
<<
std
::
endl
;
return
-
1
;
}
const
GeoLib
::
PolylineVec
*
ply_vec
(
geo_objs
.
getPolylineVecObj
(
geo_names
[
0
]));
if
(
!
ply_vec
)
{
std
::
cout
<<
"could not found polylines"
<<
std
::
endl
;
return
-
1
;
}
const
std
::
size_t
n_ply
(
ply_vec
->
size
());
std
::
vector
<
std
::
size_t
>
ply_pnt_ids
;
for
(
std
::
size_t
k
(
0
);
k
<
n_ply
;
k
++
)
{
std
::
string
ply_name
;
if
(
ply_vec
->
getNameOfElementByID
(
k
,
ply_name
))
{
if
(
argc
==
2
)
std
::
cout
<<
"polyline "
<<
k
<<
": "
<<
ply_name
<<
std
::
endl
;
else
if
(
ply_name
.
find
(
argv
[
2
])
!=
std
::
string
::
npos
)
{
std
::
cout
<<
"found polyline "
<<
ply_name
<<
std
::
endl
;
GeoLib
::
Polyline
const
*
ply
(
ply_vec
->
getElementByName
(
ply_name
));
const
std
::
size_t
n_ply_pnts
(
ply
->
getNumberOfPoints
());
for
(
std
::
size_t
j
(
0
);
j
<
n_ply_pnts
;
j
++
)
ply_pnt_ids
.
push_back
(
ply
->
getPointID
(
j
));
}
}
}
if
(
argc
==
2
)
return
0
;
std
::
vector
<
GeoLib
::
Point
*>
const
*
geo_pnts
(
geo_objs
.
getPointVec
(
geo_names
[
0
]));
// write gli file and bc file
std
::
ofstream
gli_out
(
"TB.gli"
);
std
::
ofstream
bc_out
(
"TB.bc"
);
bc_out
<<
"// file generated by "
<<
argv
[
0
]
<<
"
\n
"
;
if
(
gli_out
&&
bc_out
)
{
gli_out
<<
"#POINTS"
<<
"
\n
"
;
for
(
std
::
size_t
k
(
0
);
k
<
ply_pnt_ids
.
size
();
k
++
)
{
gli_out
<<
k
<<
" "
<<
*
((
*
geo_pnts
)[
ply_pnt_ids
[
k
]])
<<
" $NAME PLYPNT"
<<
argv
[
2
]
<<
k
<<
"
\n
"
;
// boundary condition
bc_out
<<
"#BOUNDARY_CONDITION"
<<
"
\n
"
;
bc_out
<<
"
\t
$PCS_TYPE"
<<
"
\n
"
<<
"
\t\t
GROUNDWATER_FLOW"
<<
"
\n
"
;
bc_out
<<
"
\t
$PRIMARY_VARIABLE"
<<
"
\n
"
<<
"
\t\t
HEAD"
<<
"
\n
"
;
bc_out
<<
"
\t
$GEO_TYPE"
<<
"
\n
"
<<
"
\t\t
POINT PLYPNT"
<<
argv
[
2
]
<<
k
<<
"
\n
"
;
bc_out
<<
"
\t
$DIS_TYPE"
<<
"
\n
"
<<
"
\t\t
CONSTANT "
<<
(
*
((
*
geo_pnts
)[
ply_pnt_ids
[
k
]]))[
2
]
<<
"
\n
"
;
}
gli_out
<<
"#STOP"
<<
"
\n
"
;
bc_out
<<
"#STOP"
<<
"
\n
"
;
gli_out
.
close
();
bc_out
.
close
();
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment