Esempio n. 1
0
SweptElementData::SweptElementData(
                             EntityHandle shandle,
                             const int imin, const int jmin, const int kmin,
                             const int imax, const int jmax, const int kmax,
			     const int* /*Cq*/ ) 
    : SequenceData(0, shandle,
                   shandle + 
                   calc_num_entities( shandle, imax-imin, jmax-jmin, kmax-kmin )
                   - 1)
{
    // need to have meaningful parameters
  assert(imax >= imin && jmax >= jmin && kmax >= kmin);
    
  elementParams[0] = HomCoord(imin, jmin, kmin);
  elementParams[1] = HomCoord(imax, jmax, kmax);
  elementParams[2] = HomCoord(1, 1, 1);
  
    // assign and compute parameter stuff
  dIJK[0] = elementParams[1][0] - elementParams[0][0] + 1;
  dIJK[1] = elementParams[1][1] - elementParams[0][1] + 1;
  dIJK[2] = elementParams[1][2] - elementParams[0][2] + 1;
  dIJKm1[0] = dIJK[0] - 1;
  dIJKm1[1] = dIJK[1] - 1;
  dIJKm1[2] = dIJK[2] - 1;
}
Esempio n. 2
0
ScdElementData::ScdElementData(
    EntityHandle shandle,
    const int imin, const int jmin, const int kmin,
    const int imax, const int jmax, const int kmax,
    int *is_p)
    : SequenceData(0, shandle,
                   shandle +
                   calc_num_entities( shandle, imax-imin, jmax-jmin, kmax-kmin, is_p)
                   - 1)
{
    // need to have meaningful parameters
    assert(imax >= imin && jmax >= jmin && kmax >= kmin);

    isPeriodic[0] = (is_p ? is_p[0] : 0);
    isPeriodic[1] = (is_p ? is_p[1] : 0);

    boxParams[0] = HomCoord(imin, jmin, kmin);
    boxParams[1] = HomCoord(imax, jmax, kmax);
    boxParams[2] = HomCoord(1, 1, 1);

    // assign and compute parameter stuff
    dIJK[0] = boxParams[1][0] - boxParams[0][0] + 1;
    dIJK[1] = boxParams[1][1] - boxParams[0][1] + 1;
    dIJK[2] = boxParams[1][2] - boxParams[0][2] + 1;
    dIJKm1[0] = dIJK[0] - (isPeriodic[0] ? 0 : 1);
    dIJKm1[1] = dIJK[1] - (isPeriodic[1] ? 0 : 1);
    dIJKm1[2] = dIJK[2] - 1;
}