Changeset 3943


Ignore:
Timestamp:
Sep 21, 2013 5:44:40 PM (8 years ago)
Author:
ldelgass
Message:

Fix vector magnitude computation in nanovis VTK reader

Location:
trunk/packages/vizservers/nanovis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/FlowCmd.cpp

    r3936 r3943  
    309309        return TCL_ERROR;
    310310    }
    311 #if 0
    312     TRACE("nx = %d ny = %d nz = %d",
    313           unirect->xNum(), unirect->yNum(), unirect->zNum());
    314     TRACE("x0 = %lg y0 = %lg z0 = %lg",
    315           unirect->xMin(), unirect->yMin(), unirect->zMin());
    316     TRACE("lx = %lg ly = %lg lz = %lg",
    317           unirect->xMax() - unirect->xMin(),
    318           unirect->yMax() - unirect->yMin(),
    319           unirect->zMax() - unirect->zMin());
    320     TRACE("dx = %lg dy = %lg dz = %lg",
    321           unirect->xNum() > 1 ? (unirect->xMax() - unirect->xMin())/(unirect->xNum()-1) : 0,
    322           unirect->yNum() > 1 ? (unirect->yMax() - unirect->yMin())/(unirect->yNum()-1) : 0,
    323           unirect->zNum() > 1 ? (unirect->zMax() - unirect->zMin())/(unirect->zNum()-1) : 0);
    324     TRACE("magMin = %lg magMax = %lg",
    325           unirect->magMin(), unirect->magMax());
    326 #endif
    327311    if (unirect != NULL) {
     312        TRACE("nx = %d ny = %d nz = %d",
     313              unirect->xNum(), unirect->yNum(), unirect->zNum());
     314        TRACE("x0 = %lg y0 = %lg z0 = %lg",
     315              unirect->xMin(), unirect->yMin(), unirect->zMin());
     316        TRACE("lx = %lg ly = %lg lz = %lg",
     317              unirect->xMax() - unirect->xMin(),
     318              unirect->yMax() - unirect->yMin(),
     319              unirect->zMax() - unirect->zMin());
     320        TRACE("dx = %lg dy = %lg dz = %lg",
     321              unirect->xNum() > 1 ? (unirect->xMax() - unirect->xMin())/(unirect->xNum()-1) : 0,
     322              unirect->yNum() > 1 ? (unirect->yMax() - unirect->yMin())/(unirect->yNum()-1) : 0,
     323              unirect->zNum() > 1 ? (unirect->zMax() - unirect->zMin())/(unirect->zNum()-1) : 0);
     324        TRACE("magMin = %lg magMax = %lg",
     325              unirect->magMin(), unirect->magMax());
     326
    328327        flow->data(unirect);
    329328    } else {
  • trunk/packages/vizservers/nanovis/VtkDataSetReader.cpp

    r3935 r3943  
    120120            vtkIdType idx = resampledDataSet->ComputePointId(loc);
    121121            resampledDataSet->GetPointData()->GetVectors()->GetTuple(idx, vec);
    122             val = sqrt(vec[0]*vec[0] + vec[1]*vec[1] * vec[2]*vec[2]);
     122            val = sqrt(vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]);
    123123            data[nindex] = (float)val;
    124124            data[nindex+1] = (float)vec[0];
     
    157157    }
    158158
     159    TRACE("isVectorData: %s", isVectorData ? "yes" : "no");
    159160    TRACE("nx = %i ny = %i nz = %i", nx, ny, nz);
    160161    TRACE("x0 = %lg y0 = %lg z0 = %lg", x0, y0, z0);
Note: See TracChangeset for help on using the changeset viewer.