In psi.f, you'll find 3 lines of this form:

PXI=PXI+PSI3(I1,I2,I3,NIT(NB),NU,XI)*XE(NS) 

Instead you'll want a call like this:

PXI=PXI+PG_XI(NS,NU,NGPI,NB)*XE(NK) 

Where PG_XI is a new data structure that will need to be passed everywhere that psi.f is called. At some higher level location (perhaps as high as python) PG_XI will be calculated once for a single element for various XI values, NGPI=1,...NGPIT (grid points). This can be done during the Calculate mesh command. In other words, as long as XI1, XI2, and XI3 are not varying between elements you only need to calculate this once.

The new PG

The only other complication might be that XI1, XI2, and XI3 listed above will need to be integers rather than reals: you cannot index an array with anything other than an integer. So some mapping may be needed to make this work properly.

As a first step, PG_XI will simply be calculated using the old PSI3 function. Once this works, you can have the user dynamically author PSI3 (perhaps using sympy to generate some C).

ADM Notes 2011-Jan-30

Continuity/Documentation/DeveloperDocs/BasisFunctionRefactor (last edited 2011-02-26 23:34:09 by AndrewMcCulloch)