# A Matlab implementation of two dimensional homogenization formulas

Yves Capdeboscq - Michael Vogelius

# Introduction

This Document and the M-files mentioned within can be found

here in tgz format (or in zip format)

All files described in part A can be run with Matlab 5 or 6, without the PDE Toolbox. To run the demos listed in part B, the PDE Toolbox is required.

The implementation examples available in the Examples directory require the Matlab PDE Toolbox. The results of these computations are in the directory ExamplesResults.

These informations are also available as line commands: type help <function> to obtain help.

# A Haar and Multiwavelet homogenization files

## A.1 AnalyticWaveHom.m

Usage : Input : [RH,RMW,RT]=WaveHom(M,N) and , by matrices the periodic diffusion coefficient the periodic diffusion coefficient

For a general symmetric periodic matrix use HaarSmoothing instead.

The output of this function is the same as the output of the HaarSmoothing function, in periodic 2 by 2 case. Here the formulas are implemented in their simpler form (in terms of the variables) without explicitly using wavelet coefficients.

The output is composed of 3 row column vectors

 RH, a 3 row column containing the homogenized coefficients according to the Haar Wavelets RMW, a 3 row column containing the homogenized coefficients according to the Legendre-2 Multiwavelet RT, a 3 row column containing the exact homogenized formulas in the case .

## A.2 AsymptoticRationalReduction.m

Usage : Input : RES=AsymptoticRationalReduction(O) a array, constructed by MRADecompositionMatrix (Paragraph A.8).

Part of MWSmoothing (Paragraph A.9).

The output of this function is an array corresponding to the second order coefficients of the reduced operator taking the limit of the differentiation parameter when epsilon tends to zero.

 RES(:,:,1) corresponds to the (x,x) diffusion coefficient RES(:,:,2) corresponds to the (y,y) diffusion coefficient RES(:,:,3) corresponds to the (x,y) diffusion coefficient

## A.3 Extension.m

Usage : Input : Extension(sig) sig a array corresponding to the , and diffusion coefficient

The output is a array, which is an extension of sig according to the following rule

This corresponds to a locally periodic extension.

See also HaarSmoothing (Paragraph A.7), MWSmoothing (Paragraph A.9) and PeriodicExtension (Paragraph A.10).

## A.4 HaarFormulaX.m

Usage : Input : HaarFormulaX(a1x,a2x,a3x,a4x,a1y,a2y,a3y,a4y,b1,b2,b3,b4) Haar wavelet coefficients corresponding to the diffusion coefficient the diffusion coefficient the diffusion coefficient

The output is the Haar homogenized diffusion coefficient.

See also HaarSmoothing (Paragraph A.7), HaarFormulaY (Paragraph A.5) and HaarFormulaZ (Paragraph A.6). The formula is

## A.5 HaarFormulaY.m

Usage : Input : HaarFormulaY(a1x,a2x,a3x,a4x,a1y,a2y,a3y,a4y,b1,b2,b3,b4) Haar wavelet coefficients corresponding to the diffusion coefficient the diffusion coefficient the diffusion coefficient

The output is the Haar homogenized diffusion coefficient.

See also HaarSmoothing (Paragraph A.7), HaarFormulaX (Paragraph A.4) and HaarFormulaZ (Paragraph A.6). The formula is

## A.6 HaarFormulaZ.m

Usage : Input : HaarFormulaZ(a1x,a2x,a3x,a4x,a1y,a2y,a3y,a4y,b1,b2,b3,b4) Haar wavelet coefficients corresponding to the diffusion coefficient the diffusion coefficient the diffusion coefficient

The output is the Haar homogenized diffusion coefficient.

See also HaarSmoothing (Paragraph A.7), HaarFormulaX (Paragraph A.4) and HaarFormulaY (Paragraph A.5). The formula is

## A.7 HaarSmoothing.m

Usage : Input : HaarSmoothing(sig,EType) sig, a dimensional array EType, an optional parameter. The first matrix represents the diffusion coefficient The second matrix represents the diffusion coefficient The third matrix represents the diffusion coefficient If Etype is set to , PeriodicExtension (Paragraph A.10) is used instead of Extension (Paragraph A.3).

Part of Smoothing (Paragraph A.11).

