Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
NekUpload
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
Nektar
NekUpload
Commits
367f3769
Project 'shl21/NekUpload' was moved to 'nektar/NekUpload'. Please update any links and bookmarks that may still have the old path.
Commit
367f3769
authored
1 month ago
by
Stephen Liu
Browse files
Options
Downloads
Patches
Plain Diff
Assert warning and skip output check if refinements are present
parent
f5bb8515
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#10189
passed
1 month ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
NekUpload/validate/session.py
+7
-5
7 additions, 5 deletions
NekUpload/validate/session.py
with
7 additions
and
5 deletions
NekUpload/validate/session.py
+
7
−
5
View file @
367f3769
...
...
@@ -399,7 +399,8 @@ class ValidateSession:
f
.
get_expansions
(
geometry_file
)
return
True
#TODO Refactor, quite ugly atm
def
check_consistent_output_shape
(
self
,
geometry_file
:
str
,
output_file
:
str
,
solver
:
SolverType
)
->
bool
:
with
NekSessionFile
(
self
.
file_path
)
as
f
:
composite_id_to_expansion
:
dict
[
int
,
list
[
ExpansionDefinition
]]
=
f
.
get_expansions
(
geometry_file
)
...
...
@@ -408,7 +409,6 @@ class ValidateSession:
is_movement_exist
:
bool
=
f
.
is_movement
()
homogeneous_property
:
str
=
f
.
get_homogeneous_property
()
hom_y_modes
,
hom_z_modes
=
f
.
get_homogeneous_modes
()
print
(
homogeneous_property
)
homogeneous_coeffs_multiplier
:
int
=
1
#different flavours of the same thing, as specified in nektar/FieldUtils/Fields
if
(
homogeneous_property
==
"
1D
"
or
homogeneous_property
==
"
HOMOGENEOUS1D
"
...
...
@@ -419,8 +419,11 @@ class ValidateSession:
or
homogeneous_property
==
"
Homogeneous2D
"
or
homogeneous_property
==
"
Homo2D
"
):
homogeneous_coeffs_multiplier
*=
(
hom_z_modes
*
hom_y_modes
)
dim
=
3
#recast as quasi-3D
print
(
homogeneous_coeffs_multiplier
)
if
f
.
get_refinements
():
warn_with_logging
((
f
"
You have refinements in this file. Skipping output shape check as this
"
"
has not yet been implemented.
"
))
return
True
with
NekGeometryFile
(
geometry_file
)
as
f
:
composite_list
:
dict
[
int
,
CompositeDefinition
]
=
f
.
get_composite_info
()
...
...
@@ -446,7 +449,6 @@ class ValidateSession:
if
is_movement_exist
:
num_fields
+=
len
([
"
gridVx
"
,
"
gridVy
"
,
"
gridVz
"
])
num_unkown_coefficients
+=
max_num_coeffs
*
composite
.
count
*
num_fields
*
homogeneous_coeffs_multiplier
print
(
max_num_coeffs
,
composite
.
count
,
num_fields
,
num_unkown_coefficients
,
homogeneous_coeffs_multiplier
)
with
NekOutputFile
(
output_file
)
as
f
:
total_coeffs
:
int
=
f
.
get_total_coefficients
()
#this should be 1D
...
...
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