1# -*- coding: utf-8 -*-
2<%inherit file='base'/>
3<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>
4
5<%pyfr:kernel name='intconu' ndim='1'
6              ulin='in view fpdtype_t[${str(nvars)}]'
7              urin='in view fpdtype_t[${str(nvars)}]'
8              ulout='out view fpdtype_t[${str(nvars)}]'
9              urout='out view fpdtype_t[${str(nvars)}]'>
10% for i in range(nvars):
11% if c['ldg-beta'] == -0.5:
12    urout[${i}] = ulin[${i}];
13% elif c['ldg-beta'] == 0.5:
14    ulout[${i}] = urin[${i}];
15% else:
16    ulout[${i}] = urout[${i}] = urin[${i}]*${0.5 + c['ldg-beta']}
17                              + ulin[${i}]*${0.5 - c['ldg-beta']};
18% endif
19% endfor
20</%pyfr:kernel>
21