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
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
Yuhao Liu
ogs
Commits
284dba1c
Commit
284dba1c
authored
4 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[PL/SurfaceFlux] Rm unused method save, cleanup class.
parent
31fc2847
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
Documentation/ProjectFile/prj/processes/process/calculatesurfaceflux/t_output_mesh.md
+0
-1
0 additions, 1 deletion
...j/processes/process/calculatesurfaceflux/t_output_mesh.md
ProcessLib/SurfaceFlux/SurfaceFluxData.h
+6
-30
6 additions, 30 deletions
ProcessLib/SurfaceFlux/SurfaceFluxData.h
with
6 additions
and
31 deletions
Documentation/ProjectFile/prj/processes/process/calculatesurfaceflux/t_output_mesh.md
deleted
100644 → 0
+
0
−
1
View file @
31fc2847
\o
gs_missing_documentation
This diff is collapsed.
Click to expand it.
ProcessLib/SurfaceFlux/SurfaceFluxData.h
+
6
−
30
View file @
284dba1c
...
@@ -16,8 +16,6 @@
...
@@ -16,8 +16,6 @@
#include
"BaseLib/FileTools.h"
#include
"BaseLib/FileTools.h"
#include
"BaseLib/Logging.h"
#include
"BaseLib/Logging.h"
#include
"MeshLib/IO/readMeshFromFile.h"
#include
"MeshLib/IO/readMeshFromFile.h"
// TODO used for output, if output classes are ready this has to be changed
#include
"MeshLib/IO/writeMeshToFile.h"
#include
"ProcessLib/SurfaceFlux/SurfaceFlux.h"
#include
"ProcessLib/SurfaceFlux/SurfaceFlux.h"
...
@@ -28,8 +26,7 @@ struct SurfaceFluxData
...
@@ -28,8 +26,7 @@ struct SurfaceFluxData
SurfaceFluxData
(
SurfaceFluxData
(
std
::
string
&&
surfaceflux_mesh_name
,
std
::
string
&&
surfaceflux_mesh_name
,
std
::
vector
<
std
::
unique_ptr
<
MeshLib
::
Mesh
>>
const
&
meshes
,
std
::
vector
<
std
::
unique_ptr
<
MeshLib
::
Mesh
>>
const
&
meshes
,
std
::
string
&&
surfaceflux_property_vector_name
,
std
::
string
&&
surfaceflux_property_vector_name
)
std
::
string
&&
surfaceflux_output_mesh_file_name
)
:
surface_mesh
(
*
BaseLib
::
findElementOrError
(
:
surface_mesh
(
*
BaseLib
::
findElementOrError
(
meshes
.
begin
(),
meshes
.
end
(),
meshes
.
begin
(),
meshes
.
end
(),
[
&
surfaceflux_mesh_name
](
auto
const
&
m
)
{
[
&
surfaceflux_mesh_name
](
auto
const
&
m
)
{
...
@@ -38,14 +35,12 @@ struct SurfaceFluxData
...
@@ -38,14 +35,12 @@ struct SurfaceFluxData
"Expected to find a mesh named "
+
surfaceflux_mesh_name
+
"Expected to find a mesh named "
+
surfaceflux_mesh_name
+
" for the surfaceflux calculation."
)),
" for the surfaceflux calculation."
)),
mesh_name
(
std
::
move
(
surfaceflux_mesh_name
)),
mesh_name
(
std
::
move
(
surfaceflux_mesh_name
)),
property_vector_name
(
std
::
move
(
surfaceflux_property_vector_name
)),
property_vector_name
(
std
::
move
(
surfaceflux_property_vector_name
))
output_mesh_file_name
(
std
::
move
(
surfaceflux_output_mesh_file_name
))
{
{
DBUG
(
DBUG
(
"read surfaceflux meta data:
\n\t
surfaceflux "
"Read surfaceflux meta data:
\n\t
mesh:'{:s}'
\n\t
property name: "
"mesh:'{:s}'
\n\t
property "
"'{:s}'
\n
"
,
"name: '{:s}'
\n\t
output to: '{:s}'"
,
mesh_name
,
property_vector_name
);
mesh_name
,
property_vector_name
,
output_mesh_file_name
);
}
}
static
std
::
unique_ptr
<
ProcessLib
::
SurfaceFluxData
>
createSurfaceFluxData
(
static
std
::
unique_ptr
<
ProcessLib
::
SurfaceFluxData
>
createSurfaceFluxData
(
...
@@ -60,20 +55,12 @@ struct SurfaceFluxData
...
@@ -60,20 +55,12 @@ struct SurfaceFluxData
//! \ogs_file_param{prj__processes__process__calculatesurfaceflux__property_name}
//! \ogs_file_param{prj__processes__process__calculatesurfaceflux__property_name}
calculatesurfaceflux_config
.
getConfigParameter
<
std
::
string
>
(
calculatesurfaceflux_config
.
getConfigParameter
<
std
::
string
>
(
"property_name"
);
"property_name"
);
auto
surfaceflux_out_fname
=
//! \ogs_file_param{prj__processes__process__calculatesurfaceflux__output_mesh}
calculatesurfaceflux_config
.
getConfigParameter
<
std
::
string
>
(
"output_mesh"
);
if
(
mesh_name
.
empty
())
if
(
mesh_name
.
empty
())
{
{
return
nullptr
;
return
nullptr
;
}
}
surfaceflux_out_fname
=
BaseLib
::
copyPathToFileName
(
surfaceflux_out_fname
,
output_directory
);
return
std
::
make_unique
<
SurfaceFluxData
>
(
return
std
::
make_unique
<
SurfaceFluxData
>
(
std
::
move
(
mesh_name
),
meshes
,
std
::
move
(
surfaceflux_pv_name
),
std
::
move
(
mesh_name
),
meshes
,
std
::
move
(
surfaceflux_pv_name
));
std
::
move
(
surfaceflux_out_fname
));
}
}
void
integrate
(
std
::
vector
<
GlobalVector
*>
const
&
x
,
double
const
t
,
void
integrate
(
std
::
vector
<
GlobalVector
*>
const
&
x
,
double
const
t
,
...
@@ -100,20 +87,9 @@ struct SurfaceFluxData
...
@@ -100,20 +87,9 @@ struct SurfaceFluxData
});
});
}
}
void
save
(
double
const
t
)
const
{
// TODO (TomFischer) output, if output classes are ready this has to be
// changed
std
::
string
const
fname
=
BaseLib
::
dropFileExtension
(
output_mesh_file_name
)
+
"_t_"
+
std
::
to_string
(
t
)
+
".vtu"
;
MeshLib
::
IO
::
writeMeshToFile
(
surface_mesh
,
fname
);
}
private
:
private
:
MeshLib
::
Mesh
&
surface_mesh
;
MeshLib
::
Mesh
&
surface_mesh
;
std
::
string
const
mesh_name
;
std
::
string
const
mesh_name
;
std
::
string
const
property_vector_name
;
std
::
string
const
property_vector_name
;
std
::
string
const
output_mesh_file_name
;
};
};
}
// namespace ProcessLib
}
// namespace ProcessLib
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