Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pyTurbulence
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
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
Bilocq Amaury
pyTurbulence
Commits
6f8bf46a
Commit
6f8bf46a
authored
1 month ago
by
Amaury Bilocq
Browse files
Options
Downloads
Patches
Plain Diff
add private function in solver
parent
72e869bb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#52491
passed
1 month ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyTurbulence/solver.py
+6
-6
6 additions, 6 deletions
pyTurbulence/solver.py
with
6 additions
and
6 deletions
pyTurbulence/solver.py
+
6
−
6
View file @
6f8bf46a
...
...
@@ -22,7 +22,7 @@ def solve(user_params)->dict:
"""
# Validate the input parameters
params
=
validate_params
(
user_params
)
params
=
_
validate_params
(
user_params
)
# Read the params dictionary
nbModes
=
params
[
"
nbModes
"
]
...
...
@@ -99,7 +99,7 @@ def solve(user_params)->dict:
}
# Write the log file
write_log_file
(
params
,
results
)
_
write_log_file
(
params
,
results
)
# Dictionary containing the results of the simulation
data
=
{
...
...
@@ -116,7 +116,7 @@ def solve(user_params)->dict:
return
data
def
validate_params
(
params
)
->
dict
:
def
_
validate_params
(
params
)
->
dict
:
"""
Validate the input parameters dictionary, set default values where needed, enforce allowed values, and check numeric ranges.
...
...
@@ -229,7 +229,7 @@ def validate_params(params) -> dict:
return
validated_params
def
get_metadata
()
->
dict
:
def
_
get_metadata
()
->
dict
:
metadata
=
{
"
code_name
"
:
"
~~~ pyTurbulence: Synthetic Turbulence Generator ~~~
"
,
"
author
"
:
"
Amaury Bilocq
"
,
...
...
@@ -237,7 +237,7 @@ def get_metadata()->dict:
}
return
metadata
def
write_log_file
(
params
,
results
):
def
_
write_log_file
(
params
,
results
):
"""
Write the log file with metadata, parameters, and results.
...
...
@@ -251,7 +251,7 @@ def write_log_file(params, results):
Dictionary containing the results of the simulation.
"""
log_file
=
os
.
path
.
join
(
params
[
"
output_dir
"
],
"
log.txt
"
)
metadata
=
get_metadata
()
metadata
=
_
get_metadata
()
with
open
(
log_file
,
"
w
"
)
as
f
:
# Display metadata
...
...
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