Skip to content

1 bug fix in kernels.py - #4

Open
amna-ukaea wants to merge 3 commits into
aurora-multiphysics:mainfrom
fusion-engineering-simulation:1-bug-fixes
Open

1 bug fix in kernels.py#4
amna-ukaea wants to merge 3 commits into
aurora-multiphysics:mainfrom
fusion-engineering-simulation:1-bug-fixes

Conversation

@amna-ukaea

@amna-ukaea amna-ukaea commented May 17, 2023

Copy link
Copy Markdown

1) in ParsedAux in kernels.py there are many lines in the format string += f'variable={self.variable.name}\n', but one is written wrongly
before:
string += f'{self.function.str()}'

now:
string += f'function={self.function.str()}'
added "function=" so "function" is written to the file.

Also the same string written to file needs to be on separate lines, but one new line was missing
added new line in kernels.py because a new line was supposed to be there but wasn't_

before:
string += f'function={self.function.str()}

now:
string += f'function={self.function.str()}\n

  1. in mesh.py the variable mesh is defined within the if statements inside the add_mesh_object method, but if none of the conditions are met, the variable remains undefined. Therefore, when you try to assign mesh to self.mesh_objects[name], it raises an UnboundLocalError.

before:
self.mesh_objects[name] = mesh

now:
mesh = None
if mesh is not None:
self.mesh_objects[name] = mesh

…mesh_object method, but if none of the conditions are met, the variable remains undefined. Therefore, when you try to assign mesh to self.mesh_objects[name], it raises an UnboundLocalError.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant