Skip to content

Commit

Permalink
#2711 Test for DynFunctionSpaces generates correct undf_name
Browse files Browse the repository at this point in the history
  • Loading branch information
oakleybrunt committed Oct 9, 2024
1 parent 16361d6 commit 67e8fa3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/psyclone/tests/domain/lfric/dofkern_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,18 @@ def test_compiles(tmpdir):
api=TEST_API)
psy = PSyFactory(TEST_API, distributed_memory=False).create(invoke_info)
assert LFRicBuild(tmpdir).code_compiles(psy)


def test_function_space_bar_undf():
'''
Test that the correct undf name ("undf") is stored in an LFRicInvoke when
a kernel is found to operate on 'dof'
'''
_, invoke_info = parse(os.path.join(BASE_PATH,
"1.14_single_invoke_dofs.f90"),
api=TEST_API)
psy = PSyFactory(TEST_API, distributed_memory=False).create(invoke_info)
invoke = psy.invokes.invoke_list[0]

assert "undf" in invoke.function_spaces._var_list

0 comments on commit 67e8fa3

Please sign in to comment.