Applications, Examples and Libraries

Share your work here

Hi all,

I noticed that there are not many applications which deal with the finite element method with Maple. I attached in the file below a code for the magnetostatic probems and which allows the calculation of the magnetic field in a permanent magnet synchronous machine.

mafem.zip

I hope this work will help many users of maple in the numerical analyzis with the finite element method

I posted...

I was recently asked a question on using regular expressions with ?type , and I thought it was interesting enough, to share here.

I have been reading through the following book:

Hilderman, Robert J. and Hamilton, Howard J., "Knowledge Discovery and Measures of Interest," Kluwer Academic Publishers, 2001.

To better understand the material in Chapter 3, "A Data Mining Technique" I have written a Maple Worksheet implementing...

The goal of computing only a select number of eigenvectors of a real symmetric floating-point Matrix comes up now and then. For very large Matrices the memory requirements can be more restrictive than the timing.

The attached worksheet and code computes this, more quickly and with significantly less memory allocation than does the usual task of computing all eigenvectors. By using the supplied Matrix itself as a partial "workspace" the amount of additional workspace and memory allocation for the task is negligible.

For example, having created the very large Matrix in the first place,  essentially no significant further memory allocation is required to compute the largest eigenvalue and its associated eigenvector.

A little about this routine `SelectedEigenvectors` follows.

It only works in hardware double precision. It expects a float[8] datatype Matrix (because you are serious about using minimal memory!). It uses the CLAPACK function dsyevx, using the "wrapperless" version of Maple's external-calling mechanism. It seems to work fine in the systems I've tried so far: Maple 13 and 14 on both 32bit and 64bit Linux and Windows.

Whether it computes and returns the selected eigenvectors (alongside the selected eigenvalues, which are always returned) is controlled by the 'vectors=truefalse' optional argument. By default it uses the Matrix argument as partial workspace and so destroys the original data; but this can be overridden with the 'preserve=true' optional argument. The requested accuracy can be relaxed with the 'epsilon=float' optional argument, which might sometimes speed it up.

The input Matrix is presumed to be symmetric. By default it uses the data in the lower triangle, but this can be changed to be the upper triangle with the 'uplo' optional argument.

The choice of eigenvalues is controlled by the two integer arguments `il` and `iu`. If il=iu=n then only the nth largest eigenvalue is computed. If il=1 and iu=4 then the four smallest eigenvalues are computed.

It returns three things: a Vector of dimension n whose first m entries are the selected eigenvalues, a nxm Matrix whose columns are the m associated eigenvectors, and a Vector of dimension n whose entries indicate whether corresponding eigenvectors failed to converge.

I didn't enable float arguments such as `vl` and `vu` which in principle could allow one to supply a floating-point range in which to find eigenvalues.

I didn't make an optimization of having it do an initial "dummy" external call in which no calculation would be done, but which would instead query for and subsequently utilize the optimal-performance additonal float workspace size.

For reasons mysterious to me, on Windows the 64bit version runs almost exactly half as fast as the 32bit version.

Usually, the workspace for eigen-solving is implemented to be at least O(n^2) for an nxn Matrix. But this routine does only O(m+n) extra workspace allocation to compute the m eigenvectors. And that is linear. Which is the Big Deal.

A 5000x5000 datatype=float[8] (ie. hardware double precision) Matrix takes 200MB of memory. With the preserve=true option, this routine can compute just the largest eigenvector with only about 200MB of additional allocation. And if the original Matrix is no longer required then with the preserve=false option this routine can do that task with less than 1MB further allocation. In comparison, the regular LinearAlgebra:-Eigenvectors command would require about 600MB of additional memory allocation while computing all eigenvectors.

At size 5000x5000 this routine is only about four times faster than LinearAlgebra:-Eigenvectors. I suspect that is because it still has to compute in full the reduction to tridiagonal form.

Download dsyevx.mw

One must agree with the fact that on the foundation of Mathematica created the most popular math encyclopedia.

Our response to Chamberlain.

I propose to establish a Global Practicum of elementary and higher mathematics - Mapler.
My Russian version already contains several thousand multi-choice programs with complete solutions, tests, tutors, graphics, etc.
This workshop will be an order of magnitude more in demand audience than Mathworld.

I hope that someone will prove useful. Especially - for beginners

ani.zip

Maple-version (86 mws with links): course_zno.zip  Html-interactive version: tar.zip

Training course

Maple in Ukraine
TRAINING COURSE
for the entrance examination in mathematics
External independent evaluation

countries.zip

I thought I'd create a partial map of the middle east using a procedure with Maple.  Let me say it's not the quickest thing to do when the data format is not particularly favourable. 

I downloaded data from Coastline Extractor from ngdc.noaa.gov/mgg/coast.  This gives you point data sets.  You can then use maple to pointplot...

 

Update - April 4, 2011: I corrected a typo in Table 2, first column, bottom row.  What was sqrt(6) has been changed to sqrt(5).

 

This is just a programmatic twist on Robert Lopez's very nice original post on this topic.

I'd rather be able to control such declarations with code, than to have to manipulate the palettes or context menus in order to get what are -- in essence -- additional programming and authoring tools. Such code can be dynamic and flexible, and could be inserted in Code- or Startup regions.

Download atomicpartials.mw

Since coming to Maplesoft in 2003, I've kept a notebook of "gems" I've gleaned from consulting with the programmers in the building. I call it my "Little Red Book of Maple Magic." It really is red. The first spiral-bound notebook was little, and it was red. When it overflowed, I moved the notes to a red ring-binder. But it's not so little any more.

Noted.
Of 4000 daily visitors of the site pages Russian Maple ApCent (during the examination session) 3800 - Russian students, and only 100 - Ukrainian. Sad.
Dynamics of visits:
June 2010 - 44.656 (35,000 for one day! - Unified state examination in mathematics (EGE) 

DirectSearch optimization package, version 2 is now available.

        The DirectSearch package is a collection of commands to numerically compute local and global minimums (maximums) of nonlinear multivariate function with (without) constraints. The package optimization methods are universal derivative-free direct searching methods, i.e. they...

A prospective customer recently asked if we had a MapleSim model of a double pipe heat exchanger. Heat exchangers are a critical unit operation in the process industries, and accurate models are needed for process control studies.  I couldn't find an appropriate model so I decided to derive the dynamic equations, and implement them using MapleSim's custom component interface.  I'll outline my modeling strategy in this blog post.

Coon's patch defines a patch from 4 curves forming a chain. 4-examples to Coon's patch are given following worksheet. Boundary curves in the examples are constructed by parametric cubic curves (in Bezier and Hermite form). First example is in 3D and comparable to parametric bicubic surface. Rest of examples are in 2D (abstract surface) which can be described shortly as:

  • 2D Example#1: 4 circular-arc like curves are combined by Coon's patch to form a circular-like region
First 64 65 66 67 68 69 70 Last Page 66 of 77