Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
py4CFD
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SCE Free Libre Open Source Software
py4CFD
Commits
089c3e30
Commit
089c3e30
authored
2 months ago
by
Reza Housseini
Browse files
Options
Downloads
Patches
Plain Diff
refactor: add more logging info
parent
fdef7078
No related branches found
No related tags found
No related merge requests found
Pipeline
#400524
passed
2 months ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
py4cfd/adapters/openfoam/cli/commands.py
+7
-3
7 additions, 3 deletions
py4cfd/adapters/openfoam/cli/commands.py
with
7 additions
and
3 deletions
py4cfd/adapters/openfoam/cli/commands.py
+
7
−
3
View file @
089c3e30
...
...
@@ -231,15 +231,19 @@ def run(case_path: Path):
start_time
=
dictionary_read
(
case_path
,
"
system/controlDict
"
,
"
startTime
"
)
end_time
=
dictionary_read
(
case_path
,
"
system/controlDict
"
,
"
endTime
"
)
duration
=
float
(
end_time
)
-
float
(
start_time
)
logger
.
info
(
f
"
Running simulation for
{
duration
}
seconds
"
)
logger
.
info
(
f
"
Simulation duration set to
{
duration
}
seconds
"
)
if
num_cpus
==
1
:
logger
.
info
(
"
Running on 1 core
"
)
logger
.
info
(
"
Number of cores set to 1
"
)
logger
.
info
(
"
Run single simulation ...
"
)
run_single
(
case_path
,
duration
)
else
:
logger
.
info
(
f
"
Running in parallel on
{
num_cpus
}
cores
"
)
logger
.
info
(
f
"
Number of cores set to
{
num_cpus
}
"
)
logger
.
info
(
"
Run parallel simulation ...
"
)
run_parallel
(
case_path
,
duration
,
num_cpus
)
logger
.
info
(
"
Simulation finished
"
)
def
clean
(
case_path
:
Path
):
"""
Clean case.
"""
...
...
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