def node_set_to_surface(self, tag):
<EOL>nodes = self.nodes.copy()<EOL>dummy = nodes.iloc[<NUM_LIT:0>].copy()<EOL>dummy["<STR_LIT>"] *= np.nan<EOL>dummy["<STR_LIT>"] = True<EOL>nodes.loc[<NUM_LIT:0>] = dummy<EOL>element_surfaces= self.split("<STR_LIT>").unstack()<EOL>surf = pd.DataFrame(<EOL>nodes.sets[tag].loc[element_surfaces.values.flatten()]<EOL>.values.reshape(element_surfaces.shape)<EOL>.prod(axis = <NUM_LIT:1>)<EOL>.astype(np.bool),<EOL>index = element_surfaces.index).unstack().fillna(False)<EOL>for k in surf.keys():<EOL><INDENT>self.elements["<STR_LIT>", tag, "<STR_LIT>".format(k[<NUM_LIT:1>]+<NUM_LIT:1>) ] = surf.loc[:, k]<EOL><DEDENT>
Converts a node set to surface.