關於部落格
  • 122904

    累積人氣

  • 31

    今日人氣

    0

    追蹤人氣

Maple - The m order Butcher Array

     local EA,EAt,k,alpha,beta,j,l;
  # The initial settings
  #   EA - the Equation Array of RK base
  #   EAt - the temp of EA[m-1]
  #   k - the stage of RK
  #   alpha - the array of {alpha[i,j]} of Butcher Array
  #   beta - the array of {beta[i]} of Butcher Array
  #   j,l - the loop index

  k:=3;
  EA:=array(1..k);
  alpha:=array(1..k,1..k);
  beta:=array(1..k);

  if m=1 then
    for l from 1 to k do
      EA[l]:=LB(k,l,rho,x);
    end do;
  else
    EAt:=BuAr(m-1,rho);
    for l from 1 to k do
      EA[l]:=int(EAt[l],x);
    end do;
  end if;
  
  for l from 1 to k do
    for j from 1 to k do
      alpha[j,l]:=simplify(int(EA[l],x=0..rho[j]));
    end do;
    beta[l]:=simplify(int(EA[l],x=0..1));
  end do;
  print(m,alpha);
  print(m,beta);

  return EA;
end:
相簿設定
標籤設定
相簿狀態