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
3bf340bf
Commit
3bf340bf
authored
9 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[A/U] Removed unused and unusable tool generateBCandGLI.
parent
f0b60312
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
-7
1 addition, 7 deletions
Applications/Utils/FileConverter/CMakeLists.txt
Applications/Utils/FileConverter/generateBCandGLI.cpp
+0
-123
0 additions, 123 deletions
Applications/Utils/FileConverter/generateBCandGLI.cpp
with
1 addition
and
130 deletions
Applications/Utils/FileConverter/CMakeLists.txt
+
1
−
7
View file @
3bf340bf
...
@@ -15,12 +15,6 @@ if (QT4_FOUND)
...
@@ -15,12 +15,6 @@ if (QT4_FOUND)
target_link_libraries
(
ConvertSHPToGLI FileIO
)
target_link_libraries
(
ConvertSHPToGLI FileIO
)
add_executable
(
generateBCandGLI generateBCandGLI.cpp
)
target_link_libraries
(
generateBCandGLI FileIO
)
set_target_properties
(
generateBCandGLI generateBCFromPolyline
PROPERTIES FOLDER Utilities
)
add_executable
(
FEFLOW2OGS FEFLOW2OGS.cpp
)
add_executable
(
FEFLOW2OGS FEFLOW2OGS.cpp
)
set_target_properties
(
FEFLOW2OGS PROPERTIES FOLDER Utilities
)
set_target_properties
(
FEFLOW2OGS PROPERTIES FOLDER Utilities
)
target_link_libraries
(
FEFLOW2OGS FileIO
)
target_link_libraries
(
FEFLOW2OGS FileIO
)
...
@@ -65,7 +59,7 @@ install(TARGETS generateMatPropsFromMatID GMSH2OGS OGS2VTK VTK2OGS VTK2TIN
...
@@ -65,7 +59,7 @@ install(TARGETS generateMatPropsFromMatID GMSH2OGS OGS2VTK VTK2OGS VTK2TIN
RUNTIME DESTINATION bin COMPONENT ogs_converter
)
RUNTIME DESTINATION bin COMPONENT ogs_converter
)
if
(
QT4_FOUND
)
if
(
QT4_FOUND
)
install
(
TARGETS ConvertSHPToGLI
generateBCandGLI generateBCandGLI
install
(
TARGETS ConvertSHPToGLI
FEFLOW2OGS RUNTIME DESTINATION bin COMPONENT ogs_converter
)
FEFLOW2OGS RUNTIME DESTINATION bin COMPONENT ogs_converter
)
endif
()
endif
()
...
...
This diff is collapsed.
Click to expand it.
Applications/Utils/FileConverter/generateBCandGLI.cpp
deleted
100644 → 0
+
0
−
123
View file @
f0b60312
/**
* \file
* \author Thomas Fischer
* \date 2011-03-01
* \brief Implementation of the generateBCandGLI 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
*
*/
// STL
#include
<algorithm>
#include
<fstream>
// Qt
#include
<QString>
// GeoLib
#include
"GEOObjects.h"
#include
"SurfaceVec.h"
#include
"GeoLib/Triangle.h"
#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
;
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
::
SurfaceVec
*
sfc_vec
(
geo_objs
.
getSurfaceVecObj
(
geo_names
[
0
]));
if
(
!
sfc_vec
)
{
std
::
cout
<<
"could not found surfaces"
<<
std
::
endl
;
return
-
1
;
}
const
std
::
size_t
n_sfc
(
sfc_vec
->
size
());
std
::
vector
<
std
::
size_t
>
sfc_pnt_ids
;
for
(
std
::
size_t
k
(
0
);
k
<
n_sfc
;
k
++
)
{
std
::
string
sfc_name
;
if
(
sfc_vec
->
getNameOfElementByID
(
k
,
sfc_name
))
if
(
sfc_name
.
find
(
"Terrain"
)
!=
std
::
string
::
npos
)
{
std
::
cout
<<
k
<<
": "
<<
sfc_name
<<
std
::
endl
;
GeoLib
::
Surface
const
*
sfc
(
sfc_vec
->
getElementByName
(
sfc_name
));
const
std
::
size_t
n_triangles
(
sfc
->
getNTriangles
());
for
(
std
::
size_t
j
(
0
);
j
<
n_triangles
;
j
++
)
{
GeoLib
::
Triangle
const
*
tri
((
*
sfc
)[
j
]);
for
(
std
::
size_t
i
(
0
);
i
<
3
;
i
++
)
sfc_pnt_ids
.
push_back
((
*
tri
)[
i
]);
}
}
}
// make entries unique
std
::
cout
<<
"make points unique ... "
<<
std
::
flush
;
std
::
sort
(
sfc_pnt_ids
.
begin
(),
sfc_pnt_ids
.
end
());
std
::
vector
<
std
::
size_t
>::
iterator
it
(
sfc_pnt_ids
.
begin
());
while
(
it
!=
sfc_pnt_ids
.
end
())
{
std
::
vector
<
std
::
size_t
>::
iterator
next
(
it
);
++
next
;
if
(
next
!=
sfc_pnt_ids
.
end
())
{
if
(
*
it
==
*
next
)
it
=
sfc_pnt_ids
.
erase
(
it
);
else
++
it
;
}
else
++
it
;
}
std
::
cout
<<
"done"
<<
std
::
endl
;
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
<
sfc_pnt_ids
.
size
();
k
++
)
{
gli_out
<<
k
<<
" "
<<
*
((
*
geo_pnts
)[
sfc_pnt_ids
[
k
]])
<<
" $NAME "
<<
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 "
<<
k
<<
"
\n
"
;
bc_out
<<
"
\t
$DIS_TYPE"
<<
"
\n
"
<<
"
\t\t
CONSTANT "
<<
(
*
((
*
geo_pnts
)[
sfc_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