def _write_parallel_header(self, vtuf):
    (names, types, comps) = self._get_array_attrs()
    write_s = (lambda s: vtuf.write(s.encode('utf-8')))
    write_s('<PPoints>\n')
    for (i, (n, t, s)) in enumerate(zip(names, types, comps)):
        write_s('<PDataArray Name="{0}" type="{1}" NumberOfComponents="{2}"/>\n'.format(n, t, s))
        if (i == 0):
            write_s('</PPoints>\n<PCells>\n')
        elif (i == 3):
            write_s('</PCells>\n<PPointData>\n')
    write_s('</PPointData>\n')
def _write_parallel_header(self, vtuf):
    (names, types, comps) = self._get_array_attrs()
    write_s = (lambda s: vtuf.write(s.encode('utf-8')))
    write_s('<PPoints>\n')
    for (i, (n, t, s)) in enumerate(zip(names, types, comps)):
        write_s('<PDataArray Name="{0}" type="{1}" NumberOfComponents="{2}"/>\n'.format(n, t, s))
        if (i == 0):
            write_s('</PPoints>\n<PCells>\n')
        elif (i == 3):
            write_s('</PCells>\n<PPointData>\n')
    write_s('</PPointData>\n')