Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic
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
MostafaMollaali
dynamic
Commits
75fa95ff
Commit
75fa95ff
authored
6 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[PL] Early exit if calc. of balance isn't needed.
parent
0be9c2ba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ProcessLib/HT/HTProcess.cpp
+19
-19
19 additions, 19 deletions
ProcessLib/HT/HTProcess.cpp
with
19 additions
and
19 deletions
ProcessLib/HT/HTProcess.cpp
+
19
−
19
View file @
75fa95ff
...
...
@@ -271,27 +271,27 @@ void HTProcess::postTimestepConcreteProcess(GlobalVector const& x,
DBUG
(
"This is the thermal part of the staggered HTProcess."
);
return
;
}
if
(
_balance_mesh
)
// computing the balance is optional
if
(
!
_balance_mesh
)
// computing the balance is optional
{
auto
*
const
balance_pv
=
MeshLib
::
getOrCreateMeshProperty
<
double
>
(
*
_balance_mesh
,
_balance_pv_name
,
MeshLib
::
MeshItemType
::
Cell
,
1
);
// initialise the PropertyVector pv with zero values
std
::
fill
(
balance_pv
->
begin
(),
balance_pv
->
end
(),
0.0
);
auto
balance
=
ProcessLib
::
CalculateSurfaceFlux
(
*
_balance_mesh
,
getProcessVariables
(
process_id
)[
0
].
get
().
getNumberOfComponents
(),
_integration_order
);
balance
.
integrate
(
x
,
*
balance_pv
,
*
this
);
// post: surface_mesh has scalar element property
// TODO output, if output classes are ready this has to be
// changed
std
::
string
const
fname
=
BaseLib
::
dropFileExtension
(
_balance_out_fname
)
+
"_t_"
+
std
::
to_string
(
t
)
+
".vtu"
;
MeshLib
::
IO
::
writeMeshToFile
(
*
_balance_mesh
,
fname
);
return
;
}
auto
*
const
balance_pv
=
MeshLib
::
getOrCreateMeshProperty
<
double
>
(
*
_balance_mesh
,
_balance_pv_name
,
MeshLib
::
MeshItemType
::
Cell
,
1
);
// initialise the PropertyVector pv with zero values
std
::
fill
(
balance_pv
->
begin
(),
balance_pv
->
end
(),
0.0
);
auto
balance
=
ProcessLib
::
CalculateSurfaceFlux
(
*
_balance_mesh
,
getProcessVariables
(
process_id
)[
0
].
get
().
getNumberOfComponents
(),
_integration_order
);
balance
.
integrate
(
x
,
*
balance_pv
,
*
this
);
// post: surface_mesh has scalar element property
// TODO output, if output classes are ready this has to be
// changed
std
::
string
const
fname
=
BaseLib
::
dropFileExtension
(
_balance_out_fname
)
+
"_t_"
+
std
::
to_string
(
t
)
+
".vtu"
;
MeshLib
::
IO
::
writeMeshToFile
(
*
_balance_mesh
,
fname
);
}
}
// namespace HT
...
...
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