コード例 #1
0
ファイル: Mesh2DUtils.C プロジェクト: VibekeSkytt/GoTools
// =============================================================================
int Mesh2DUtils::search_downwards_for_nonzero_multiplicity(const Mesh2D& m, 
							   Direction2D d, 
							   int start_ix, int other_ix)
// =============================================================================
{
  // provided that the mesh is a valid LR mesh, a valid index should always be found.
  int ix;
  for (ix = start_ix; ix != 0 && m.nu(d, ix, other_ix, other_ix + 1) == 0; --ix);
  return ix;
}
コード例 #2
0
ファイル: Mesh2DUtils.C プロジェクト: VibekeSkytt/GoTools
//==============================================================================
int Mesh2DUtils::search_upwards_for_nonzero_multiplicity(const Mesh2D& m, 
							 Direction2D d, 
							 int start_ix, int other_ix)
//==============================================================================
{
  // provided that the mesh is a valid LR mesh, a valid index should always be found.
  int ix;
  for (ix = start_ix; ix != m.numDistinctKnots(d) && m.nu(d, ix, other_ix - 1, other_ix) == 0; ++ix);
  return ix;  // @@ not yet tested!
}
コード例 #3
0
ファイル: LRBSpline2DUtils.C プロジェクト: VicoLiang/GoTools
// Derive the knotvector resulting from moving along the u-direction (if d == XFIXED) or
// v-direction (if d == YFIXED) from 'beg' to 'end', and  with multiplicities equal to
// the 'nu' value of the segment in the ortogonal direction, starting at 'orto_min' and
// extending to 'orto_max'.
//------------------------------------------------------------------------------
vector<int>
LRBSpline2DUtils::derive_knots(const Mesh2D& m, Direction2D d, int beg, int end,
                               int orto_min, int orto_max)
//------------------------------------------------------------------------------
{
    vector<int> result;
    for (int pos = beg; pos <= end; ++pos)
        result.insert(result.end(), m.nu(d, pos, orto_min, orto_max), pos); // 0 multiplicities will not be inserted

    return result;
}