contents. * all.scm: add "obstacle.scm" to list of included files * describe.scm: add "obstacle.scm", final-tests-obstacle.scm to input file list. * final-tests-obstacle.scm: Use more iterations at fine level to calculate "true" solution. Test methods with more iterations. * make-tar: add obstacle.scm, final-tests-obstacle.scm Date: 2003/02/17 By B. Lucier * final-tests.scm (run-cg-tests): add definition and use of reference solution. Date: 2002/03/09 By B. Lucier * html.scm: Remove. * html-lib.scm: Add. Date: 2001/09/07 By B. Lucier * conjugate-gradient.scm: (diagonal-preconditioner)Use inverse of L_\infty operator norm of A for the smoothing parameter, instead of 5/8 times the L_\infty norm of A. (The other probably converges more quickly for plain multigrid, but the latter has some nice properties for the obstacle problem, I hope!) * final-tests-obstacle.scm. New file. * linear-algebra.scm: Add (call-next-method) to initialize! method for Matrix-operator. (Remember, the initialize! method must return the object it is initializing; the easiest way to do this is to always (call-next-method) at the end of each initialize! method.) * obstacle.scm: clean up. Date: 2001/08/30 By B. Lucier * multigrid.scm: Declare fixnum in diagonal-preconditioner (ugh). * conjugate-gradient.scm: Declare not interrupts-enabled in loops of smoothers. Date: 2001/08/30 By B. Lucier * linear-elements.scm: Have the initialize! method for Elements ensure that an element is the last items in its neighbors. * conjugate-gradient.scm: Remove functions diagonal-preconditioner and gauss-seidel-preconditioner. Add generics diagonal-preconditioner gauss-seidel-preconditioner, gauss-seidel-smoother!, richardson-smoother!, jacobi-smoother!. Add methods for Sparse-matrix-operator (taking into account new ordering of elements) and Linear-finite-element-operator. The smoothers can (and gauss-seidel-smoother! does) modify their second arguments, hence the bangs in the names. * final-tests.scm: Add bangs to the smoother names. * multigrid.scm: Add bangs to the smoother names, remove definitions of gauss-seidel-smoother, jacobi smoother, and richardson smoother. * sparse-linear-algebra.scm: Simplify code for Sparse-matrix-operator-mapping. In ->Sparse-matrix method for Sparse-matrix-operator, ensure that resulting rows are sorted; in ->Sparse-matrix-operator method for Sparse-matrix, ensure that diagonal element is at the end. Date: 2001/08/29By B. Lucier * final-tests.scm: (run-multigrid-tests) Run tests for various smoothers. * linear-elements-code.scm: Add Vector-Linf-norm method for Operator-with-matrix-implementation. * multigrid.scm: Add . rest arguments to MG-step-rest-arguments. (MG-step): Do coarse correction only when not at the coarsest level. Use regular smoothers at coarsest level. (MG-add-solver-information!): add smoother-maker and smoother-name arguments to generic. Use them in method for Multigrid-data. richardson-smoother, jacobi-smoother, gauss-seidel-smoother: Add. Date: 2001/08/23 By B. Lucier * linear-algebra.scm: Add an initialize! method for Matrix-class that adds domain? and range? fields. Add a with-access form to Operator-apply for a bit more error checking. * sparse-linear-algebra: Remove definitions of domain? and range? from initialize! method for Sparse-matrix-operator. Date: 2001/08/22 By B. Lucier * linear-algebra.scm: Remove the Vector class, it isn't needed (see comments for explanation); make Operator be a subclass of Object. Define generics Lattice-max and Lattice-min to work for f64vectors. Operator-apply had no methods defined for it, so I made it a reglar function. * linear-elements.scm: Define Lattice-max and Lattice-min methods for Linear-finite-element-vectors, but not for general Finite-element-vectors. Make Finite-element-vector a subclass of Object, not Vector. Date: 2001/08/22 By B. Lucier * multigrid.scm: Rename multigrid-arguments to multigrid-solver-arguments. Update method definitions and callers. Define MG-step-rest-arguments as generic; add method for Multigrid-data. Reorder arguments of MG-step, add a rest argument, update callers. Add rest argument to smoothers, update callers. Reverse g and z arguments of smoothers, update callers. All this is in preparation for using multigrid for obstacle problems. Date: 2001/08/09 By B. Lucier * all.scm: Remove (not interrupts-enabled) declaration (important for Gambit-C 4.0). * linear-algebra.scm: Add (not interrupts-enabled) to inner loops of vector operations on f64vectors. * multigrid.scm: (Multigrid-data) Allow triangulations, spaces, projectors and injectors to be uninitialized. (multigrid-arguments) add new generic, define method for Multigrid-data. (MG-solver) Make generic, define method for Multigrid-data; use multigrid-arguments. (MG-build-data) Make generic, define method for Multigrid-data, add argument for empty instance of Multigrid-data. (MG-add-operator-and-rhs-information!) Make generic, add method for Multigrid-data. (MG-propagate-level-information!) Same. (MG-add-solver-information!) Same. * sparse-linear-algebra.scm: Add (not interrupts-enabled) declaration to sparse matrix/vector multiplication loop. * final-tests.scm: Remove (not interrupts-enabled) declaration. Call MG-build-data with empty Multigrid-data object. Add more tests with more parameters to the multigrid-tests. * mg-results: Added more extensive tests. Date: 2001/04/16 By B. Lucier * Use updated Meroon with instantiate-from form. * conjugate-gradient.scm: Use instantiate-from instead of instance-clone + field-value-set!. * intergrid.scm: Tweak the mappint for the intergrid operators so that they pull the result word into cache earlier. * linear-elements.scm: Remove which-neighbor. Make Finite-element-vector-data immutable. In initialize! (x Finite-element-vector) use initialize-field-value! rather than field-value-set!. In various Vector-* methods for Finite-element-vectors, use instantiate-from rather than clone+field-value-set!. * sparse-linear-algebra.scm: In (initialize! (x Sparse-matrix-operator)), use initialize-field-value! rather than field-value-set!. In mapping field, load result word so it will be in cache earlier. Date: 2001/01/14 By B. Lucier * test-parabolic.scm: Use ->Linear-finite-element-operator; remove commented debugging print message. * test-mmoc.scm: Use ->Linear-finite-element-operator. * parabolic.scm: Ditto. * mmoc.scm: Ditto. Print every tenth timestep index to track progress. (We really need to use multigrid instead of conjugate-gradient as the solver in these time-dependent problems.) Date: 2001/01/14 By B. Lucier * sparse-linear-algebra.scm: Extensive rewrite to structure of Sparse-matrix-operator. Coefficients and indices are now single vectors (of various types) of nonzero coefficients and column locations (within a row) of the coefficients. offsets is a vector of offsets into coefficients and indices, itself indexed by rows. Define indices-{ref,set!,->list,length}, make-indices, list->indices as u32vector ops or vector ops depending on whether 32bit or 64bit fixnums (determined at compile time). Redefine sparse matrix multiply to use new structure. (Sparse-matrix-operator-increment-entry): New function. (->Sparse-matrix and ->Sparse-matrix-operator): Use new structure. (Sparse-matrix-operator-compress-coefficients): Remove. (Operator-adjoint): Don't use Sparse-matrix-operator-compress-coefficients (Vector-Linf-norm): Use new structure. (Operator->identity): Use new structure. * linear-elements-code.scm: Add offsets to Finite-element-operator. (initialize! Finite-element-operator): Use new structure. (->Linear-finite-element-operator): New, define for Linear-finite-element-space. (wrap-matrix-implementation-in-linear-finite-element-operator): New. (Vector-{add,subtract,scale,*axpy} for Linear-finite-element-operator): Use it. (Operator-compose, Operator->identity): Use it. (Operator-adjoint for Linear-finite-element-operator): Move from intergrid.scm. (Triangle-{stiffness,transport,mass}): Take matrix-implementation as argument instead of indices and coefficients. Use Sparse-matrix-operator-increment-entry. Change callers. (Edge-booundary-term): Ditto. * conjugate-gradient.scm: Rewrite to use new sparse matrix operator structure and ->Linear-finite-element-operator * multigrid.scm: Use projector->injector instead of Operator-adjoint. Use ->Linear-finite-element-operator. Change conjugate gradient max iterations at coarsest level to 20 from 200. * test.scm: Use ->Linear-finite-element-operator; change max conjugate-gradient iterations from 2000 to 200. * intergrid.scm: Define projector->injector, with a special matrix multiply routine for the injector. (coarse<-fine): Don't attempt to compress coefficients. * final-tests.scm: Use ->Linear-finite-element-operator. * describe.scm: Use get-output-string rather than close-output-port. Date: 2000/11/10 By B. Lucier * polygon.scm: 1 -> 1.0 in region declared flonum. * conjugate-gradient.scm: Try to speed Gauss-Seidel preconditioner. * mg-results: New results with Gambit-4.0a1. * cg-results: ditto. Date: 2000/08/28 By B. Lucier * parabolic.scm: New file; contains a parabolic solver for symmetric problems. Based on work by Mr. X. Yu. * test-parabolic.scm: New file, tests routine in parabolic.scm. * mmoc.scm: New file; contains routines to use the modified method of characteristics to solve transport-dominated diffusion problems. * test-mmoc.scm: New file; tests procedures in mmoc.scm. * final-tests.scm: Use Operator-adjoint instead of transpose. Date: 2000/08/21 By B. Lucier * utilities.scm: Define map1 and map2, rename mappend to mappend1, use map1 in mappend1. * sparse-linear-algebra.scm: Use map1, map2, and mappend1. * linear-elements-code.scm: Ditto. * intergrid.scm: Ditto. * polygon.scm: Ditto. * utilities.scm: Ditto. * geometry-code.scm: Ditto. * geometry.scm: Ditto. Date: 2000/08/21 By B. Lucier * linear-algebra.scm: Added class Matrix-operator, generics Operator-adjoint, Operator->indentity. * sparse-linear-algebra: Rename Sparse-matrix-vector to Sparse-matrix, make it a subclass of Matrix-operator, not Vector. Define Operator-adjoint and Operator-compose methods for Sparse-matrices. Make Sparse-matrix-operator a subclass of Matrix-operator. Define various methods for Sparse-matrix-operator and Sparse-matrix. Define Sparse-matrix-operator-compress-coefficients that removes copies of coefficient rows if they are the same. (Important for intergrid.scm.) * intergrid.scm: Define Operator-adjoint for Linear-finite-element-operator. * linear-elements-code.scm: Define the usual Vector methods for Linear-finite-element-operators. * multigrid.scm: Use Operator-adjoint instead of transpose; redo smoother operator to remove one vector subtraction. Date: 2000/06/21 By B. Lucier * html.scm: Completely revised, now a complete implementation of HTML 4.0 (without Netscape or Microsoft extensions) in Scheme. * describe.scm: Use new html.scm. Date: 2000/06/13 By B. Lucier * utilities.scm: Fix comment. * points.scm: New file that contains the Point routines. * linear-elements.scm: Define initialize! method for Finite-element-vector that builds a zero data vector if one is not given. No longer require to be initialized. * test.scm: Include points.scm declared (not core); have all coefficient functions take a Point as argument instead of two reals; do not initialize Linear-finite-element-data to zero. * sparse-linear-algebra.scm: in sparse-matrix-operator-mapping, remove a lot of the special cases for row lengths, start the general case with a non-zero value. * problem-descriptions.scm: in Problem-data, field description no longer needs to be initialized. * polygon.scm: Remove commented line. * multigrid.scm: No longer initialize Finite-element-vector-data to zero vector. * linear-elements-code.scm: Remove generic Edge-eval-at-midpoint; add generic Edge-midpoint. Define Edge-midpoint for Edges. Use it instead of Edge-eval-at-midpoint. * geometry.scm: Remove Point routines. Add triangle field to Boundary-edge. Initialize all Boundary-edge-triangle's in the initialize! method for Triangulation. Remove special triangle method for Curved-boundary-edge's. * final-tests. Include points.scm declared (not core). Rewrite all coefficients to take a Point as argument, not two reals. No longer use Triangulation-lexicographical-sort! of geometric objects. * curved-linear-elements-code.scm: Remove Edge-eval-at-midpoint method and add Edge-midpoint method for Curved-edge's. * conjugate-gradient.scm: Do not initialize Finite-element-vector-data to zero vector. * all.scm: Include points.scm. * describe.scm: Add "points.scm" to input-files. Date: 2000/06/02 By B. Lucier * sparse-linear-algebra.scm: Add more special cases to the sparse matrix operator mapping. * multigrid.scm: Generate an error in MG-add-operator-and-rhs-information! if b is defined (so the system is nonsymmetric). Break out operator and smoother in MG-step. * final-tests.scm: Add nonsymmetric-tests (without solvers), rename tests to symmetric-tests, fix format-for-display for errors > 1.0. * geometry.scm: Add several vertex orderings (from Jason Gower). Date: 2000/05/17 By B. Lucier * geometry.scm: Add an initializer to Vertex-edges; change the initializer of Boundary-vertex-boundary-edges to be '(). * geometry-code.scm: Rewrite the refine methods to use instantiate rather than with-co-instantiation and to explicitly initialize all fields. This avoids calling fill-other-fields! and doubles the speed of (refine triangulation), even with the space-filling-curve ordering of the geometric entities. * final-results.scm: Expand the multigrid tests to include up to four pre- and post-smoothings per multigrid step, and to use up to 6 iterations of the multigrid step per level. Date: 2000/05/12 By B. Lucier * geometry.scm: Rewrite Triangulation-space-filling-curve-sort! to sort only on vertex-1 of Edges and Triangles; computes the curve-index of each vertex only once, reuses it for Edges and Triangles; use some temporary storage in cons's to avoid continual Meroon object accesses. * geometry-code.scm: Turn methods into handy-methods. Date: 2000/05/11 By B. Lucier * hierarchical.scm: Remove. * problem-description.scm: New file. Includes the Problem-data class for describing the elliptic PDE we want to solve. * all.scm. Don't include hierarchical.scm, include problem-description.scm. * utilities.scm: Make check-same-class a generic, dispatch on the first argument, which must be an Object. * linear-elements.scm: Make the initialize! method for Element a handy-method. Change fes->space throughout. Remove Finite-element-vector-check-same-class, replace with (check-same-class (x Finite-element-vector) y). * linear-algebra.scm: In Vector-inner-product, don't require x to be a Vector (but still dispatch on x). Give easy but stupid definitions to new generics Vector-Linf-norm and Vector-L1-norm. Define identity-operator. * multigrid.scm: Define class Multigrid-data to encapsulate everything needed to solve a multigrid problem. Define MG-solver using this class. Define (MG-build-data coarse-triangulation number-of-refinements), and MG-add-operator-and-rhs-information! and MG-propagate-level-information! to add the information at the finest level and propagate it to coarser levels. Introduce MG-add-solver-information! (currently uses the basic smoother). Define L-inf-norm for a Linear-finite-element-operator. * sparse-linear-algebra.scm: Define Sparse-matrix-vector class of objects that are not Operators (so they can't be applied) but which can be manipulated more easily because the rows are Sparse-vectors. Define conversion to and from Sparse-matrix-operator, define Sparse-matrix-operator operations in terms of Sparse-matrix-vector operations. Introduce Operator-with-matrix-implementation class. Use this machinery in Operator-compose for Linear-finite-element-operators. * intergrid.scm: Change fes->space throughout. Use the machinery introduced in sparse-linear-algebra.scm for Sparse-matrix-vectors. * random.scm: Make definition of random safe for 32-bit machines. * geometry.scm: Add functions Triangulation-space-filling-curve-sort! and Triangulation-lexicographical-sort! Define Triangulation-sort! and set it to Triangulation-space-filling-curve-sort! by default. Use it in the initialize! method for Triangulations. Work of Mr. Gower. * conjugate-gradient.scm: Add the code for diagonal and Gauss-Seidel preconditioners. Define a Conjugate-gradient-data class to encapsulate the information needed to run the conjugate gradient routine. Define CG-build-data, CG-add-operator-and-rhs-information!, and CG-add-solver-information! to build and manipulate this objects in this class. (conjugate-gradient): Change testfunc to stop-iterations?. Make preconditioner an Operator. Pass A and preconditioner to stop-iterations?. Have preconditioners return Operators, not functions. * curved-linear-elements-code.scm: Changes from Ms. Joo, which I don't really understand. * linear-elements-code.scm: Make Linear-finite-element-operator a subclass of Operator-with-matrix-implementation. Change fes to space throughout. Make indices and coefficients immutable, so the matrix implementation can rely on them. Add flonum declarations. * curved-geometry-code.scm: Move flonum declaration in quadratic-transformation. * final-tests.scm: Use Multigrid-data and Conjugate-gradient-data classes to build methods for solutions. Rewrite to conform to changes listed above. * test.scm: Changes fes to space; add A and preconditioner to the stop-iterations? lambda. * geometry-code.scm: (Triangulation-consistent?): Use with-access. * describe.scm: reorder input-files; add final-tests.scm and test.scm. Date: 2000/05/01 By B. Lucier * hierarchical.scm: New function propagate-level-information! broken out of add-operator-and-rhs-information!, which now adds only the finest level matrix and right-hand-side information. * final-tests.scm: run-test now takes an object in the class Problem-data and a thunk (a zero-argument procedure) that solves the linear problem. Rewrite run-cg-tests so it uses classical conjugate gradient. Date: 2000/04/27 By B. Lucier * hierarchical.scm: New framework for hierarchical (level by level) linear solvers. Define Hierarchical-data class, Problem-data class, and Hierarchical-solver. * preconditioners.scm: Remove. Add the routines to ... * conjugate-gradient.scm: preconditioners code, plus routine to add solver information to Hierarchical-data. * multigrid.scm: Remove full-multigrid (use Hierarchical-solver instead). Define routine to add multigrid data to Hierarchical-data. * final-tests.scm: Use Hierarchical-data structure. Add new tests from Mr. Martynov. Define run-test to run a particular problem with a particular solver. Define run-multigrid-tests and run-cg-tests. * all.scm: Don't include preconditioners.scm. Do include hierarchical.scm. * describe.scm: Update input-files appropriately. * mg-results and cg-results: New results files. Date: 2000/04/27 By B. Lucier * multigrid.scm (MG-step): Fix a bug in counting the presmoothing steps. * linear-elements-code.scm: Remove no-longer-needed references to the boundary-index of boundary-nodes. (Ms. Joo) Date: 2000/04/26 By B. Lucier * linear-elements-code.scm: Add back Operator-compose method for Linear-finite-element-operators that was removed by mistake. * multigrid.scm: New file. Defines an MG-data class, and routines MG-step and full-multigrid. (Work of Ms. Park and Mr. Martynov.) * mg-test-complex.scm: Test code for multigrid. (Work of Ms. Park and Mr. Martynov.) * all.scm: Include multigrid.scm. * describe.scm: Add multigrid.scm and mg-test-complex.scm to input-files. Date: 2000/04/26 By B. Lucier * linear-elements-code.scm: Use two-point Gauss rule for all boundary integrals. Define left-gauss-point and right-gauss-point. * curved-linear-elements-code.scm: Tweak enough so that it loads and compiles, but *it does not work*. Date: 2000/04/25 By. B. Lucier * linear-elements-code-2.scm: Removed. * linear-elements-code.scm: New file, code based on generic functions to replace old linear-elements-code-2.scm. (Work of Ms. Joo.) * curved-linear-elements-code.scm: New file, methods for Curved-edges and Triangles-with-curved-sides for generics defined in linear-elements-code.scm. (Work of Ms. Joo.) * geometry.scm: Add triangle field to Curved-edge. (Work of Ms. Joo.) * curved-geometry.scm: Initialize and use triangle field in Curved edge. (Work of Ms. Joo.) * all.scm: include curved-geometry.scm, linear-elements-code.scm and curved-linear-elements-code.scm, not linear-elements-code-2.scm. * intergrid.scm (transpose): You can reverse-append! the new entries rather than sorting them because they're in reverse order. * describe.scm: modify input-files appropriately. Date: 2000/04/25 By B. Lucier * linear-elements-code-2.scm (add-boundary-integral-terms!): corrected bug (work of Ms. Joo). * preconditioners.scm: New file; contains routines diagonal-preconditioner and gauss-seidel-preconditioner. (Currently being tested by Mr. Sun; if his code is better, it will replace this code.) * all.scm: Include preconditioners.scm. * sort.scm (sorted?): Fix bug for vector case. * test-complex.scm: Changed upper bound on c to 8^{-k} in testfunc. Define identity-preconditioner; use identity-preconditioner, diagonal-preconditioner, and gauss-seidel-preconditioner in all tests. Define one complex-test. * conjugate-gradient.scm: Move fixnum declaration. * describe.scm: Add preconditioners.scm to input-files. Date: 2000/04/21 By B. Lucier * sparse-linear-algebra.scm: Reimplement Sparse-vector as a list of entries; do not use a Meroon class. Change the Vector-* methods for Sparse-vectors to Sparse-vector-* specific functions. make-Entry, Entry-index, and Entry-coefficient are now internal macros, so they need to be wrapped in a lambda for map, etc. Date: 2000/04/20 By B. Lucier * linear-element-code-2.scm : New Operator-compose method for Linear-finite-element-operators. * sparse-linear-algebra.scm: Add initialize! method for Sparse-vectors that removes zero components from the vectors. Fix bug in Operator-compose method for Sparse-matrix-operators. * test-operator.scm: New file to test operator methods. * describe.scm: Add test-operator.scm to input-files. Date: 2000/04/20 By B. Lucier * linear-elements.scm (Finite-element-vector-check-same-class): Check that x is an Object, too. * intergrid.scm: Wrap sort! comparison in FIX. * geometry.scm: Add fixnum declarations to loops that extract boundary-vertices and boundary-edges in the initialize! method for Triangulation. * curved-geometry.scm (quadratic-transformation): Move the flonum declaration to cover the whole function. * polygon.scm (convex-angle?): Declare flonum. * test-complex.scm: Define fine-t as refinement of t; define fine-fes. Define L2-inner-product-operator and H1-inner-product-operator on fine-fes. Define coarse->fine-operator that maps something from fes to fine-fes. Use it in run-tests. Date: 2000/04/19 By B. Lucier * linear-elements.scm: New Finite-element-vector-check-same-class. Use it in Vector-* methods for Finite-element-vectors instead of check-same-class. Date: 2000/04/19 By B. Lucier * geometry.scm (initialize! (t Triangulation)): Change the calculation of digits to Mr. Gower's original form. * linear-elements.scm: New Vector-copy for Finite-element-vectors. Date: 2000/04/17 By B. Lucier * intergrid.scm: Fix stupid bug. * test.scm: Make it work with new all.scm. Date: 2000/04/17 By B. Lucier * utilities.scm: Add (keep p l). * linear-elements.scm: Add Finite-element-space-neighbors-length. * linear-algebra.scm: Add check that Operator-mapping is defined before applying it in Operator-apply. * sparse-linear-algebra.scm: New file. Implements Sparse-vector. Defines Entry as a data type. * intergrid.scm: New file. Define coarse<-fine and transpose. * linear-elements-code-2.scm: remove Linear-finite-element-operator-information and Linear-finite-element-vector-information. Force indices to be initialized in a Linear-finite-element-operator. Add a matrix-implementation field to Linear-finite-element-operator. Have add-stiffness-terms!, add-mass-terms!, add-transport-terms! take a Linear-finite-element-operator as an argument. Have add-interior-integral-terms! and add-boundary-integral-terms! take a Linear-finite-element-vector as an argument. Change the boundary functions to add their result directly to the vector data or operator coefficients instead of to a separate place. * all.scm: Include sparse-linear-algebra.scm and intergrid.scm. * describe.scm: Add sparse-linear-algebra.scm and intergrid.scm to input-files. * test-complex.scm: Change to remove *-information. Date: 2000/04/16 By B. Lucier * linear-elements.scm: Sort (Element-neighbors e) in the initialize! method for Elements. Date: 2000/04/16 By B. Lucier * utilities.scm: Add reverse-append!. * linear-algebra.scm: Add generic function Operator-compose. * linear-elements-code-2.scm: Change the single fes field in Linear-finite-element-operator to two fields, domain-fes and rangle-fes and work out the consequences of that change. * test-complex.scm: change single fes entry to domain-fes and range-fes. Date: 2000/04/15 By B. Lucier * utilities.scm: removed map-and-sum; renamed reduce to reduce-from-left and added reduce-from-right; rewrote mappend using reduce-from-right. * quicksort.scm: remove * sort.scm: Add, implements merge-sort. * geometry.scm: Use merge-sort instead of quicksort in the initialize! method for Triangulation. (Mr. Gower had used merge-sort first, but I changed it to quicksort. Big mistake---merge-sort is about 3 times as fast.) Remove definitions of Triangulation-vertex-ref, Triangulation-edge-ref, and Triangulation-triangle-ref. * linear-elements.scm: remove Linear-finite-element-space-vertex-ref. * all.scm: Include sort.scm, not quicksort.scm. * describe.scm: Index sort.scm, not quicksort.scm. Date: 2000/04/15 By B. Lucier * test-complex.scm: Add an obligatory description field to the Test-data class. Use (cond (test => function-using-nonfalse-test-value)) instead of let's and if's. Date: 2000/04/15 By B. Lucier * linear-elements-code.scm: Add ! to end of routines that modify m-info or v-info to match Scheme naming convention. * test-complex.scm: Change the structure test-data to the class Test-data. Include number-of-refinements as a parameter; use it to determine bound for c in conjugate-gradient testfunc argument. Use new names of functions in linear-elements-code.scm. Date: 2000/04/13 By B. Lucier * all.scm: Make FLOAT and FIX meroon-macros (i.e, they are useable in all files loaded after all). * describe.scm: Distinguish between pervasive and local macro definitions. * test-complex.scm: Remove the definitions of FLOAT and FIX. Date: 2000/04/13 By B. Lucier * linear-elements-code-2.scm (add-boundary-integral-terms): Since the normal derivative can be discontinuous at a vertex whose two boundary edges are not colinear, we can't use Simpson's rule (which uses the value at the vertex) for the approximate integration. Use the two-point Gauss rule instead. * test-complex.scm: Clean, add new test, use real L2 and H1 norms to measure the difference between the interpolant and the FEM result. * linear-algebra.scm (Vector-inner-product): Redefine to use naive implementation (which generates an unneeded temporary vector) by default. Also, rearrange arguments so the operator is between the two vectors. Date: 2000/04/13 By B. Lucier * linear-elements-code-2.scm (add-boundary-integral-terms): We don't use Linear-finite-element-vector-information-data, so don't access it; explicitly initialize boundary-data to 0.0's. test.scm: simplify a bit. test-complex.scm: A testing framework for the entire system. describe.scm: Add test-complex.scm to input files. Date: 2000/04/12 By B. Lucier * linear-algebra.scm: Define generic Vector-*axpy to compute a*x+y for two vectors x and y. (The name comes from the Basic Linear Algebra Subroutines (BLAS), which defined saxpy for Single precision AX Plus Y and daxpy for Double precision AX Plus Y). Use it ... conjugate-gradient.scm: ... here. * linear-elements.scm: Define a method for Vector-*axpy for Finite-element-vectors. * geometry-code.scm: Set (Edge-fine e) just to the new mid vertex. Set (Triangle-fine t) to the empty list. Date: 2000/04/11 By B. Lucier * linear-algebra.scm: Fix bug in Vector-dot-product. * geometry.scm: Change Vertex-edges to a vector from a list. Remove all vestiges (spelling?) of Vertex-triangles. Change Boundary-vertex-boundary-edges to a vector. Remove coarse field from Vertices, Edges, and Triangles. Remove triangles field from Edges. * geometry-code.scm: Do not set up triangles field in either vertices or edges. Set Vertex-edges and Boundary-vertex-boundary-edges to an empty list in refine methods for vertex. Remove code that refers to Vertex-triangles and Edge-triangles. * curved-geometry-code.scm: Remove all code that refers to Vertex-triangles and Edge-triangles. * utilities.scm: Move partition from here to ... * linear-elements.scm: ... the initialize! method for Element. * polygon.scm: Remove all references to Vertex-triangles and Edge-triangles. Date: 2000/04/10 By B. Lucier * geometry.scm: Added a required has-polygonal-boundary? field to Triangulations; initialize limits to #f by default rather than saying it may be uninitialized. * geometry-code.scm: Set has-polygonal-boundary? field in coarse-square-triangulation. Use this field in the refine method for triangulations to determine whether to inherit the limits from the coarse triangulation or set it to #f. * curved-geometry-code.scm: Set has-polygonal-boundary? to #f for coarse-disk-triangulation. * polygon.scm: Set has-polygonal-boundary? to #t for triangulations returned by Triangulation<-points. Date: 2000/04/10 By B. Lucier * geometry.scm: Removed the (unused) definition of Point as a Meroon class. Added boundary-index as a field to Boundary-edge. Added limits as a field to Triangulation; is meant to hold the minimum and maximum values of the x and y coordinates of the points in the vertices of the triangulation. Added functions make-limits, x-min, x-max, y-min, y-max, and the associated -set! procedures for limits. Added Mr. Gower's space-filling curve numbering code for the vertices, edges, and triangles to the initialize! method for Triangulations. (Mr. Gower, check what I did and tell me if it's OK.) Removed Triangulation-add-indices. * geometry-code.scm: Have new triangulation inherit limits from old triangulation in refine. * random.scm: New file. * quicksort.scm: New file. * all.scm: include random.scm and quicksort.scm Date: 2000/04/09 By: B. Lucier * geometry.scm: Don't initialize vertex-indices twice; do initialize Edge-indices. * test.scm: various changes. * linear-elements-code-2.scm: Added routines add-transport-terms for adding b \cdot \grad\phi_j \times \phi_i terms to matrix info. Added add-interior-integral-terms and add-boundary-integral-terms to vector info. Also Linear-finite-element-vector-information->vector. I doubt that any of this stuff works, but it compiles. Date: 2000/04/04 By: B. Lucier * linear-algebra.scm: Allow fields of Operator to be uninitialized. New generic function Vector-copy. * geometry.scm: Removed boundary-edges from Vertex. Added Boundary-vertex as a subclass of Vertex. Defined functions Boundary-vertex-for-each-boundary-edge, Boundary-vertex-contains-boundary-edge?, Boundary-vertex-boundary-edges->list, Boundary-vertex-boundary-edges<-list. Removed Vertex-common-triangles and Vertex-common-edge. Defined Boundary-edge as subclass of Edge. Removed on-boundary? from Vertex and Edge. Added boundary-vertices and boundary-edges as fields to Triangulation. Added initialize! method for triangulation that initializes boundary-vertices, boundary-edges, the indices in vertices, and the boundary-indices in boundary-edges. Added functions to find the lengths of the fields in a Triangulation, and conversion functions between lists and boundary-edges and boundary-vertices. Made Curved-edge a subclass of Boundary-edge rather than Edge. (Whew!) * geometry-code.scm: Removed all references to on-boundary?; used Boundary-vertex and Boundary-edge instead. Added refine methods for Boundary-vertex and Boundary-edge. Made sure boundary-edges were updated in Boundary-edge, and boundary-vertices and boundary-edges were updated in Triangulation. Added checks for boundary-edges to Triangulation-consistent?. * curved-geometry-code.scm: Used Boundary-vertex/Boundary-edge rather than setting on-boundary?. Used with-access macros more. * linear-elements.scm: Add initialize! method for Elements to ensure neighbors are in correct (partitioned) order. Remove definitions of Finite-element-operator, apply-nonzero-coefficients, Linear-finite-element-operator, and Neumann-linear-problem-operator. * linear-elements-code.scm: Remove. * linear-elements-code-2.scm: Remove call to Triangulation-add-indices from Triangulation->Linear-finite-element-space (now numbered in initialize! method for Triangulation). Define classes Linear-finite-element-operator, Linear-finite-element-operator-information. Add initialize! method for Linear-finite-element-operator-information that fills fields based on fes field. Same for Linear-finite-element-operator. Define mapping field here based on old apply-nonzero-coefficients. Define functions which-neighbor, add-stiffness-terms, add-mass-terms, add-boundary-terms (all for Linear-finite-element-operator-information) and Linear-finite-element-operator-information->operator. Define class Linear-finite-element-vector-information in analogy to Linear-finite-element-operator-information, and its initialize! method. * polygon.scm: Make Polygon-vertex a subclass of Boundary-vertex. Use Boundary-edge instead of on-boundary? field. * test.scm: tests the new matrix construction and application machinery. * describe.scm: Takes out some of the bragging. The performance varies with every change to the code; now it's no longer faster than C. Remove linear-elements-code.scm from input-files. * utilities.scm: Add partition function. Dage: 2000/03/31 By B. Lucier * geometry.scm: Added Point-{add,subtract,scale,dot-product,L2-norm, zero} to speed things up. * other files: use them instead of Vector-* functions on Points. * linear-elements-code.scm: increase inlining in gradient calculation. Date: 2000/03/30 By B. Lucier * all files: Changed LinearSpace to Vector and LinearOperator to Operator. Changed LinearSpace: prefix to Vector-; similarly for LinearOperator: * linear-elements.scm: Added an extra case to apply-nonzero-coefficients to deal efficiently with refined boundary nodes. Now it is as fast as the equivalent C code. Date: 2000/03/27 By B. Lucier * linearalgebra.scm: Turned off inlining in LinearSpace:dot-product. * geomtry.scm: Took the definition of the Point functions out of the begin so describe.scm would recognize them. * linear-elements.scm: Made Neighbors an abstract data type; used it in apply-nonzero-coefficients. * linear-element-code.scm: Used Neighbors as an ADT. Date: 2000/03/24 By B. Lucier * linearalgebra.scm: After profiling, I unrolled the loop in the LinearSpace:dot-product generic function to reduce the number of boxed temporary flonums. * geometry.scm: Added two new classes, Triangle-with-curved-edge and Curved-edge (work of Ms. Joo). * curved-geometry-code.scm: New file. Adds code to manipulate new classes in geometry.scm. Defines coarse-disk-triangulation; defines "refine" methods for new classes in geometry.scm (work of Ms. Joo). Needs documentation. * curved-test.scm: New file. Beginning of test file for isoperimetric elements (work of Ms. Joo). * tex.scm: Adds a method to ->texdraw for Curved-edge. Something seems to be buggy; removed the labeling commands in Triangulation-edges->texdraw. Date: 2000/03/04 By B. Lucier * conjugate-gradient.scm: Added optional preconditioner to argument list of conjugate-gradient; exposes all variables to testfunc to use in decision about whether to stop the iteration; change conjugate-gradient from generic function to function. * geometry-code.scm: Add a new generic method refine; break out code from refine-triangulation to add methods to refine for vertices, edges, and triangles; change refine-triangulation to be a method of refine (work of Ms. Joo). * test.scm: use refine instead of refine-triangulation. Date: 2000/02/27 By B. Lucier * linearalgebra.scm: Added new generic LinearSpace:zero. * linear-elements.scm: Added methods for LinearSpace:dot-product and LinearSpace:zero for Finite-element-vector (suggested by Mr. Sun). * conjugate-gradient.scm: New file, contains generic conjugate-gradient (work of Mr. Sun). * all.scm: revert inlining-limit to the default 300 to save space and compile time during development. * random.scm: New file, contains functions random, seed-set!, and seed-ref. Based on a generator of L'Ecuyer at Montreal. Date: 2000/02/22 By B. Lucier * linear-elements-code.scm: As suggested by Ms. Joo, replace (norm u) by (dot-product u u) in the definition of grad-phi; also, do not use Linear-finite-element-space-integrate-phi_i-phi_j-on-boundary when building operator with Neumann boundary conditions. * geometry.scm: Use check-same-class as a predicate, not as an assertion, in LinearSpace:{add,subtract} methods on Points. Use instance-clone (a regular function) rather than clone (a generic function) is a (probably misguided) attempt to gain some efficiency in LinearSpace:{add,subtract,scale}. In LinearSpace:dot-product just require that both arguments be Points, not that they be the same specialized subclass of Point. * linear-elements.scm: Use instance-clone rather than clone in LinearSpace:{add,subtract,scale}. * utilities.scm: Make check-same-class a predicate, not an assertion (so get rid of the error call) and turn it back to a function (since it's now so short that it's almost always inlined). Date: 2000/02/16 By B. Lucier * all.scm: Enable inlining-limit of 1000. * geometry-code.scm: Change set-*! to *-set!. Use with-access macro to reduce type checks. * geometry.scm: Add and enable alternate representation of Point as a two-dimensional f64vector. Define make-Point, Point-x, Point-y, Point-x-set!, Point-y-set!, Point?. (Note: only these functions and LinearSpace functions defined for f64vectors should be used on Points.) Add a specialized initialize! method to the meroon class version of Point to check that both arguments are indeed flonums. Change set-*! to *-set!. Use with-access macro to reduce type checks. * linear-elements-code.scm: Use with-access macro to reduce type checks. Use map-and-sum in place of reduce and map. * linear-elements.scm: Change set-*! to *-set!. * linearalgebra.scm: Use nested let's instead of let*. * polygon.scm: Change set-*! to *-set!. * tex.scm: Change the generic definition of ->texdraw to handle Points, so that either definition of Point will work. * utilities.scm: Define map-and-sum. Change check-same-class to a macro.