34 using namespace Nektar;
36 int main(
int argc,
char *argv[])
38 string fname = std::string(argv[2]);
39 int fdot = fname.find_last_of(
'.');
40 if (fdot != std::string::npos)
42 string ending = fname.substr(fdot);
47 if (ending ==
".chk" || ending ==
".fld")
49 fname = fname.substr(0,fdot);
53 fname = fname +
".txt";
58 Array<OneD, NekDouble> auxArray;
60 int nBndEdgePts, nBndEdges, nBndRegions;
65 "Usage: ExtractSurface2DCFS meshfile fieldFile\n");
67 "Extracts a surface from a 2D fld file"
68 "(only for CompressibleFlowSolver and purely 2D .fld files)\n");
75 std::string m_ViscosityType;
89 int nDimensions = m_spacedim;
93 ASSERTL0(vSession->DefinesParameter(
"Gamma"),
94 "Compressible flow sessions must define a Gamma parameter.");
95 vSession->LoadParameter(
"Gamma", m_gamma, 1.4);
98 ASSERTL0(vSession->DefinesParameter(
"pInf"),
99 "Compressible flow sessions must define a pInf parameter.");
100 vSession->LoadParameter(
"pInf", m_pInf, 101325);
103 ASSERTL0(vSession->DefinesParameter(
"rhoInf"),
104 "Compressible flow sessions must define a rhoInf parameter.");
105 vSession->LoadParameter(
"rhoInf", m_rhoInf, 1.225);
108 ASSERTL0(vSession->DefinesParameter(
"uInf"),
109 "Compressible flow sessions must define a uInf parameter.");
110 vSession->LoadParameter(
"uInf", m_uInf, 0.1);
113 if (m_spacedim == 2 || m_spacedim == 3)
115 ASSERTL0(vSession->DefinesParameter(
"vInf"),
116 "Compressible flow sessions must define a vInf parameter"
117 "for 2D/3D problems.");
118 vSession->LoadParameter(
"vInf", m_vInf, 0.0);
124 ASSERTL0(vSession->DefinesParameter(
"wInf"),
125 "Compressible flow sessions must define a wInf parameter"
127 vSession->LoadParameter(
"wInf", m_wInf, 0.0);
130 vSession->LoadParameter (
"GasConstant", m_gasConstant, 287.058);
131 vSession->LoadParameter (
"Twall", m_Twall, 300.15);
132 vSession->LoadSolverInfo(
"ViscosityType", m_ViscosityType,
"Constant");
133 vSession->LoadParameter (
"mu", m_mu, 1.78e-05);
134 vSession->LoadParameter (
"thermalConductivity",
135 m_thermalConductivity, 0.0257);
139 string meshfile(argv[1]);
146 string fieldFile(argv[2]);
147 vector<LibUtilities::FieldDefinitionsSharedPtr> fieldDef;
148 vector<vector<NekDouble> > fieldData;
155 vector< vector<LibUtilities::PointsType> > pointsType;
156 for (i = 0; i < fieldDef.size(); ++i)
158 vector<LibUtilities::PointsType> ptype;
159 for (j = 0; j < 2; ++j)
163 pointsType.push_back(ptype);
165 graphShPt->SetExpansions(fieldDef, pointsType);
172 int nfields = fieldDef[0]->m_fields.size();
173 Array<OneD, MultiRegions::ExpListSharedPtr> Exp(nfields);
174 Array<OneD, MultiRegions::ExpListSharedPtr> pFields(nfields);
176 for(i = 0; i < pFields.num_elements(); i++)
180 vSession->GetVariable(i));
189 for (i = 1; i < nfields; ++i)
195 int nSolutionPts = pFields[0]->GetNpoints();
196 int nTracePts = pFields[0]->GetTrace()->GetTotPoints();
197 int nElements = pFields[0]->GetExpSize();
199 Array<OneD, NekDouble> tmp(nSolutionPts, 0.0);
201 Array<OneD, NekDouble> x(nSolutionPts);
202 Array<OneD, NekDouble> y(nSolutionPts);
203 Array<OneD, NekDouble> z(nSolutionPts);
205 Array<OneD, NekDouble> traceX(nTracePts);
206 Array<OneD, NekDouble> traceY(nTracePts);
207 Array<OneD, NekDouble> traceZ(nTracePts);
209 Array<OneD, NekDouble> surfaceX(nTracePts);
210 Array<OneD, NekDouble> surfaceY(nTracePts);
211 Array<OneD, NekDouble> surfaceZ(nTracePts);
213 pFields[0]->GetCoords(x, y, z);
215 pFields[0]->ExtractTracePhys(x, traceX);
216 pFields[0]->ExtractTracePhys(y, traceY);
217 pFields[0]->ExtractTracePhys(z, traceZ);
222 Array<OneD, Array<OneD, NekDouble> > uFields(nfields);
223 Array<OneD, Array<OneD, NekDouble> > traceFields(nfields);
224 Array<OneD, Array<OneD, NekDouble> > surfaceFields(nfields);
227 for (j = 0; j < nfields; ++j)
229 uFields[j] = Array<OneD, NekDouble>(nSolutionPts, 0.0);
230 traceFields[j] = Array<OneD, NekDouble>(nTracePts, 0.0);
231 surfaceFields[j] = Array<OneD, NekDouble>(nTracePts, 0.0);
234 for (i = 0; i < fieldData.size(); ++i)
236 Exp[j]->ExtractDataToCoeffs(fieldDef[i], fieldData[i],
237 fieldDef[i]->m_fields[j],
238 Exp[j]->UpdateCoeffs());
240 Exp[j]->BwdTrans(Exp[j]->GetCoeffs(), Exp[j]->UpdatePhys());
241 Vmath::Vcopy(nSolutionPts, Exp[j]->GetPhys(), 1, uFields[j], 1);
242 pFields[0]->ExtractTracePhys(uFields[j], traceFields[j]);
247 int nfieldsAdded = 20;
248 Array<OneD, Array<OneD, NekDouble> > traceFieldsAdded(nfieldsAdded);
249 Array<OneD, Array<OneD, NekDouble> > surfaceFieldsAdded(nfieldsAdded);
251 for (j = 0; j < nfieldsAdded; ++j)
253 traceFieldsAdded[j] = Array<OneD, NekDouble>(nTracePts, 0.0);
254 surfaceFieldsAdded[j] = Array<OneD, NekDouble>(nTracePts, 0.0);
264 Array<OneD, Array<OneD, NekDouble> > m_traceNormals (nDimensions);
265 for(i = 0; i < nDimensions; ++i)
267 m_traceNormals[i] = Array<OneD, NekDouble> (nTracePts, 0.0);
269 pFields[0]->GetTrace()->GetNormals(m_traceNormals);
271 Array<OneD, Array<OneD, NekDouble> > m_traceTangents (nDimensions);
272 for(i = 0; i < nDimensions; ++i)
274 m_traceTangents[i] = Array<OneD, NekDouble> (nTracePts, 0.0);
280 &m_traceNormals[0][0], 1,
281 &traceFieldsAdded[0][0], 1);
285 &m_traceNormals[1][0], 1,
286 &traceFieldsAdded[1][0], 1);
290 &m_traceNormals[1][0], 1,
291 &m_traceTangents[0][0], 1);
292 Vmath::Neg(nTracePts, &m_traceTangents[0][0], 1);
295 &m_traceTangents[0][0], 1,
296 &traceFieldsAdded[2][0], 1);
300 &m_traceNormals[0][0], 1,
301 &m_traceTangents[1][0], 1);
304 &m_traceTangents[1][0], 1,
305 &traceFieldsAdded[3][0], 1);
312 Array<OneD, NekDouble> pressure(nSolutionPts, 0.0);
315 for (i = 0; i < m_spacedim; i++)
318 &uFields[i + 1][0], 1,
319 &uFields[i + 1][0], 1,
339 &uFields[nfields - 1][0], 1,
348 pFields[0]->ExtractTracePhys(pressure, traceFieldsAdded[4]);
355 Array<OneD, NekDouble> temperature(nSolutionPts, 0.0);
362 NekDouble GasConstantInv = 1.0/m_gasConstant;
368 pFields[0]->ExtractTracePhys(temperature, traceFieldsAdded[5]);
374 Array<OneD, Array<OneD, NekDouble> > Dtemperature(nDimensions);
375 Array<OneD, Array<OneD, NekDouble> > traceDtemperature(nDimensions);
377 for (i = 0; i < nDimensions; ++ i)
379 Dtemperature[i] = Array<OneD, NekDouble>(nSolutionPts, 0.0);
380 traceDtemperature[i] = Array<OneD, NekDouble>(nTracePts, 0.0);
383 for (i = 0; i < nDimensions; ++ i)
385 for (n = 0; n < nElements; n++)
387 phys_offset = pFields[0]->GetPhys_Offset(n);
389 pFields[i]->GetExp(n)->PhysDeriv(
390 i, temperature + phys_offset,
391 auxArray = Dtemperature[i] + phys_offset);
394 pFields[0]->ExtractTracePhys(Dtemperature[i], traceDtemperature[i]);
397 for(i = 0; i < nDimensions; ++i)
400 &m_traceNormals[i][0], 1,
401 &traceDtemperature[i][0], 1,
405 &traceFieldsAdded[6][0], 1,
407 &traceFieldsAdded[6][0], 1);
416 Array<OneD, Array<OneD, NekDouble> > Dpressure(nDimensions);
417 Array<OneD, Array<OneD, NekDouble> > traceDpressure(nDimensions);
419 for (i = 0; i < nDimensions; ++ i)
421 Dpressure[i] = Array<OneD, NekDouble>(nSolutionPts, 0.0);
422 traceDpressure[i] = Array<OneD, NekDouble>(nTracePts, 0.0);
425 for (i = 0; i < nDimensions; ++ i)
427 for (n = 0; n < nElements; n++)
429 phys_offset = pFields[0]->GetPhys_Offset(n);
431 pFields[i]->GetExp(n)->PhysDeriv(
432 i, pressure + phys_offset,
433 auxArray = Dpressure[i] + phys_offset);
436 pFields[0]->ExtractTracePhys(Dpressure[i], traceDpressure[i]);
440 for(i = 0; i < nDimensions; ++i)
443 &m_traceTangents[i][0], 1,
444 &traceDpressure[i][0], 1,
448 &traceFieldsAdded[7][0], 1,
450 &traceFieldsAdded[7][0], 1);
455 &traceDpressure[0][0], 1,
456 &traceFieldsAdded[8][0], 1);
460 &traceDpressure[1][0], 1,
461 &traceFieldsAdded[9][0], 1);
469 Array<OneD, Array<OneD, Array<OneD, NekDouble> > > Dvelocity(nDimensions);
470 Array<OneD, Array<OneD, Array<OneD, NekDouble> > > traceDvelocity(nDimensions);
471 Array<OneD, Array<OneD, NekDouble> > velocity(nDimensions);
473 for (i = 0; i < nDimensions; ++ i)
475 Dvelocity[i] = Array<OneD, Array<OneD, NekDouble> >(nDimensions);
476 traceDvelocity[i] = Array<OneD, Array<OneD, NekDouble> >(nDimensions);
477 velocity[i] = Array<OneD, NekDouble>(nSolutionPts, 0.0);
479 Vmath::Vdiv(nSolutionPts, uFields[i+1], 1, uFields[0], 1,
482 for (j = 0; j < nDimensions; ++j)
484 Dvelocity[i][j] = Array<OneD, NekDouble>(nSolutionPts, 0.0);
485 traceDvelocity[i][j] = Array<OneD, NekDouble>(nTracePts, 0.0);
489 for (i = 0; i < nDimensions; ++i)
491 for (j = 0; j < nDimensions; ++j)
493 for (n = 0; n < nElements; n++)
495 phys_offset = pFields[0]->GetPhys_Offset(n);
497 pFields[i]->GetExp(n)->PhysDeriv(
498 j, velocity[i] + phys_offset,
499 auxArray = Dvelocity[i][j] + phys_offset);
503 pFields[0]->ExtractTracePhys(Dvelocity[i][j], traceDvelocity[i][j]);
508 &traceDvelocity[0][0][0], 1,
509 &traceFieldsAdded[10][0], 1);
511 &traceDvelocity[0][1][0], 1,
512 &traceFieldsAdded[11][0], 1);
514 &traceDvelocity[1][0][0], 1,
515 &traceFieldsAdded[12][0], 1);
517 &traceDvelocity[1][1][0], 1,
518 &traceFieldsAdded[13][0], 1);
531 Array<OneD, NekDouble > mu (nSolutionPts, 0.0);
532 Array<OneD, NekDouble > mu2 (nSolutionPts, 0.0);
533 Array<OneD, NekDouble > divVel(nSolutionPts, 0.0);
536 if (m_ViscosityType ==
"Variable")
539 NekDouble T_star = m_pInf / (m_rhoInf * m_gasConstant);
542 for (
int i = 0; i < nSolutionPts; ++i)
544 ratio = temperature[i] / T_star;
545 mu[i] = mu_star * ratio * sqrt(ratio) *
546 (T_star + 110.0) / (temperature[i] + 110.0);
555 Array<OneD, Array<OneD, NekDouble> > temp(m_spacedim);
556 Array<OneD, Array<OneD, NekDouble> > Sgg(m_spacedim);
559 Vmath::Smul(nSolutionPts, 2.0, &mu[0], 1, &mu2[0], 1);
563 &Dvelocity[0][0][0], 1, &divVel[0], 1);
565 &Dvelocity[1][1][0], 1, &divVel[0], 1);
568 Vmath::Smul(nSolutionPts, lambda, &divVel[0], 1, &divVel[0], 1);
569 Vmath::Vmul(nSolutionPts, &mu[0], 1, &divVel[0], 1, &divVel[0], 1);
573 for (j = 0; j < m_spacedim; ++j)
575 temp[j] = Array<OneD, NekDouble>(nSolutionPts, 0.0);
576 Sgg[j] = Array<OneD, NekDouble>(nSolutionPts, 0.0);
578 Vmath::Vmul(nSolutionPts, &mu2[0], 1, &Dvelocity[j][j][0], 1,
581 Vmath::Vadd(nSolutionPts, &temp[j][0], 1, &divVel[0], 1, &Sgg[j][0], 1);
585 Array<OneD, NekDouble > Sxy(nSolutionPts, 0.0);
589 &Dvelocity[1][0][0], 1, &Sxy[0], 1);
592 Vmath::Vmul(nSolutionPts, &mu[0], 1, &Sxy[0], 1, &Sxy[0], 1);
594 pFields[0]->ExtractTracePhys(Sgg[0], traceFieldsAdded[14]);
595 pFields[0]->ExtractTracePhys(Sgg[1], traceFieldsAdded[15]);
596 pFields[0]->ExtractTracePhys(Sxy, traceFieldsAdded[16]);
601 Array<OneD, NekDouble > sigma_diff (nTracePts, 0.0);
602 Array<OneD, NekDouble > cosTeta (nTracePts, 0.0);
603 Array<OneD, NekDouble > sinTeta (nTracePts, 0.0);
604 Array<OneD, NekDouble > cos2Teta (nTracePts, 0.0);
605 Array<OneD, NekDouble > sin2Teta (nTracePts, 0.0);
606 Array<OneD, NekDouble > tau_t (nTracePts, 0.0);
608 Array<OneD, NekDouble > tmpTeta (nTracePts, 0.0);
611 Vmath::Vcopy(nTracePts, &m_traceNormals[0][0], 1, &cosTeta[0], 1);
614 Vmath::Vcopy(nTracePts, &m_traceNormals[1][0], 1, &sinTeta[0], 1);
617 Vmath::Vsub(nTracePts, &traceFieldsAdded[14][0], 1,
618 &traceFieldsAdded[15][0], 1, &sigma_diff[0], 1);
621 Vmath::Vmul(nTracePts, &cosTeta[0], 1, &sinTeta[0], 1, &tmpTeta[0], 1);
622 Vmath::Smul(nTracePts, 2.0, &tmpTeta[0], 1, &sin2Teta[0], 1);
625 Vmath::Vmul(nTracePts, &cosTeta[0], 1, &cosTeta[0], 1, &cos2Teta[0], 1);
626 Vmath::Vmul(nTracePts, &sinTeta[0], 1, &sinTeta[0], 1, &tmpTeta[0], 1);
627 Vmath::Vsub(nTracePts, &cos2Teta[0], 1, &tmpTeta[0], 1, &cos2Teta[0], 1);
630 Vmath::Smul(nTracePts, -0.5, &sigma_diff[0], 1, &sigma_diff[0], 1);
631 Vmath::Vmul(nTracePts, &sigma_diff[0], 1, &sin2Teta[0], 1, &tau_t[0], 1);
632 Vmath::Vmul(nTracePts, &traceFieldsAdded[16][0], 1, &cos2Teta[0], 1,
634 Vmath::Vadd(nTracePts, &tau_t[0], 1, &tmpTeta[0], 1, &tau_t[0], 1);
636 Vmath::Vcopy(nTracePts, &tau_t[0], 1, &traceFieldsAdded[17][0], 1);
642 pFields[0]->ExtractTracePhys(mu, traceFieldsAdded[18]);
650 Array<OneD, NekDouble> soundspeed(nSolutionPts, 0.0);
652 Vmath::Vdiv (nSolutionPts, pressure, 1, uFields[0], 1, soundspeed, 1);
653 Vmath::Smul (nSolutionPts, gamma, soundspeed, 1, soundspeed, 1);
654 Vmath::Vsqrt(nSolutionPts, soundspeed, 1, soundspeed, 1);
657 Array<OneD, NekDouble> mach(nSolutionPts, 0.0);
659 for (
int i = 0; i < m_spacedim; ++i)
661 Vmath::Vvtvp(nSolutionPts, uFields[i + 1], 1, uFields[i + 1], 1,
665 Vmath::Vdiv(nSolutionPts, mach, 1, uFields[0], 1, mach, 1);
666 Vmath::Vdiv(nSolutionPts, mach, 1, uFields[0], 1, mach, 1);
668 Vmath::Vdiv(nSolutionPts, mach, 1, soundspeed, 1, mach, 1);
670 pFields[0]->ExtractTracePhys(mach, traceFieldsAdded[19]);
675 if (pFields[0]->GetBndCondExpansions().num_elements())
679 nBndRegions = pFields[0]->GetBndCondExpansions().num_elements();
680 for (b = 0; b < nBndRegions; ++b)
682 nBndEdges = pFields[0]->GetBndCondExpansions()[b]->GetExpSize();
683 for (e = 0; e < nBndEdges; ++e)
685 nBndEdgePts = pFields[0]->
686 GetBndCondExpansions()[b]->GetExp(e)->GetNumPoints(0);
688 id2 = pFields[0]->GetTrace()->
689 GetPhys_Offset(pFields[0]->GetTraceMap()->
690 GetBndCondTraceToGlobalTraceMap(cnt++));
692 if (pFields[0]->GetBndConditions()[b]->
694 pFields[0]->GetBndConditions()[b]->
713 if (pFields[0]->GetBndCondExpansions().num_elements())
715 for (j = 0; j < nfields; ++j)
719 nBndRegions = pFields[j]->GetBndCondExpansions().num_elements();
720 for (b = 0; b < nBndRegions; ++b)
722 nBndEdges = pFields[j]->GetBndCondExpansions()[b]->GetExpSize();
723 for (e = 0; e < nBndEdges; ++e)
725 nBndEdgePts = pFields[j]->
726 GetBndCondExpansions()[b]->GetExp(e)->GetNumPoints(0);
728 id2 = pFields[j]->GetTrace()->
729 GetPhys_Offset(pFields[j]->GetTraceMap()->
730 GetBndCondTraceToGlobalTraceMap(cnt++));
732 if (pFields[j]->GetBndConditions()[b]->
734 pFields[j]->GetBndConditions()[b]->
738 &surfaceFields[j][id1], 1);
748 if (pFields[0]->GetBndCondExpansions().num_elements())
750 for (j = 0; j < nfieldsAdded; ++j)
754 nBndRegions = pFields[0]->GetBndCondExpansions().num_elements();
755 for (b = 0; b < nBndRegions; ++b)
757 nBndEdges = pFields[0]->GetBndCondExpansions()[b]->GetExpSize();
758 for (e = 0; e < nBndEdges; ++e)
760 nBndEdgePts = pFields[0]->
761 GetBndCondExpansions()[b]->GetExp(e)->GetNumPoints(0);
763 id2 = pFields[0]->GetTrace()->
764 GetPhys_Offset(pFields[0]->GetTraceMap()->
765 GetBndCondTraceToGlobalTraceMap(cnt++));
767 if (pFields[0]->GetBndConditions()[b]->
769 pFields[0]->GetBndConditions()[b]->
773 &surfaceFieldsAdded[j][id1], 1);
784 std::string vEquation = vSession->GetSolverInfo(
"EQType");
786 Array<OneD, MultiRegions::ExpListSharedPtr> BndExp;
787 BndExp = pFields[0]->GetBndCondExpansions();
798 for(
int i = 0; i < BndExp[0]->GetExpSize(); ++i)
804 Array<OneD, NekDouble> nxOnBnd(nbc,0.0);
805 Array<OneD, NekDouble> nyOnBnd(nbc,0.0);
806 Array<OneD, NekDouble> txOnBnd(nbc,0.0);
807 Array<OneD, NekDouble> tyOnBnd(nbc,0.0);
811 Array<OneD, NekDouble> drag_p(nbc,0.0);
812 Array<OneD, NekDouble> lift_p(nbc,0.0);
813 Array<OneD, NekDouble> PressurOnBnd(nbc,0.0);
815 Array<OneD, NekDouble> drag_v(nbc,0.0);
816 Array<OneD, NekDouble> lift_v(nbc,0.0);
817 Array<OneD, NekDouble> ShearStressOnBnd(nbc,0.0);
819 Array<OneD, NekDouble> Unity(nbc,1.0);
821 for(
int j = 0; j < nbc; ++j)
824 nxOnBnd[j] = surfaceFieldsAdded[0][GlobalIndex];
825 nyOnBnd[j] = surfaceFieldsAdded[1][GlobalIndex];
826 txOnBnd[j] = surfaceFieldsAdded[2][GlobalIndex];
827 tyOnBnd[j] = surfaceFieldsAdded[3][GlobalIndex];
829 PressurOnBnd[j] = surfaceFieldsAdded[4][GlobalIndex];
831 if (vEquation ==
"NavierStokesCFE")
833 ShearStressOnBnd[j] = surfaceFieldsAdded[17][GlobalIndex];
850 Vmath::Vmul(nbc,PressurOnBnd,1,nxOnBnd,1, drag_p,1);
851 Vmath::Vmul(nbc,PressurOnBnd,1,nyOnBnd,1, lift_p,1);
856 Fxp += bc->Integral(drag_p);
857 Fyp += bc->Integral(lift_p);
859 if (vEquation ==
"NavierStokesCFE")
861 Vmath::Vmul(nbc,ShearStressOnBnd,1,txOnBnd,1, drag_v,1);
862 Vmath::Vmul(nbc,ShearStressOnBnd,1,tyOnBnd,1, lift_v,1);
867 Fxv += bc->Integral(drag_v);
868 Fyv += bc->Integral(lift_v);
871 Sref += bc->Integral(Unity);
875 cout <<
"\n Sref = " << Sref << endl;
880 cout <<
" Pressure drag (Fxp) = " << Fxp << endl;
881 cout <<
" Pressure lift (Fyp) = " << Fyp << endl;
882 cout <<
" Viscous drag (Fxv) = " << Fxv << endl;
883 cout <<
" Viscous lift (Fyv) = " << Fyv << endl;
884 cout <<
"\n ==> Total drag = " << Fxp+Fxv << endl;
885 cout <<
" ==> Total lift = " << Fyp+Fyv <<
"\n" << endl;
894 outfile.open(fname.c_str());
895 outfile <<
"% x[m] " <<
" \t"
902 <<
"rho[kg/m^3] " <<
" \t"
903 <<
"rhou[kg/(m^2 s)] " <<
" \t"
904 <<
"rhov[kg/(m^2 s)] " <<
" \t"
908 <<
"dT/dn[k/m] " <<
" \t"
909 <<
"dp/dT[Pa/m] " <<
" \t"
910 <<
"dp/dx[Pa/m] " <<
" \t"
911 <<
"dp/dy[Pa/m] " <<
" \t"
912 <<
"du/dx[s^-1] " <<
" \t"
913 <<
"du/dy[s^-1] " <<
" \t"
914 <<
"dv/dx[s^-1] " <<
" \t"
915 <<
"dv/dy[s^-1] " <<
" \t"
916 <<
"tau_xx[Pa] " <<
" \t"
917 <<
"tau_yy[Pa] " <<
" \t"
918 <<
"tau_xy[Pa] " <<
" \t"
919 <<
"tau_t[Pa] " <<
" \t"
920 <<
"mu[Pa s] " <<
" \t"
924 for (i = 0; i < id1; ++i)
926 outfile << scientific
929 << surfaceX[i] <<
" \t "
930 << surfaceY[i] <<
" \t "
931 << surfaceZ[i] <<
" \t "
932 << surfaceFieldsAdded[0][i] <<
" \t "
933 << surfaceFieldsAdded[1][i] <<
" \t "
934 << surfaceFieldsAdded[2][i] <<
" \t "
935 << surfaceFieldsAdded[3][i] <<
" \t "
936 << surfaceFields[0][i] <<
" \t "
937 << surfaceFields[1][i] <<
" \t "
938 << surfaceFields[2][i] <<
" \t "
939 << surfaceFields[3][i] <<
" \t "
940 << surfaceFieldsAdded[4][i] <<
" \t "
941 << surfaceFieldsAdded[5][i] <<
" \t "
942 << surfaceFieldsAdded[6][i] <<
" \t "
943 << surfaceFieldsAdded[7][i] <<
" \t "
944 << surfaceFieldsAdded[8][i] <<
" \t "
945 << surfaceFieldsAdded[9][i] <<
" \t "
946 << surfaceFieldsAdded[10][i] <<
" \t "
947 << surfaceFieldsAdded[11][i] <<
" \t "
948 << surfaceFieldsAdded[12][i] <<
" \t "
949 << surfaceFieldsAdded[13][i] <<
" \t "
950 << surfaceFieldsAdded[14][i] <<
" \t "
951 << surfaceFieldsAdded[15][i] <<
" \t "
952 << surfaceFieldsAdded[16][i] <<
" \t "
953 << surfaceFieldsAdded[17][i] <<
" \t "
954 << surfaceFieldsAdded[18][i] <<
" \t "
955 << surfaceFieldsAdded[19][i] <<
" \t "
959 outfile << endl << endl;