4 #beginMacro initialize3DPolyTW(ux,uy,uz)
6 if(
false && (degreeSpaceX==0 || degreeSpaceY==0 || degreeSpaceZ==0)
7 && (degreeSpaceX!=0 || degreeSpaceY!=0 || degreeSpaceZ!=0) )
16 else if( degreeSpaceY==0 )
24 int degreeSpace2=max(degreeSpaceX,degreeSpaceY,degreeSpaceZ);
37 else if( degreeSpace2==2 )
47 else if( degreeSpace2==3 )
66 else if( degreeSpace2==4 )
87 else if( degreeSpaceX==0 )
131 Overture::abort(
"unimplemented values of degreeSpace");
134 else if( degreeSpace==1 )
160 else if( degreeSpace==2 )
197 else if( degreeSpace==0 )
203 else if( degreeSpace==3 )
241 else if( degreeSpace==4 )
286 else if( degreeSpace>=5 )
288 if(
true || degreeSpace!=5 )
printF(
" ****WARNING***** using a TZ function with degree=5 in space *****\n");
338 printF(
"Maxwell:: not implemented for degree in space =%i \n",degreeSpace);
339 Overture::abort(
"error");
349 #beginMacro definePolynomialTZMacro()
351 tz =
new OGPolyFunction(degreeSpace,numberOfDimensions,numberOfComponentsForTZ,degreeTime);
353 const int ndp=max(max(5,degreeSpace+1),degreeTime+1);
355 printF(
"\n $$$$$$$ assignInitialConditions: build OGPolyFunction: degreeSpace=%i, degreeTime=%i ndp=%i $$$$\n",
356 degreeSpace,degreeTime,ndp);
364 assert( epsc>=0 && muc>=0 && sigmaEc>=0 && sigmaHc>=0 );
365 printF(
" *** numberOfComponentsForTZ=%i, epsc,muc,sigmaEc,sigmaHc=%i,%i,%i,%i, eps,mu=%e,%e\n",numberOfComponentsForTZ,epsc,muc,sigmaEc,sigmaHc,
eps,
mu);
372 if( numberOfDimensions==2 )
380 else if( degreeSpace==1 )
402 else if( degreeSpace==2 )
429 else if( degreeSpace==3 )
455 else if( degreeSpace==4 || degreeSpace==5 )
457 if( degreeSpace!=4 )
printF(
" ****WARNING***** using a TZ function with degree=4 in space *****\n");
487 else if( degreeSpace>=6 )
489 if( degreeSpace!=6 )
printF(
" ****WARNING***** using a TZ function with degree=4 in space *****\n");
557 printF(
"Maxwell:: not implemented for degree in space =%i \n",degreeSpace);
558 Overture::abort(
"error");
564 else if( numberOfDimensions==3 )
567 printF(
"*** initTZ functions: solveForElectricField=%i solveForMagneticField=%i\n",solveForElectricField,solveForMagneticField);
569 if ( solveForElectricField )
571 initialize3DPolyTW(
ex,
ey,
ez);
574 if ( solveForMagneticField )
576 initialize3DPolyTW(
hx,
hy,hz);
583 Overture::abort(
"ERROR:unimplemented number of dimensions");
587 for(
int n=0;
n<numberOfComponents;
n++ )
589 for(
int i=0;
i<
ndp;
i++ )
597 const int numberOfFieldComponents=3;
598 for(
int n=
ex, nt=ext;
n<
ex+numberOfFieldComponents;
n++, nt++ )
606 for(
int i=0;
i<
ndp;
i++ )
628 #endMacro // polynomial TZ macro