The output is an array, after an extension to an matrix, and 2 applications of Haar homogenization formulas.

See also Extension (Paragraph A.3), PeriodicExtension (Paragraph A.10), WaveletSquare (Paragraph A.12), HaarFormulaX (Paragraph A.4), HaarFormulaY (Paragraph A.5) and HaarFormulaZ (Paragraph A.6).

Usage : Input : MRADecompositionMatrix(sig) an array, where is the kth Haar wavelet coefficient of the -th diffusion coefficient: corresponds to (x,x) corresponds to (y,y) corresponds to (x,y) at the point .

The output is an array, corresponding to the decomposition of the operator according to the multi-resolution analysis induced by the multiwavelet used.

where .

There is a degree of freedom in the choice of the difference operator (see [1]), which will be referred to as the differentiation parameter, . A differentiation parameter corresponds to a standard forward-backward scheme, comparable to that used for the Haar basis -in that case, there is also a differentiation parameter but the result does not depend on the choice of this parameter. A differentiation parameter corresponds to a centered difference scheme. The Gaussian reduction we perform cannot be used in that case. This procedure provided the array ER in the case , with the coefficients in limited to the second order in epsilon:

We therefore have ER of dimension

1. B. Alpert, G. Beylkin, D. Gines, L. Vozovoi, Adaptive Solution of Partial Differential Equations in Multiwavelet Bases, May 1999.

## A.9 MWSmoothing.m

Usage : Input : MWSmoothing(sig,EType) sig, a dimensional array EType, an optional parameter. The first matrix represents the diffusion coefficient The second matrix represents the diffusion coefficient The third matrix represents the diffusion coefficient If Etype is set to , PeriodicExtension (Paragraph A.10) is used instead of Extension (Paragraph A.3).

Part of Smoothing (Paragraph A.11).

The output is an array, after an extension to an matrix, and 2 numerical multiwavelet homogenization iterations.

See also Extension (Paragraph A.3), PeriodicExtension (Paragraph A.10), WaveletSquare (Paragraph A.12), MRADecompositionMatrix (Paragraph A.8) and AsymptoticRationalReduction (Paragraph A.2).

## A.10 PeriodicExtension.m

Usage : Input : PeriodicExtension(sig) sig a array corresponding to the , and diffusion coefficients.

The output is a array, which is an extension of sig according to the following rule

See also HaarSmoothing (Paragraph A.7), MWSmoothing (Paragraph A.9) and Extension (Paragraph A.3).

## A.11 Smoothing.m

Usage : Input : resu=Smoothing(sig,Type,NbIter,BType) e.g. resu=Smoothing(A,'Haar','auto') sig a array representing an isotropic diffusion operator coefficient a diagonal diffusion operator coefficient a symmetric diffusion operator coefficient type can be 'Haar' or 'MW' NbIter can be any number or 'auto' which means the smoothing method determines itself when to stop (variations between two steps less than ) BType (optional), if set to 2, sets globally periodic boundary condition instead of local ones.

The output is a smoothed image, homogenized locally according to the Haar or Multiwavelet homogenization formulas.

See also HaarSmoothing (Paragraph A.7), MWSmoothing (Paragraph A.9) and AnalyticWaveHom (Paragraph A.1).

## A.12 WaveletSquare.m

Usage : Input : WaveletSquare(sig) sig an array corresponding to the , and diffusion coefficients.

The output is an array corresponding to the value of the Haar Wavelet coefficients.

# B Examples Files

The test examples provided are

• IsoPeriodicTest.m, an eigenvalue test in the periodic case,
• NonRegularTest.m an eigenvalue test for the smoothing procedure applied to a non periodic pattern,

These test consist of comparison between finite element solutions computed on the non averaged data and the finite element solutions (or the exact analytic solution when it is known) using the exact homogenized formulas and the averaging formulas described earlier. Use the help command for additional information.

A Matlab implementation of two dimensional homogenization formulas

This document was generated using the LaTeX2HTML translator Version 2K.1beta (1.47)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -no_subdir -split 0 -show_section_numbers /tmp/lyx_tmpdir11037pnIcG7/lyx_tmpbuf11037VBlN3N/Documentation.tex

The translation was initiated by Yves Capdeboscq on 2002-01-15

Yves Capdeboscq 2002-01-15