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
Dmitri Naumov
ogs
Commits
a50fe096
Commit
a50fe096
authored
10 years ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
[A] Replace local config read with ProjectData.
parent
2fbbbba4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Applications/CLI/ogs.cpp
+3
-72
3 additions, 72 deletions
Applications/CLI/ogs.cpp
with
3 additions
and
72 deletions
Applications/CLI/ogs.cpp
+
3
−
72
View file @
a50fe096
...
@@ -25,16 +25,6 @@
...
@@ -25,16 +25,6 @@
#include
"BaseLib/FileTools.h"
#include
"BaseLib/FileTools.h"
#include
"BaseLib/LogogSimpleFormatter.h"
#include
"BaseLib/LogogSimpleFormatter.h"
#include
"FileIO/readMeshFromFile.h"
#include
"FileIO/XmlIO/Boost/BoostXmlGmlInterface.h"
#include
"GeoLib/GEOObjects.h"
#include
"MeshLib/Mesh.h"
#include
"ProcessLib/ProcessVariable.h"
#include
"ProcessLib/Process.h"
#include
"Applications/ApplicationsLib/ProjectData.h"
#include
"Applications/ApplicationsLib/ProjectData.h"
...
@@ -81,68 +71,9 @@ int main(int argc, char *argv[])
...
@@ -81,68 +71,9 @@ int main(int argc, char *argv[])
project_config
=
project_config
.
get_child
(
"OpenGeoSysProject"
);
project_config
=
project_config
.
get_child
(
"OpenGeoSysProject"
);
// Mesh
ProjectData
project
(
project_config
,
MeshLib
::
Mesh
const
*
mesh
;
BaseLib
::
extractPath
(
project_arg
.
getValue
()));
{
std
::
string
const
mesh_file
=
BaseLib
::
copyPathToFileName
(
project_config
.
get
<
std
::
string
>
(
"mesh"
),
project_arg
.
getValue
());
mesh
=
FileIO
::
readMeshFromFile
(
mesh_file
);
}
// Geometry
GeoLib
::
GEOObjects
geometries
;
{
std
::
string
const
geometry_file
=
BaseLib
::
copyPathToFileName
(
project_config
.
get
<
std
::
string
>
(
"geometry"
),
project_arg
.
getValue
());
DBUG
(
"Reading geometry file
\'
%s
\'
."
,
geometry_file
.
c_str
());
FileIO
::
BoostXmlGmlInterface
gml_reader
(
geometries
);
gml_reader
.
readFile
(
geometry_file
);
}
// Process variables
std
::
vector
<
OGS
::
ProcessVariable
>
process_variables
;
{
DBUG
(
"Reading process variables:"
)
ConfigTree
const
&
process_variables_config
=
project_config
.
get_child
(
"process_variables"
);
for
(
auto
it
:
process_variables_config
)
{
ConfigTree
const
&
var_config
=
it
.
second
;
process_variables
.
emplace_back
(
var_config
,
*
mesh
,
geometries
);
}
}
// Processes
std
::
vector
<
ProcessLib
::
Process
*>
processes
;
{
ConfigTree
processes_config
;
processes_config
=
project_config
.
get_child
(
"processes"
);
//write_info(std::cout, processes_config);
DBUG
(
"Reading processes:
\n
"
);
for
(
auto
pc_it
:
processes_config
)
{
ConfigTree
const
&
process_config
=
pc_it
.
second
;
if
(
process_config
.
get
<
std
::
string
>
(
"type"
)
==
"GROUNDWATER_FLOW"
)
processes
.
push_back
(
new
ProcessLib
::
GroundwaterFlowProcess
(
*
mesh
,
process_variables
,
process_config
));
}
}
std
::
remove_if
(
processes
.
begin
(),
processes
.
end
(),
[](
ProcessLib
::
Process
*
p
)
{
delete
p
;
return
true
;
});
delete
mesh
;
delete
fmt
;
delete
fmt
;
delete
logog_cout
;
delete
logog_cout
;
...
...
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