Transcription of PROGRAMMING OF FINITE DIFFERENCE METHODS IN …
{{id}} {{{paragraph}}}
PROGRAMMING OF FINITE DIFFERENCE METHODS IN MATLABLONG CHENWe discuss efficient ways of implementing FINITE DIFFERENCE METHODS for solving thePoisson equation on rectangular domains in two and three dimensions. The key is the ma-trix indexing instead of the traditional linear indexing. With such an indexing system, wewill introduce a matrix-free and a tensor product matrix implementation of FINITE INDEXING USING MATRICESG eometrically a 2-D grid is naturally linked to a matrix. When forming the matrixequation, we need to use a linear indexing to transfer this 2-D grid function to a 1-D vectorfunction.
2 isbd(2:end-1,2:end-1) = false; 3 bdidx =find(isbd(:)); In the first line, we use size(u)such that it works for both meshgridand ndgridsystem. 2. MATRIX FREE IMPLEMENTATION Here the ‘matrix free’ means that the matrix-vector product Aucan be implemented without forming the matrix Aexplicitly. Such matrix free implementation will be useful if
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}