Most of this code depends heavily on the code
of Michael Gibbons, Raj, and Kevin Coletta (irregular decomposition). In
this overview, I attempt to explain the most important functions to the end
user. I am not attempting to give a thorough explanation behind how they
work, nor am I going over every function that I have written.
Construction of the SG2
Function for SG
Functions for SG2
Operations of Functions on the Gasket
Functions for the Finite Element Method
Functions Specific to Certain Equations
I/O Functions
1 Construction of the SG2
The SG2 is simply the product of two Sierpinski gaskets. Thus,
many of the functions combine two factors of SG.
1.1 pd_gasket
Description: Makes a gasket of regular decomposition. Function:
pd_gasket(m)
Arguments: m - the depth of the regular decomposition of the SG2
Output: Gasket of depth m.
1.2 pd_gasket_irreg
Description: Makes a gasket of irregular decomposition.
Function: pd_gasket_irreg(wordlist)
Arguments: wordlist - a product wordlist of cells to extend the gasket to.
Usually, one makes an irregular decomposition with Kevin Coletta's
reg_wordlist, zoom_wordlist, and subdivid_irreg, then calls the
wordlist_makeprod to get a product wordlist
Output: Irregularly decomposed gasket, as described by wordlist
1.3 wordlist_makeprod
Description: Calculates the product of a wordlist with itself (that
describes a decomposition of SG) for SG2
Function: wordlist_makeprod(wordlist)
Arguments: wordlist - decomposition of an SG
Output: Product of two wordlist's.
1.4 wordlist_combine
Description: Calculates the product of two wordlists for SG2
Function: wordlist_combine(wordlist1,wordlist2)
Arguments: wordlist - decomposition of SG¢;
wordlist2 - decomposition of SG¢¢.
Output: Product wordlist of the two wordlist arguments.
1.5 pd_vertices_irreg
Description: Computes a list of vertices
Function: pd_vertices_irreg(wordlist)
Arguments: wordlist - decomposition of an SG2
Output: List of vertices, decomposed according to wordlist
1.6 pd_vertices
Description: Computes a list of vertices, regularly decomposed. WARNING -
may be slow for detailed SG2
Function: pd_vertices(m)
Arguments: m - depth of vertices
Output: List of vertices of SG2, decomposed to level m.
1.7 pd_calc_biharms
Description: Generates the pluriharmonic basis elements for SG2.
There are 27 basis elements in all. Look through the paper for a description
of them.
Function: pd_calc_biharms(T,R,vm,SG_lvl,func)
Arguments: T - product gasket. R - throwback to Gibbons code; it helps
create biharmonic functions on the SG. Always pass R. vm - list of vertices
for T. SG_lvl - depth of the Sierpinski gasket to compute to. func -
function number to save the first basis element to. pd_calc_biharms will
utilize every function slot from func to func+27.
Output: The 27 pluribiharmonic basis functions will be saved in T (to depth
SG_lvl) in function slots func to func+27.
1.8 wordlist_seperate
Description: Seperates the product wordlist in the argument to two
wordlists in the factors (properly sorted!).
Function: wordlist_seperate(wordlist)
Arguments: wordlist - a product wordlist to seperate.
Output: The return value is a list of the two seperate wordlists, ie,
[retVal1,retVal2], where retVal1 is the wordlist for the first factor and
retVal2 is the wordlist for the second factor.
1.9 pd_make_neighbors
Description: Determines the neighboring points of a SG2, and
saves them to the gasket
Function: pd_make_neighbors(T,m_basis,vert)
Arguments: T - gasket to save the neighbors to (regular decomposition).
m_basis - depth to compute vertices to. vert - vertex list of T.
Output: Function slots 1 through 16 in T are filled up with the neighbors of
points in T.
1.10 pd_make_neighbors_irreg
Description: Determines the neighboring points of a SG2, and
saves them to the gasket
Function: pd_make_neighbors_irreg(T,W)
Arguments: T - gasket to save the neighbors to (irregular decomposition). W
- decomposition of T.
Output: Function slots 1 through 16 in T are filled up with the neighbors of
points in T.
Go to top
2 Functions for SG
2.1 isElementOf
Description: Determines if a point is an element of a gasket (works with
SG2 also)
Function: isElementOf(T,elem)
Arguments: T - gasket to analyze. elem - possible point within that gasket.
Output: The function returns true if elem is within T, false otherwise.
2.2 calc_cell_address
Description: Calculates the cell address on the SG of a given 3 points.
Function: calc_cell_address(points)
Arguments: points - list of 3 points which the procedure will calculate the
cell address of.
2.3 next_cells
Description: Calculates the 3 immediate subcells of a given cell.
Function: next_cells(cell)
Arguments: cell - SG cell to ``break-apart".
Output: The 3 subcells of cell.
Go to top
3 Functions for SG2
3.1 pd_Cross
Description: Makes the cross product of its arguments
Function: pd_Cross(cell1, cell2)
Arguments: cell1 - cell of SG¢. cell2 - cell of
SG¢¢.
Output: The cross product of cell1 and cell2, a cell in SG2
3.2 bottom_lvl
Description: Determines if a given cell is at the bottom level of an SG2.
Function: bottom_lvl(T,cell)
Arguments: T - gasket to analyze. cell - cell (list of 9 points) to work
with.
Output: The function returns true if cell is in the bottommost level of T,
false otherwise.
3.3 pd_points_lower
Description: Finds all the points within a cell.
Function: pd_points_lower(T, cell)
Arguments: T - gasket we are working with. cell - cell (list of 9 points) to
find the points in.
Output: The function returns a list of points that are within cell,
including the boundary of cell.
3.4 pd_cross_func
Description: Creates a function on SG2 as the product of two
SG functions.
Function: pd_cross_func(T, vm, SG_T, SG_T2, func1, func2, work)
Arguments: T - gasket to save the new function to. vm - vertex list that
describes T. SG_T - SG used as factor 1. SG_T2 - SG used as factor 2. func1
- function within SG_T to use. func2 - function within SG_T2 to use. work -
function in T to save the cross to.
Output: The function func1 multiplied by func2, saved in T in function slot
work.
3.5 pd_next_cells
Description: Calculates the 9 immediate subcells of a given cell.
Function: pd_next_cells(cell)
Arguments: cell - SG2 cell to ``break-apart".
Output: The 9 subcells of cell.
3.6 pd_calc_cell_address
Description: Calculates the cell address of a given 9 points.
Function: pd_calc_cell_address(points)
Arguments: points - list of 9 points which the procedure will calculate the
cell address of.
Go to top
4 Operations of Functions on the Gasket
4.1 pd_integrate_func
Description: Integrates a function.
Function: pd_integrate_func(T,func_pl,{Cell})
Arguments: T - a gasket with a function described in func_pl. func_pl - the
slot of the function to be integrated. Cell - this is an optional argument.
If you just want to integrate a function inside a certain cell (including
the boundary), specify the 9 boundary points of that cell here. Must be a
valid cell (There is no error checking to see if this is valid. I have no
clue what will happen if it isn't one - ideally it'd cause an error, but it
may just give you an invalid answer. If the Cell argument is not given, then
the integral is taken over the entire gasket.
Output: The integral of the function func_pl in T on Cell.
4.2 pd_integrate_func_basis
Description: Computes òf fdm
for a general function f and a basis element f.
f is selected by argument i1 - the point where
f = 1 if it is of f type, or where
¶n f = 1 if
f is of g type.
Function: pd_integrate_func_basis(T,S,func_pl,harmonic_pl,work_pl, i1)
Arguments: T - gasket that includes f. S - spline gasket. func_pl - slot in
T where f is stored. harmonic_pl - slot in T where the first PBH basis
element is stored. work_pl - empty slot where temporary work can be placed.
i1 - point which signifies basis element.
Output: The integral of the function times the basis element in T.
4.3 pd_elem_mult
Description: Multiplies two functions together.
Function: pd_elem_mult(T,func1,func2,work,{Cell})
Arguments: T - gasket that contains the two functions to multiply. func1 -
first function to multiply. func2 - other function. work - where to store
the output of the function. {Cell} - optional argument, the cell to multiply
the functions over.
Output: The two input functions multiplied together and stored in work. If
Cell is given, the function only works over that cell. func2 is resized to
fit into that cell, and func1 is multiplied against the resized func2.
4.4 pd_Laplacian
Description: Calculates the Laplacian of a function.
Function: pd_Laplacian(T,func,work)
Arguments: T - gasket that is used. func - function to take the Laplacian
of. work - function slot to replace result in.
Output: Stores the Laplacian of func in work in T.
4.5 set_const
Description: Sets a function slot to a constant.
Function: set_const(T, vm, func, const)
Arguments: T - gasket to work with. vm - corresponding vertex list. func -
function to set constant. const - constant to set function to.
Output: Function in func in T is identically const.
Go to top
5 Functions for the Finite Element Method
5.1 pd_calc_biharms
Description: Calculates the biharmonic basis functions for the product,
and saves them to a gasket.
Function: pd_calc_biharms(T,R,vm,SG_lvl,func)
Arguments: T - gasket to save basis functions to. R - always pass the second
argument as R (throwback to the older Gibbons code). vm - vertex list that
corresponds to T. SG_lvl - the deepest level in the gasket to compute to
(because the underlying code is not set up for irregular decomposition).
func - function to save the biharmonic basis to. There are 27 functions, so
this procedure will use up each slot from func to func+27.
Output: The biharmonic basis functions in slots func to func+27 in T.
5.2 pd_reconstruct_func
Description: Reconstructs a function to point values, given a vector that
expresses the function in terms of the spline basis.
Function: pd_reconstruct_func(T,W,vm2,sol,harm,func)
Arguments: T - gasket to reconstruct the function to, also holds the
biharmonic basis. W - wordlist that decomposes the SPLINE (not the gasket
T). vm2 - vertex list for the GASKET (not the spline). sol - valid solution
vector. harm - number corresponding to the function slot beginning of the
harmonic basis functions in T. func - function slot to save the
reconstructed function to.
Output: The reconstructed function in slot func in T.
5.3 pd_integrate_f_basis
Description: Integrates a function against all of the spline basis
elements, returns a vector, which is the function representation in the
spline space.
Function: pd_integrate_f_basis(T,S,W2,W,func,harm,work)
Arguments: T - gasket containing the function. S - spline to use. W2 -
wordlist that corresponds to T. W - wordlist corresponding to S. func -
function to integrate against. harm - start of the harmonic functions. work
- slot that the procedure can save its temporary work to (any previous data
will be destroyed)
Output: A vector that describes the function in the spline basis.
5.4 pd_func_vector
Description: A vector that describes the order of the spline basis
functions.
Function: pd_func_vector(W)
Arguments: W - wordlist that describes the spline decomposition.
Output: A vector that describes the spline basis functions. See the internal
data structures section for more info.
5.5 pd_gen_energy_matrix_h
Description: Generates the energy matrix for harmonic functions, based on
regular decomposition.
Function: pd_gen_energy_matrix_h(S,m,vm)
Arguments: S - the spline gasket. m - approximation depth of gasket depth to
create the energy matrix for. vm - vertex list corresponding to S.
Output: A vm-by-vm matrix that describes the energy of the pluriharmonic
basis elements.
5.6 pd_gen_energy_matrix
Description: Generates the energy matrix for biharmonic functions, based
on regular decomposition.
Function: pd_gen_energy_matrix_h(S,m,vm)
Arguments: S - the spline gasket. m - approximation depth of gasket to
create the energy matrix for. vm - vertex list corresponding to S.
Output: A matrix that describes the energy of the pluribiharmonic basis
elements.
5.7 pd_gen_energy_matrix_irreg
Description: Generates the energy matrix for biharmonic functions, based
on irregular decomposition.
Function: pd_gen_energy_matrix_h(S,W)
Arguments: S - the spline gasket. W - wordlist decomposition of S
Output: A matrix that describes the energy of the pluribiharmonic basis
elements.
5.8 pd_gen_energy_matrix_irreg_2
Description: Generates the energy matrix for biharmonic functions, based
on irregular decomposition and an alternate differential operator.
Function: pd_gen_energy_matrix_h(S,W,val)
Arguments: S - the spline gasket. W - wordlist decomposition of S. val -
constant for the differential operator. Reference the ``Other Differential
Operators" section.
Output: A matrix that describes the energy of the pluribiharmonic basis
elements, based on the differential operator D =
D¢- val D¢¢
5.9 pd_gen_iprod_matrix_h
Description: Generates the Gram matrix for harmonic functions, based on
regular decomposition.
Function: pd_gen_iprod_matrix_h(S,m,vm)
Arguments: S - the spline gasket. m - approximation depth of gasket depth to
create the energy matrix for. vm - vertex list corresponding to S.
Output: A vm-by-vm matrix that describes the integral of the pluriharmonic
basis elements.
5.10 pd_gen_iprod_matrix
Description: Generates the Gram matrix for biharmonic functions, based on
regular decomposition.
Function: pd_gen_iprod_matrix_h(S,m,vm)
Arguments: S - the spline gasket. m - approximation depth of gasket to
create the energy matrix for. vm - vertex list corresponding to S.
Output: A matrix that describes the integral of the pluribiharmonic basis
elements.
5.11 pd_gen_iprod_matrix_irreg
Description: Generates the Gram matrix for biharmonic functions, based on
irregular decomposition.
Function: pd_gen_iprod_matrix_h(S,W)
Arguments: S - the spline gasket. W - wordlist decomposition of S
Output: A matrix that describes the integral of the pluribiharmonic basis
elements.
Go to top
6 I/O Functions
Section to come!
Go to top
7 Functions specific to certain equations
Still working on this section!
Go to top