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
631266d3
Commit
631266d3
authored
10 years ago
by
Tom Fischer
Committed by
Dmitri Naumov
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[ProjectData] read processes.
parent
6be986b3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
OGS/ProjectData.cpp
+22
-1
22 additions, 1 deletion
OGS/ProjectData.cpp
OGS/ProjectData.h
+3
-0
3 additions, 0 deletions
OGS/ProjectData.h
with
25 additions
and
1 deletion
OGS/ProjectData.cpp
+
22
−
1
View file @
631266d3
...
@@ -28,12 +28,12 @@
...
@@ -28,12 +28,12 @@
namespace
detail
namespace
detail
{
{
void
readGeometry
(
std
::
string
const
&
fname
,
GeoLib
::
GEOObjects
&
geo_objects
)
void
readGeometry
(
std
::
string
const
&
fname
,
GeoLib
::
GEOObjects
&
geo_objects
)
{
{
DBUG
(
"Reading geometry file
\'
%s
\'
."
,
fname
.
c_str
());
DBUG
(
"Reading geometry file
\'
%s
\'
."
,
fname
.
c_str
());
FileIO
::
BoostXmlGmlInterface
gml_reader
(
geo_objects
);
FileIO
::
BoostXmlGmlInterface
gml_reader
(
geo_objects
);
gml_reader
.
readFile
(
fname
);
gml_reader
.
readFile
(
fname
);
}
}
}
}
ProjectData
::
ProjectData
()
ProjectData
::
ProjectData
()
...
@@ -69,6 +69,9 @@ ProjectData::ProjectData(ConfigTree const& project_config,
...
@@ -69,6 +69,9 @@ ProjectData::ProjectData(ConfigTree const& project_config,
// read process variables
// read process variables
readProcessVariables
(
project_config
.
get_child
(
"process_variables"
));
readProcessVariables
(
project_config
.
get_child
(
"process_variables"
));
// read processes
readProcesses
(
project_config
.
get_child
(
"processes"
));
}
}
ProjectData
::~
ProjectData
()
ProjectData
::~
ProjectData
()
...
@@ -187,3 +190,21 @@ void ProjectData::readProcessVariables(
...
@@ -187,3 +190,21 @@ void ProjectData::readProcessVariables(
_process_variables
.
emplace_back
(
var_config
,
*
_mesh_vec
[
0
],
*
_geoObjects
);
_process_variables
.
emplace_back
(
var_config
,
*
_mesh_vec
[
0
],
*
_geoObjects
);
}
}
}
}
void
ProjectData
::
readProcesses
(
ConfigTree
const
&
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"
)
{
// The existence check of the in the configuration referenced
// process variables is checked in the physical process.
// TODO at the moment we have only one mesh, later there can be
// several meshes. Then we have to assign the referenced mesh
// here.
_processes
.
push_back
(
new
ProcessLib
::
GroundwaterFlowProcess
(
*
_mesh_vec
[
0
],
_process_variables
,
process_config
)
);
}
}
}
This diff is collapsed.
Click to expand it.
OGS/ProjectData.h
+
3
−
0
View file @
631266d3
...
@@ -82,6 +82,9 @@ private:
...
@@ -82,6 +82,9 @@ private:
/// read the process variables from configuration
/// read the process variables from configuration
void
readProcessVariables
(
ConfigTree
const
&
process_variables_config
);
void
readProcessVariables
(
ConfigTree
const
&
process_variables_config
);
// read the processes from configuration
void
readProcesses
(
ConfigTree
const
&
process_config
);
private
:
private
:
#ifdef OGS_BUILD_GUI
#ifdef OGS_BUILD_GUI
GEOModels
*
_geoObjects
;
GEOModels
*
_geoObjects
;
...
...
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