Guest User

Untitled

a guest
Jul 12th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Initialization variables:
  2. a = p+1;
  3. b = a+1;
  4. nb = 1;
  5. c1 = 0;
  6. c1 (nt+1) = 1;
  7. mbar = p + 2 + nt + m;
  8. ki = 1;
  9. si = 1;
  10. while b < mbar do
  11. cnb+1 = 0; // Initialize the next extraction operator row.
  12. // Count multiplicity of the knot at location b.
  13. add = 0;
  14. if si <= m && spans(si) = ki do
  15. mult = 0;
  16. add = 1;
  17. // Add the new knot to the knot vector.
  18. Ubar(b+1:mbar+p-m+si) = Ubar(b:mbar+p-m+si-1);
  19. Ubar(b) = U(si);
  20. si = si + 1;
  21. else
  22. ki = ki+1;
  23. i = b;
  24. while b < m && Ubar(b+1) == Ubar(b) do b = b+1;
  25. mult = b-i+1;
  26. end
  27. if
  28. mult < p do
  29. numer = Ubar(b)-Ubar(a);
  30. for j = p,p-1,. . .,mult+1 do
  31. alphas(j-mult) = numer / (Ubar(a+j+add)-Ubar(a));
  32. end
  33. r = p-mult;
  34. // Update the matrix coefficients for r new knots
  35. for j=1,2,. . .,r do
  36. save = r-j+1;
  37. s = mult+j;
  38. for k=p+1,p,. . .,s+1 do
  39. alpha = alphas(k-s);
  40. cnb (k) = alpha*cnb (k) + (1.0-alpha)*cnb (k-1);
  41. end
  42. if b < m do
  43. // Update overlapping coefficients of the next operator row.
  44. cnb+1 (save) = cnb (p+1);
  45. end
  46. end
  47. nb = nb + 1; // Finished with the current operator.
  48. if b < m
  49. do
  50. // Update indices for the next operator.
  51. a = b;
  52. Copyright ᭧ 2011 John Wiley & Sons, Ltd.
  53. Int. J. Numer. Meth. Engng 2011; 88:126156
  54. DOI: 10.1002/nme
  55. ISOGEOMETRIC FINITE ELEMENT DATA STRUCTURES FOR T-SPLINES
  56. 145
  57. b = b+1;
  58. end
  59. end
  60. end
Add Comment
Please, Sign In to add comment