00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef AMROC_V3VISUALGRID_H
00010 #define AMROC_V3VISUALGRID_H
00011
00019 #include "VisualGrid.h"
00020 #include "HDFToV3/V3VisualGridBase.h"
00021 #include "HDFToV3/V3VisualGridData.h"
00022
00023 #define NSURF 6
00024
00025
00026
00027 int strcpn(char* str1, char* str2) {
00028 register int i = 0;
00029 while (str2[i]!='\0') {
00030 str1[i] = str2[i];
00031 i++;
00032 }
00033 return i;
00034 }
00035
00036
00037
00038
00039 int strcpb( char* str1, char* str2, int len ) {
00040 register int i = 0, j;
00041 while (str2[i] != '\0') {
00042 str1[i] = str2[i];
00043 i++;
00044 }
00045 for (j=i; j < len; j++) str1[j] = ' ';
00046 return i;
00047 }
00048
00049
00056 template <class VectorType>
00057 class V3VisualGrid : public V3VisualGridBase, public VisualGrid<VectorType> {
00058 typedef typename VectorType::InternalDataType DataType;
00059 typedef VisualGrid<VectorType> base;
00060
00061 public:
00062 typedef typename base::data_block_type database_block_type;
00063 typedef V3VisualGridData<VectorType> data_block_type;
00064 typedef typename base::block_list_type blockbase_list_type;
00065 typedef std::vector<data_block_type*> block_list_type;
00066 typedef typename base::evaluator_type evaluator_type;
00067 typedef typename base::hierarchy_storage_type hierarchy_storage_type;
00068 typedef typename base::hdata_block_type hdata_block_type;
00069
00070 typedef std::pair<int, int> node_pair_type;
00071 typedef std::multimap<int, int> node_pair_list_type;
00072
00073 public:
00074 V3VisualGrid(evaluator_type* ev) : V3VisualGridBase(ev), base(ev),
00075 _Equiv(0), _PlotCrossSection(0) {
00076 for (int s=0; s<NSURF; s++)
00077 SurfaceDisp[s] = 1;
00078 base::_BlockList = (blockbase_list_type *) new block_list_type;
00079 base::Make3d = true;
00080 }
00081
00082 virtual ~V3VisualGrid() {
00083 for (typename block_list_type::iterator bit=BlockList().begin();
00084 bit!=BlockList().end(); bit++)
00085 delete (*bit);
00086 BlockList().clear();
00087 delete base::_BlockList;
00088 }
00089
00090 virtual void update() {
00091 std::string iname;
00092 if (UpdateName()) iname = *UpdateName();
00093 else iname = "display.in";
00094
00095
00096 std::ifstream infile;
00097 std::ofstream outfile;
00098 infile.open(iname.c_str(), std::ios::in);
00099 if (!infile) {
00100 if (!UpdateName()) {
00101 outfile.open(iname.c_str(), std::ios::out);
00102 outfile << "Type 6\nUseEquiv 1\n\nDisplayMinLevel 0\nDisplayMaxLevel 10\n\n";
00103 outfile << "ScriptBegin {\n movewindow 7,2000,0\n";
00104 outfile << " Edgesofftransparenton\n}\n";
00105 outfile.close();
00106 }
00107 }
00108 else{
00109 infile.close();
00110 }
00111
00112 ControlDevice DisplayCtrl(GetFileControlDevice(iname.c_str(),""));
00113 RegisterAt(DisplayCtrl,"Type",base::_FKeys);
00114 RegisterAt(DisplayCtrl,"UseEquiv",_Equiv);
00115 RegisterAt(DisplayCtrl,"DisplayMinLevel",base::_MinLevel);
00116 RegisterAt(DisplayCtrl,"DisplayMaxLevel",base::_MaxLevel);
00117 RegisterAt(DisplayCtrl,"CutOut",base::_Eliminate);
00118 RegisterAt(DisplayCtrl,"CutOutValue",base::_EliminateValue);
00119 delete base::PlotLevel;
00120 base::PlotLevel = new int[NLevels()];
00121 for (int lev=0; lev<NLevels(); lev++) {
00122 char LevelName[16];
00123 std::sprintf(LevelName,"PlotGrid(%d)",lev);
00124 RegisterAt(DisplayCtrl,LevelName,base::PlotLevel[lev]);
00125 base::PlotLevel[lev] = 0;
00126 }
00127 int d;
00128 for (d=0; d<3; d++) {
00129 char VariableName[16];
00130 std::sprintf(VariableName,"ShowMin(%d)",d+1);
00131 RegisterAt(DisplayCtrl,VariableName,base::show[2*d]);
00132 std::sprintf(VariableName,"ShowMax(%d)",d+1);
00133 RegisterAt(DisplayCtrl,VariableName,base::show[2*d+1]);
00134 std::sprintf(VariableName,"ShowCut(%d)",d+1);
00135 RegisterAt(DisplayCtrl,VariableName,base::cut[d]);
00136 std::sprintf(VariableName,"Symmetry(%d)",d+1);
00137 RegisterAt(DisplayCtrl,VariableName,base::Symmetry[d]);
00138 std::sprintf(VariableName,"Periodic(%d)",d+1);
00139 RegisterAt(DisplayCtrl,VariableName,base::Periodic[d]);
00140 }
00141 RegisterAt(DisplayCtrl,"PlotCrossSection",_PlotCrossSection);
00142 for (d=0; d<3; d++) {
00143 char VariableName[16];
00144 std::sprintf(VariableName,"CrossPlaneP1(%d)",d);
00145 RegisterAt(DisplayCtrl,VariableName,CrossPlane[d]);
00146 }
00147 for (d=0; d<3; d++) {
00148 char VariableName[16];
00149 std::sprintf(VariableName,"CrossPlaneP2(%d)",d);
00150 RegisterAt(DisplayCtrl,VariableName,CrossPlane[3+d]);
00151 }
00152 for (d=0; d<3; d++) {
00153 char VariableName[16];
00154 std::sprintf(VariableName,"CrossPlaneP3(%d)",d);
00155 RegisterAt(DisplayCtrl,VariableName,CrossPlane[6+d]);
00156 }
00157 TheEvaluator().register_at(DisplayCtrl,"");
00158 DisplayCtrl.update();
00159
00160 TheEvaluator().update();
00161 }
00162
00163 virtual int SetUp(int step, std::string** filenames, int Nfilenames) {
00164 if (base::SetUp(step,filenames,Nfilenames) >= 0)
00165 for (typename block_list_type::iterator bit=BlockList().begin();
00166 bit!=BlockList().end(); bit++)
00167 (*bit)->SetCrossPlane(CrossPlane);
00168 return 0;
00169 }
00170
00171 virtual void SetGrid(float xyz[][3]) {
00172 SetGridNodes(xyz);
00173 }
00174
00175 virtual void SetScal(int *key,float v[]) {
00176 if (FKeys() == 1)
00177 SetScalNodes(key, v);
00178 else
00179 SetScalCells(key, v);
00180 if (TheEvaluator().mvals[2*(*key-1)] ==
00181 TheEvaluator().mvals[2*(*key-1)+1]) {
00182 if (TheEvaluator().mvals[2*(*key-1)] == 0.0) {
00183 TheEvaluator().mvals[2*(*key-1)] = -0.1;
00184 TheEvaluator().mvals[2*(*key-1)+1] = 0.1;
00185 }
00186 else {
00187 TheEvaluator().mvals[2*(*key-1)] -=
00188 0.1*TheEvaluator().mvals[2*(*key-1)];
00189 TheEvaluator().mvals[2*(*key-1)+1] +=
00190 0.1*TheEvaluator().mvals[2*(*key-1)+1];
00191 }
00192 }
00193
00194 int state;
00195 if (FKeys() == 1) state = 5;
00196 else state = 9;
00197 long int kk=(long int)(*key);
00198 V3_SETSTATE(&state, &kk, base::TheEvaluator().Mvals(*key-1),
00199 base::TheEvaluator().TitleKeys(*key-1),
00200 std::strlen(TheEvaluator().TitleKeys(*key-1)));
00201 }
00202
00203 virtual void Vect(int *key,float v[][3]) {
00204 if (FKeys() == 1)
00205 VectNodes(key, v);
00206 else
00207 VectCells(key, v);
00208 }
00209
00210 virtual void FindNodePairs() {
00211 register int i,j,k;
00212 int kn,knmatch,ijk[3];
00213 std::cerr << std::endl << "Finding matching node pairs";
00214 for (typename block_list_type::iterator bit=BlockList().begin();
00215 bit!=BlockList().end(); bit++){
00216
00217 BBox bbnodes(growupper((*bit)->DB().bbox(),1));
00218
00219 std::cerr << ".";
00220 for (typename block_list_type::iterator bitb=bit+1;
00221 bitb!=BlockList().end(); bitb++) {
00222
00223 BBox bbnodes_cur(growupper((*bitb)->DB().bbox(),1));
00224 BBox bbint = bbnodes * bbnodes_cur;
00225 if (bbint.empty())
00226 continue;
00227 bbint.lower() = (bbint.lower()/bbint.stepsize())*bbint.stepsize();
00228 bbint.upper() = (bbint.upper()/bbint.stepsize())*bbint.stepsize();
00229
00230
00231 if (bbint.lower(2) == bbnodes.lower(2)) {
00232 ijk[2]=bbint.lower(2);
00233 for(j=bbint.lower(1); j<=bbint.upper(1); j+=bbint.stepsize(1)) {
00234 ijk[1]=j;
00235 for(i=bbint.lower(0); i<=bbint.upper(0); i+=bbint.stepsize(0)) {
00236 ijk[0]=i;
00237 kn = (*bit)->FindMatchingNode(ijk);
00238 knmatch = (*bitb)->FindMatchingNode(ijk);
00239 if(kn<knmatch)
00240 if (NodePairs.empty() ||
00241 NodePairs.find(knmatch)==NodePairs.end())
00242 NodePairs.insert(node_pair_type(knmatch, kn));
00243 }
00244 }
00245 }
00246
00247
00248 if (bbint.upper(2) == bbnodes.upper(2)) {
00249 ijk[2]=bbint.upper(2);
00250 for(j=bbint.lower(1); j<=bbint.upper(1); j+=bbint.stepsize(1)) {
00251 ijk[1]=j;
00252 for(i=bbint.lower(0); i<=bbint.upper(0); i+=bbint.stepsize(0)) {
00253 ijk[0]=i;
00254 kn = (*bit)->FindMatchingNode(ijk);
00255 knmatch = (*bitb)->FindMatchingNode(ijk);
00256 if(kn<knmatch)
00257 if (NodePairs.empty() ||
00258 NodePairs.find(knmatch)==NodePairs.end())
00259 NodePairs.insert(node_pair_type(knmatch, kn));
00260 }
00261 }
00262 }
00263
00264
00265 if (bbint.lower(0) == bbnodes.lower(0)) {
00266 ijk[0]=bbint.lower(0);
00267 for(k=bbint.lower(2); k<=bbint.upper(2); k+=bbint.stepsize(2)) {
00268 ijk[2]=k;
00269 for(j=bbint.lower(1); j<=bbint.upper(1); j+=bbint.stepsize(1)) {
00270 ijk[1]=j;
00271 kn = (*bit)->FindMatchingNode(ijk);
00272 knmatch = (*bitb)->FindMatchingNode(ijk);
00273 if(kn<knmatch)
00274 if (NodePairs.empty() ||
00275 NodePairs.find(knmatch)==NodePairs.end())
00276 NodePairs.insert(node_pair_type(knmatch, kn));
00277 }
00278 }
00279 }
00280
00281
00282 if (bbint.upper(0) == bbnodes.upper(0)) {
00283 ijk[0]=bbint.upper(0);
00284 for(k=bbint.lower(2); k<=bbint.upper(2); k+=bbint.stepsize(2)) {
00285 ijk[2]=k;
00286 for(j=bbint.lower(1); j<=bbint.upper(1); j+=bbint.stepsize(1)) {
00287 ijk[1]=j;
00288 kn = (*bit)->FindMatchingNode(ijk);
00289 knmatch = (*bitb)->FindMatchingNode(ijk);
00290 if(kn<knmatch)
00291 if (NodePairs.empty() ||
00292 NodePairs.find(knmatch)==NodePairs.end())
00293 NodePairs.insert(node_pair_type(knmatch, kn));
00294 }
00295 }
00296 }
00297
00298
00299 if (bbint.lower(1) == bbnodes.lower(1)) {
00300 ijk[1]=bbint.lower(1);
00301 for(k=bbint.lower(2); k<=bbint.upper(2); k+=bbint.stepsize(2)) {
00302 ijk[2]=k;
00303 for(i=bbint.lower(0); i<=bbint.upper(0); i+=bbint.stepsize(0)) {
00304 ijk[0]=i;
00305 kn = (*bit)->FindMatchingNode(ijk);
00306 knmatch = (*bitb)->FindMatchingNode(ijk);
00307 if(kn<knmatch)
00308 if (NodePairs.empty() ||
00309 NodePairs.find(knmatch)==NodePairs.end())
00310 NodePairs.insert(node_pair_type(knmatch, kn));
00311 }
00312 }
00313 }
00314
00315
00316 if (bbint.upper(1) == bbnodes.upper(1)) {
00317 ijk[1]=bbint.upper(1);
00318 for(k=bbint.lower(2); k<=bbint.upper(2); k+=bbint.stepsize(2)) {
00319 ijk[2]=k;
00320 for(i=bbint.lower(0); i<=bbint.upper(0); i+=bbint.stepsize(0)) {
00321 ijk[0]=i;
00322 kn = (*bit)->FindMatchingNode(ijk);
00323 knmatch = (*bitb)->FindMatchingNode(ijk);
00324 if(kn<knmatch)
00325 if (NodePairs.empty() ||
00326 NodePairs.find(knmatch)==NodePairs.end())
00327 NodePairs.insert(node_pair_type(knmatch, kn));
00328 }
00329 }
00330 }
00331 }
00332 }
00333 std::cerr << std::endl;
00334 }
00335
00336 virtual void SetNodePairs(int listequiv[][2]){
00337 int i = 0;
00338 for (node_pair_list_type::iterator npit=NodePairs.begin();
00339 npit!=NodePairs.end(); npit++, i++) {
00340 listequiv[i][0]=(*npit).second;
00341 listequiv[i][1]=(*npit).first;
00342 }
00343 NodePairs.clear();
00344 }
00345
00346 virtual int NFacetsOnSurface() {
00347 int dummy[1][4];
00348 int ksurf=0;
00349 for (int kn=0; kn<6; kn++) {
00350 int d=kn/2;
00351 BBoxList surflist;
00352 typename block_list_type::iterator bit;
00353 for (bit=BlockList().begin();bit!=BlockList().end(); bit++) {
00354 BBox bbnodes(growupper((*bit)->DB().bbox(),1));
00355 if (kn%2) bbnodes.upper(d) = bbnodes.lower(d);
00356 else bbnodes.lower(d) = bbnodes.upper(d);
00357 surflist.add(bbnodes);
00358 }
00359 for (bit=BlockList().begin();bit!=BlockList().end(); bit++)
00360 (*bit)->SetSurfaces(kn, surflist, ksurf, dummy, 0);
00361 }
00362 return ksurf;
00363 }
00364
00365 virtual void SetSurfaces(int nsurf[][2], int surf[], int scel[][4],
00366 char tsurf[][20]) {
00367 int ksurf = 0;
00368 for (int kn=0; kn<6; kn++) {
00369 int d=kn/2;
00370 BBoxList surflist;
00371 typename block_list_type::iterator bit;
00372 for (bit=BlockList().begin();bit!=BlockList().end(); bit++) {
00373 BBox bbnodes(growupper((*bit)->DB().bbox(),1));
00374 if (kn%2) bbnodes.upper(d) = bbnodes.lower(d);
00375 else bbnodes.lower(d) = bbnodes.upper(d);
00376 surflist.add(bbnodes);
00377 }
00378 for (bit=BlockList().begin();bit!=BlockList().end(); bit++)
00379 (*bit)->SetSurfaces(kn, surflist, ksurf, scel, 1);
00380 nsurf[kn][0] = ksurf;
00381 nsurf[kn][1] = SurfaceDisp[kn];
00382 }
00383 strcpb(tsurf[0],"West",20);
00384 strcpb(tsurf[1],"East",20);
00385 strcpb(tsurf[2],"Bottom",20);
00386 strcpb(tsurf[3],"Top",20);
00387 strcpb(tsurf[4],"Front",20);
00388 strcpb(tsurf[5],"Back",20);
00389
00390 std::cerr << "Actual ksurf: " << ksurf << std::endl;
00391 }
00392
00393 virtual void Draw3D() {
00394 DrawFrameAroundGrid();
00395 Draw3DGrids();
00396 Draw3dCrossSections();
00397
00398
00399 }
00400
00401 void Draw3DGrids() {
00402 for (typename block_list_type::iterator bit=BlockList().begin();
00403 bit!=BlockList().end(); bit++)
00404 if (base::PlotLevel[(*bit)->Level()] > 0)
00405 (*bit)->Draw3DGrids();
00406 }
00407
00408 void Draw3dCrossSections() {
00409 if(_PlotCrossSection>0){
00410 for (typename block_list_type::iterator bit=BlockList().begin();
00411 bit!=BlockList().end(); bit++)
00412 if (base::PlotLevel[(*bit)->Level()] != 0)
00413 (*bit)->Draw3DCrossSections();
00414 }
00415 }
00416
00417 void DrawOrigin() {
00418 int itype = 3;
00419 int icolor = 1;
00420 int np = 1*2;
00421 float radii = 0.;
00422 int intzero = 0;
00423 float linesx[2*3] = { 5., 0., 0., 0., 0., 0.};
00424 GeomMapField(linesx, 2*3);
00425 float colorx[2] = { 0., 0.,};
00426 V3_OBJECT3D(&itype, &icolor, linesx, &radii, colorx, &intzero, &np);
00427
00428 float linesy[2*3] = { 0., 5., 0., 0., 0., 0.};
00429 GeomMapField(linesy, 2*3);
00430 float colory[2] = {0.5, 0.5};
00431 V3_OBJECT3D(&itype, &icolor, linesy, &radii, colory, &intzero, &np);
00432
00433 float linesz[2*3] = { 0., 0., 5., 0., 0., 0.};
00434 GeomMapField(linesz, 2*3);
00435 float colorz[2] = { 1., 1.};
00436 V3_OBJECT3D(&itype, &icolor, linesz, &radii, colorz, &intzero, &np);
00437
00438 float floatzero = 0.;
00439 itype = 1;
00440 np = 2*3;
00441 float trianglesx[2*3*3] = { 6., 0., 0., 5., .5, 0., 5.,-.5, 0.,
00442 6., 0., 0., 5., 0., .5, 5., 0.,-.5};
00443 GeomMapField(trianglesx, 2*3*3);
00444 float tricolorx[2*3] = { 0., 0., 0., 0., 0., 0.};
00445 V3_OBJECT3D(&itype, &icolor, trianglesx, &radii, tricolorx, &intzero, &np);
00446
00447 float trianglesy[2*3*3] = { 0., 6., 0., .5, 5., 0.,-.5, 5., 0.,
00448 0., 6., 0., 0., 5., .5, 0., 5.,-.5};
00449 GeomMapField(trianglesy, 2*3*3);
00450 float tricolory[2*3] = { 0.5, 0.5, 0.5, 0.5, 0.5, 0.5};
00451 V3_OBJECT3D(&itype, &icolor, trianglesy, &radii, tricolory, &intzero, &np);
00452
00453 float trianglesz[2*3*3] = { 0., 0., 6., 0., .5, 5., 0.,-.5, 5.,
00454 0., 0., 6., .5, 0., 5.,-.5, 0., 5.};
00455 GeomMapField(trianglesz, 2*3*3);
00456 float tricolorz[2*3] = { 1., 1., 1., 1., 1., 1.};
00457 V3_OBJECT3D(&itype, &icolor, trianglesz, &radii, tricolorz, &intzero, &np);
00458
00459 icolor = 0;
00460 itype = 5;
00461 np = 1;
00462 float midpoint[1*3] = { 0., 0., 0.};
00463 radii = .5*base::dx[0];
00464 V3_OBJECT3D(&itype, &icolor, midpoint, &radii, &floatzero, &intzero, &np);
00465 }
00466
00467 void DrawXYZ(){
00468 int itype = 0;
00469 int icolor = 1;
00470 int np = 2*4;
00471 float radii = 0.;
00472 int intzero = 0;
00473 float slashx[2*4*3] = { 6,-1,-1,6.5,-1,-1,8,-4,-1,7.5,-4,-1,
00474 7.5,-1,-1,8,-1,-1,6.5,-4,-1,6,-4,-1};
00475 GeomMapField(slashx, 2*4*3);
00476 float colorx[2*4] = { 0,0,0,0,0,0,0,0};
00477 V3_OBJECT3D(&itype, &icolor, slashx, &radii, colorx, &intzero, &np);
00478
00479 float slashy[2*4*3] = { -1.5,8,-1,-1,8,-1,-2.5,5,-1,-3,5,-1,
00480 -3,8,-1,-2.5,8,-1,-2,6.5,-1,-2.42,6,-1};
00481
00482 GeomMapField(slashy, 2*4*3);
00483 float colory[2*4] = { 0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5};
00484 V3_OBJECT3D(&itype, &icolor, slashy, &radii, colory, &intzero, &np);
00485
00486 np=3*4;
00487 float slashz[3*4*3] = { -3,-1,7,-1,-1,7,-1,-1.5,7,-3,-1.5,7,
00488 -1.5,-1,7,-1,-1,7,-2.5,-4,7,-3,-4,7,
00489 -3,-3.5,7,-1,-3.5,7,-1,-4,7,-3,-4,7};
00490
00491 GeomMapField(slashz, 3*4*3);
00492 float colorz[3*4] = {1,1,1,1,1,1,1,1,1,1,1,1};
00493 V3_OBJECT3D(&itype, &icolor, slashz, &radii, colorz, &intzero, &np);
00494 }
00495
00496 void DrawFrameAroundGrid() {
00497 float radii = 0.;
00498 float floatzero = 0.;
00499 int intzero = 0;
00500 int itype = 4;
00501 int icolor = 0;
00502 int np = 5;
00503 float line1[5*3] = { base::geom[0], base::geom[2], base::geom[4],
00504 base::geom[0], base::geom[3], base::geom[4],
00505 base::geom[1], base::geom[3], base::geom[4],
00506 base::geom[1], base::geom[2], base::geom[4],
00507 base::geom[0], base::geom[2], base::geom[4] };
00508 V3_OBJECT3D(&itype, &icolor, line1, &radii, &floatzero, &intzero, &np);
00509
00510 float line2[5*3] = { base::geom[0], base::geom[2], base::geom[5],
00511 base::geom[0], base::geom[3], base::geom[5],
00512 base::geom[1], base::geom[3], base::geom[5],
00513 base::geom[1], base::geom[2], base::geom[5],
00514 base::geom[0], base::geom[2], base::geom[5] };
00515 V3_OBJECT3D(&itype, &icolor, line2, &radii, &floatzero, &intzero, &np);
00516
00517 itype = 3;
00518 np = 2*4;
00519 float lines[2*4*3] = { base::geom[0], base::geom[2], base::geom[4],
00520 base::geom[0], base::geom[2], base::geom[5],
00521 base::geom[0], base::geom[3], base::geom[4],
00522 base::geom[0], base::geom[3], base::geom[5],
00523 base::geom[1], base::geom[2], base::geom[4],
00524 base::geom[1], base::geom[2], base::geom[5],
00525 base::geom[1], base::geom[3], base::geom[4],
00526 base::geom[1], base::geom[3], base::geom[5]};
00527 V3_OBJECT3D(&itype, &icolor, lines, &radii, &floatzero, &intzero, &np);
00528 }
00529
00530 virtual const int& Equiv() const { return _Equiv; }
00531 virtual int Kequiv() const { return NodePairs.size(); }
00532
00533 virtual void BlockListAppend(hdata_block_type& workdata, BBox& bb, int& comp, int& Level,
00534 int& proc, float* dx, float* geom) {
00535 BlockList().push_back(new data_block_type(*this, workdata, bb, comp,
00536 TheEvaluator(), Level, proc, dx, geom));
00537 }
00538
00539 block_list_type& BlockList() { return (block_list_type &)*base::_BlockList; }
00540 block_list_type& BlockList() const { return (block_list_type &)*base::_BlockList; }
00541
00542 virtual void register_at(ControlDevice& Ctrl,const std::string& prefix) {
00543 base::register_at(Ctrl,prefix); }
00544 virtual void register_at(ControlDevice& Ctrl) {
00545 register_at(Ctrl, ""); }
00546 virtual int NCells() { return base::NCells(); }
00547 virtual int NNodes() { return base::NNodes(); }
00548 virtual void SetBlocks(int blocks[]) { base::SetBlocks(blocks); }
00549 virtual void SetGridCells(float xyz[][3]) {
00550 base::SetGridCells(xyz); }
00551 virtual void SetGridNodes(float xyz[][3]) {
00552 base::SetGridNodes(xyz); }
00553 virtual void SetGridConns(int con[][8]) {
00554 base::SetGridConns(con); }
00555 virtual void SetScalCells(int *key,float v[]) {
00556 base::SetScalCells(key,v); }
00557 virtual void SetScalNodes(int *key,float v[]) {
00558 base::SetScalNodes(key,v); }
00559 virtual void VectNodes(int *key,float v[][3]) {
00560 base::VectNodes(key,v); }
00561 virtual void VectCells(int *key,float v[][3]) {
00562 base::VectCells(key,v); }
00563 virtual int Size() const { return base::Size(); }
00564 virtual const int& MinLevel() const { return base::MinLevel(); }
00565 virtual const int& MaxLevel() const { return base::MaxLevel(); }
00566 virtual const int& NLevels() const { return base::NLevels(); }
00567 virtual const int& RefineFactor(const int l) const {
00568 return base::RefineFactor(l); }
00569 virtual const BBox& GlobalBBox() const {
00570 return base::GlobalBBox(); }
00571 virtual const int& FKeys() const { return base::FKeys(); }
00572 virtual evaluator_type& TheEvaluator() const {
00573 return base::TheEvaluator(); }
00574 virtual evaluator_type& TheEvaluator() {
00575 return base::TheEvaluator(); }
00576 virtual float64 RealTime() const { return base::RealTime(); }
00577 virtual void SetUpdateName(std::string* iname) {
00578 base::SetUpdateName(iname); }
00579 virtual std::string* UpdateName() { return base::UpdateName(); }
00580 virtual std::string* UpdateName() const {
00581 return base::UpdateName(); }
00582
00583 private:
00584 void GeomMapField(float field[], int size) {
00585 for (int i=0; i<size; i+=3) {
00586 field[i] *= base::dx[0]; field[i+1] *= base::dx[1]; field[i+2] *= base::dx[2];
00587 field[i] += base::geom[0]; field[i+1] += base::geom[2]; field[i+2] += base::geom[4];
00588 }
00589 }
00590
00591 private:
00592 int _Equiv;
00593 node_pair_list_type NodePairs;
00594 int SurfaceDisp[NSURF];
00595 float CrossPlane[9];
00596 int _PlotCrossSection;
00597 };
00598
00599 #endif