Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
blaster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
Aerospace and Mechanical Engineering
blaster
Commits
2f90efb0
Commit
2f90efb0
authored
2 months ago
by
Paul Dechamps
Browse files
Options
Downloads
Patches
Plain Diff
(fix) Small fix in blSolverInterface error raise
parent
e060eddc
No related branches found
No related tags found
No related merge requests found
Pipeline
#52502
failed
2 months ago
Stage: build
Stage: test
Stage: validation
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
blast/interfaces/blSolversInterface.py
+8
-2
8 additions, 2 deletions
blast/interfaces/blSolversInterface.py
with
8 additions
and
2 deletions
blast/interfaces/blSolversInterface.py
+
8
−
2
View file @
2f90efb0
...
@@ -798,7 +798,7 @@ class SolversInterface:
...
@@ -798,7 +798,7 @@ class SolversInterface:
else
:
else
:
raise
RuntimeError
(
'
Expected
"
sections
"
in cfg
'
)
raise
RuntimeError
(
'
Expected
"
sections
"
in cfg
'
)
if
len
(
cfg
[
'
sections
'
])
!=
self
.
getnBodies
():
if
len
(
cfg
[
'
sections
'
])
!=
self
.
getnBodies
():
raise
RuntimeError
(
f
'
Expected the length of
"
sections
"
to be
{
self
.
getnBodies
()
}
, got
{
len
(
self
.
cfg
[
"
sections
"
])
}
'
)
raise
RuntimeError
(
f
'
Expected the length of
"
sections
"
to be
{
self
.
getnBodies
()
}
, got
{
len
(
cfg
[
"
sections
"
])
}
'
)
return
cfg
return
cfg
def
_initDataStructures
(
self
)
->
tuple
[
list
,
list
]:
def
_initDataStructures
(
self
)
->
tuple
[
list
,
list
]:
...
@@ -907,6 +907,7 @@ class SolversInterface:
...
@@ -907,6 +907,7 @@ class SolversInterface:
allregs
.
append
(
vreg
.
type
)
allregs
.
append
(
vreg
.
type
)
# Compute average and max AR of viscous cells
# Compute average and max AR of viscous cells
avgAR
=
0
avgAR
=
0
nNodes
=
0
if
self
.
getnDim
()
==
3
:
if
self
.
getnDim
()
==
3
:
point_cpt
=
0
point_cpt
=
0
for
isec
in
range
(
1
,
len
(
self
.
vBnd
[
ibody
])):
for
isec
in
range
(
1
,
len
(
self
.
vBnd
[
ibody
])):
...
@@ -920,8 +921,13 @@ class SolversInterface:
...
@@ -920,8 +921,13 @@ class SolversInterface:
# AR = b^2 / S
# AR = b^2 / S
avgAR
+=
dy
**
2
/
(
dx
*
dy
)
avgAR
+=
dy
**
2
/
(
dx
*
dy
)
point_cpt
+=
1
point_cpt
+=
1
nNodes
+=
1
avgAR
/=
point_cpt
avgAR
/=
point_cpt
print
(
f
'
-
{
ibody
}
:
{
bodyName
}
,
{
len
(
self
.
vBnd
[
ibody
])
}
section(s) with sides
{
allregs
}
, avg AR
{
avgAR
:
.
2
f
}
'
)
elif
self
.
getnDim
()
==
2
:
for
isec
in
range
(
len
(
self
.
vBnd
[
ibody
])):
for
ipoint
in
range
(
1
,
self
.
vBnd
[
ibody
][
isec
][
0
].
nodesCoord
.
shape
[
0
]):
nNodes
+=
1
print
(
f
'
-
{
bodyName
}
:
{
len
(
self
.
vBnd
[
ibody
])
}
section(s) with sides
{
allregs
}
,
\n\t
{
nNodes
}
surface nodes, avg AR
{
avgAR
:
.
2
f
}
'
)
print
(
''
)
print
(
''
)
# Abstract methods for the interface
# Abstract methods for the interface
...
...
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