def _conglomerate_meshes(meshin, header):
meshout = {}<EOL>npc = header['<STR_LIT>'] // header['<STR_LIT>']<EOL>shp = [val + <NUM_LIT:1> if val != <NUM_LIT:1> else <NUM_LIT:1> for val in header['<STR_LIT>']]<EOL>x_p = int(shp[<NUM_LIT:0>] != <NUM_LIT:1>)<EOL>y_p = int(shp[<NUM_LIT:1>] != <NUM_LIT:1>)<EOL>for coord in meshin[<NUM_LIT:0>]:<EOL><INDENT>meshout[coord] = np.zeros(shp)<EOL><DEDENT>for icore in range(np.prod(header['<STR_LIT>'])):<EOL><INDENT>ifs = [icore // np.prod(header['<STR_LIT>'][:i]) % header['<STR_LIT>'][i] * npc[i]<EOL>for i in range(<NUM_LIT:3>)]<EOL>for coord, mesh in meshin[icore].items():<EOL><INDENT>meshout[coord][ifs[<NUM_LIT:0>]:ifs[<NUM_LIT:0>] + npc[<NUM_LIT:0>] + x_p,<EOL>ifs[<NUM_LIT:1>]:ifs[<NUM_LIT:1>] + npc[<NUM_LIT:1>] + y_p,<EOL>ifs[<NUM_LIT:2>]:ifs[<NUM_LIT:2>] + npc[<NUM_LIT:2>] + <NUM_LIT:1>] = mesh<EOL><DEDENT><DEDENT>return meshout<EOL>
Conglomerate meshes from several cores into one.