Periodic spline

GEMPIC.SplinePPType
SplinePP( degree, ncells)
  • degree : degree of 1d spline
  • poly_coeffs : poly_coeffs[i,j] coefficient of $x^{deg+1-j}$ for ith B-spline function size= (degree+1, degree+1)
  • poly_coeffs_fp : poly_coeffs[i,j] coefficient of $x^{deg+1-j}$ for ith B-spline function size= (degree+1, degree+1)
  • ncells : number of gridcells
  • scratch_b : scratch data for b_to_pp-converting
  • scratch_p : scratch data for b_to_pp-converting
GEMPIC.b_to_ppMethod
b_to_pp( SplinePP, ncells, b_coeffs)

Convert 1d spline in B form to spline in pp form with periodic boundary conditions

GEMPIC.b_to_pp_1d_cell!Method
b_to_pp_1d_cell( self, b_coeffs, pp_coeffs )

Convert 1d spline in B form in a cell to spline in pp form with periodic boundary conditions

  • spline : arbitrary degree 1d spline
  • b_coeffs(self%degree+1) : coefficients of spline in B-form
  • pp_coeffs(self%degree+1) : coefficients of spline in pp-form
GEMPIC.b_to_pp_2d!Method
b_to_pp_2d!( pp, spl1, spl2, b)

Convert 2d spline in B form to spline in pp form

  • n_cells(2) : number of gridcells
  • b_coeffs : coefficients of spline in B-form
  • pp_coeffs : coefficients of spline in pp-form
GEMPIC.b_to_pp_2d_cell!Method
b_to_pp_2d_cell(spline1, spline2, b_coeffs, pp_coeffs, i, j)

Convert 2d spline in B form in a cell to spline in pp form with periodic boundary conditions

  • spline1 : arbitrary degree 1d spline
  • spline2 : arbitrary degree 1d spline
  • n_cells(2) : number of gridcells
  • bcoeffs(ncells(1)*n_cells(2)) : coefficients of spline in B-form
  • ppcoeffs((spline1.degree+1)*(spline2.degree+1),ncells(1)*n_cells(2)) : coefficients of spline in pp-form
GEMPIC.horner_1dMethod
horner_1d(degree, pp_coeffs, x, index)

Perform a 1d Horner schema on the pp_coeffs at index

GEMPIC.horner_2dMethod
horner_2d(degrees, pp_coeffs, position, indices, ncells)

Perform a 2d hornerschema on the pp_coeffs at the indices

  • degree : degree of the spline
  • pp_coeffs : coefficients of spline in pp-form
  • position(2) : point at which we evaluate our spline
  • indices(2) : indices of cell in which is x
  • ncells(2) : number of gridcells
  • res : value of the splinefunction at position
GEMPIC.horner_m_2d!Method
horner_m_2d!(val, spl1, spl2, degree, x)

Perform two times a 1d hornerschema on the poly_coeffs

  • val : array of values
  • degree : degree of the spline
  • x : point at which we evaluate our spline
GEMPIC.horner_primitive_1dMethod
horner_primitive_1d(val, degree, pp_coeffs, x)

Perform a 1d Horner schema on the pp_coeffs evaluate at x