Talk:SmoothMeshLines2

SmoothMeshLines2 - Create smooth mesh lines

The total number of cells in a mesh can be greatly reduced because FDTD allows a non homogeneous grid. The restriction is that neighboring cells cannot vary in dimension more than a factor of 2.

The SmoothLines2 function is used to produce a locally dense mesh as well as gradually transition from the small cell size to the regular cell size of the problem.

function lines = SmoothMeshLines2(lines, max_res, ratio, varargin)

input: lines:  1xn vector of (fixed) mesh lines max_res: maximum distance between any two lines (e.g. lambda/10) ratio:  (optional) default: 1.3

optional variable arguments ('key', value) CheckMesh:         Do a final mesh check (default is true) allowed_max_ratio: allow only a given max. grading ratio; (default --> ratio*1.25) output: lines:  1xn vector of (smoothed) mesh lines

example: mesh.x = [0 100 2300 2400]; mesh.x = SmoothMeshLines2( mesh.x, 43 );