42     namespace MultiRegions
 
   57                                                        const bool dealiasing):
 
   70                                                        const bool dealiasing,
 
   87             for(j = 0; j < nel; ++j)
 
   95             for(n = 1; n < (ny*nz); ++n)
 
   98                 for(j = 0; j < nel; ++j)
 
  100                     (*m_exp).push_back((*
m_exp)[j]);
 
  121             if(DeclareLinesSetCoeffPhys)
 
  126                 for(
int n = 0; n < 
m_lines.num_elements(); ++n)
 
  145             int ncoeffs_per_line = 
m_lines[0]->GetNcoeffs();
 
  146             int npoints_per_line = 
m_lines[0]->GetTotPoints();
 
  148             int nyzlines = 
m_lines.num_elements();
 
  157             int nel = 
m_lines[0]->GetExpSize();
 
  161             Array<OneD, NekDouble> tmparray;
 
  163             for(cnt  = n = 0; n < nyzlines; ++n)
 
  166                 m_lines[n]->SetPhysArray(tmparray = 
m_phys + npoints_per_line*n);
 
  168                 for(i = 0; i < nel; ++i)
 
  171                     m_phys_offset[cnt] =  
m_lines[n]->GetPhys_Offset(i) + n*npoints_per_line;
 
  172                     m_offset_elmt_id[cnt++] = 
m_lines[n]->GetOffset_Elmt_Id(i) + n*nel;
 
  178                                                Array<OneD, NekDouble> &xc0,
 
  179                                                Array<OneD, NekDouble> &xc1,
 
  180                                                Array<OneD, NekDouble> &xc2)
 
  183             Array<OneD, NekDouble> tmp_xc;
 
  193             Array<OneD, NekDouble> x(npoints);
 
  194             Array<OneD, NekDouble> y(nylines);
 
  195             Array<OneD, NekDouble> z(nzlines);
 
  203             (*m_exp)[eid]->GetCoords(x);
 
  206             for(m = 0; m < nzlines; ++m)
 
  208                 for(j = 0; j < nylines; ++j)
 
  210                     for(n = 0; n < npoints; ++n)
 
  212                         Vmath::Fill(1,x[n],tmp_xc = xc0 + n +(j*npoints) + (m*npoints*nylines), 1);
 
  213                         Vmath::Fill(1,y[j],tmp_xc = xc1 + n +(j*npoints) + (m*npoints*nylines), 1);
 
  214                         Vmath::Fill(1,z[m],tmp_xc = xc2 + n +(j*npoints) + (m*npoints*nylines), 1);
 
  237                                                  Array<OneD, NekDouble> &xc1,
 
  238                                                  Array<OneD, NekDouble> &xc2)
 
  241             Array<OneD, NekDouble> tmp_xc;
 
  242             int npoints = 
m_lines[0]->GetTotPoints();
 
  251             Array<OneD, NekDouble> x(npoints);
 
  252             Array<OneD, NekDouble> y(nylines);
 
  253             Array<OneD, NekDouble> z(nzlines);
 
  263             for(m = 0; m < nzlines; ++m)
 
  265                 for(j = 0; j < nylines; ++j)
 
  267                     for(n = 0; n < npoints; ++n)
 
  269                         Vmath::Fill(1,x[n],tmp_xc = xc0 + n +(j*npoints) + (m*npoints*nylines), 1);
 
  270                         Vmath::Fill(1,y[j],tmp_xc = xc1 + n +(j*npoints) + (m*npoints*nylines), 1);
 
  271                         Vmath::Fill(1,z[m],tmp_xc = xc2 + n +(j*npoints) + (m*npoints*nylines), 1);
 
  287             int nquad0 = (*m_exp)[expansion]->GetNumPoints(0);
 
  291             Array<OneD,NekDouble> coords[3];
 
  293             coords[0] = Array<OneD,NekDouble>(3*nquad0*nquad1*nquad2);
 
  294             coords[1] = coords[0] + nquad0*nquad1*nquad2;
 
  295             coords[2] = coords[1] + nquad0*nquad1*nquad2;
 
  297             GetCoords(expansion,coords[0],coords[1],coords[2]);
 
  299             outfile << 
