12 const short int SpectralMeshTool::permute_array[] = { 0, 1, 13, 25, 3, 2, 14, 26, 7, 6, 18, 30, 11, 10, 22, 34 };
20 if( !
svTag && create_if_missing )
25 MB_SET_ERR_RET_VAL(
"Spectral order must be set before creating spectral vertices tag", 0 );
43 if( !
soTag && create_if_missing )
77 MB_SET_ERR( MB_FAILURE,
"Spectral order must be set or input before converting to spectral mesh" );
90 MB_SET_ERR( MB_FAILURE,
"Can't find any entities for conversion" );
94 if( ents.
psize() != 1 )
96 MB_SET_ERR( MB_FAILURE,
"Entities must be in one chunk for conversion" );
99 int count, verts_per_e;
101 if(
MB_SUCCESS != rval || count != (
int)ents.
size() )
return rval;
121 int num_coarse_elems = num_fine_elems / spectral_unit;
134 output_range.
insert( start_elem, start_elem + num_coarse_elems - 1 );
147 (
void*&)sv_ptr );
MB_CHK_SET_ERR( rval,
"Failed to get SPECTRAL_VERTICES ptr" );
148 assert( count == num_coarse_elems );
149 int f = start_idx, fs = 0, fl = 0;
150 for(
int c = 0; c < num_coarse_elems; c++ )
152 for(
int i = 0; i < verts_per_celem; i++ )
154 fl += verts_per_celem;
155 for(
int i = 0; i < verts_per_felem; i++ )
157 f += verts_per_celem * spectral_unit;
158 fs += verts_per_felem;
160 if( local_gids ) std::copy( sv_ptr, sv_ptr + verts_per_felem * num_coarse_elems,
range_inserter( *local_gids ) );
166 template ErrorCode SpectralMeshTool::create_spectral_elems< int >(
const int* conn,
172 template ErrorCode SpectralMeshTool::create_spectral_elems< EntityHandle >(
const EntityHandle* conn,