"Zone, I=" << nquad0 << 
", J=" << nquad1 <<
",K=" 
  300                     << nquad2 << 
", F=Block" << std::endl;
 
  302             for(j = 0; j < 3; ++j)
 
  304                 for(i = 0; i < nquad0*nquad1*nquad2; ++i)
 
  306                     outfile << coords[j][i] << 
" ";
 
  308                 outfile << std::endl;
 
  316             int nquad0 = (*m_exp)[expansion]->GetNumPoints(0);
 
  319             int ntot = nquad0*nquad1*nquad2;
 
  320             int ntotminus = (nquad0-1)*(nquad1-1)*(nquad2-1);
 
  322             Array<OneD,NekDouble> coords[3];
 
  323             coords[0] = Array<OneD,NekDouble>(ntot);
 
  324             coords[1] = Array<OneD,NekDouble>(ntot);
 
  325             coords[2] = Array<OneD,NekDouble>(ntot);
 
  326             GetCoords(expansion,coords[0],coords[1],coords[2]);
 
  328             outfile << 
"    <Piece NumberOfPoints=\"" 
  329                     << ntot << 
"\" NumberOfCells=\"" 
  330                     << ntotminus << 
"\">" << endl;
 
  331             outfile << 
"      <Points>" << endl;
 
  332             outfile << 
"        <DataArray type=\"Float32\" " 
  333                     << 
"NumberOfComponents=\"3\" format=\"ascii\">" << endl;
 
  335             for (i = 0; i < ntot; ++i)
 
  337                 for (j = 0; j < 3; ++j)
 
  339                     outfile << coords[j][i] << 
" ";
 
  344             outfile << 
"        </DataArray>" << endl;
 
  345             outfile << 
"      </Points>" << endl;
 
  346             outfile << 
"      <Cells>" << endl;
 
  347             outfile << 
"        <DataArray type=\"Int32\" " 
  348                     << 
"Name=\"connectivity\" format=\"ascii\">" << endl;
 
  349             for (i = 0; i < nquad0-1; ++i)
 
  351                 for (j = 0; j < nquad1-1; ++j)
 
  353                     for (k = 0; k < nquad2-1; ++k)
 
  355                         outfile << k*nquad0*nquad1 + j*nquad0 + i << 
" " 
  356                                 << k*nquad0*nquad1 + j*nquad0 + i + 1 << 
" " 
  357                                 << k*nquad0*nquad1 + (j+1)*nquad0 + i + 1 << 
" " 
  358                                 << k*nquad0*nquad1 + (j+1)*nquad0 + i << 
" " 
  359                                 << (k+1)*nquad0*nquad1 + j*nquad0 + i << 
" " 
  360                                 << (k+1)*nquad0*nquad1 + j*nquad0 + i + 1 << 
" " 
  361                                 << (k+1)*nquad0*nquad1 + (j+1)*nquad0 + i + 1 << 
" " 
  362                                 << (k+1)*nquad0*nquad1 + (j+1)*nquad0 + i << 
" " << endl;
 
  367             outfile << 
"        </DataArray>" << endl;
 
  368             outfile << 
"        <DataArray type=\"Int32\" " 
  369                     << 
"Name=\"offsets\" format=\"ascii\">" << endl;
 
  370             for (i = 0; i < ntotminus; ++i)
 
  372                 outfile << i*8+8 << 
" ";
 
  375             outfile << 
"        </DataArray>" << endl;
 
  376             outfile << 
"        <DataArray type=\"UInt8\" " 
  377                     << 
"Name=\"types\" format=\"ascii\">" << endl;
 
  378             for (i = 0; i < ntotminus; ++i)
 
  383             outfile << 
"        </DataArray>" << endl;
 
  384             outfile << 
"      </Cells>" << endl;
 
  385             outfile << 
"      <PointData>" << endl;
 
  390             const Array<OneD, const NekDouble> &inarray,
 
  391             const Array<OneD, const NekDouble> &soln)
 
  401             for(
int m = 0; m < nzlines; ++m)
 
  403                 for(
int n = 0; n < nylines; ++n)
 
  405                     errL2 = 
m_lines[n+(m*nylines)]->
L2(inarray + cnt, soln + cnt);