SmoothCommand

From Flooxs
Jump to navigation Jump to search

Smooth

Smooth - Set grid refinement and adaption parameters, perform optimization

Synopsis

Smooth

MaterialType

Description

This command smoothes the grid, using averaging, of all meshes with the specified material type. Smoothing continues until there is negligible improvement in the [grid.html grid] quality. No interpolation of solution variables is performed, so care must be exercised. Smoothing with an existing dopant will change the spatial doping concentration of the dopant!

This command is a tcl procedure. The procedure is:

proc Smooth {Material} {
    set qual [[grid.html grid] $Material qual joint]
    set oldqual 0.0
    while {$qual > $oldqual   0.001} {
	[grid.html grid] $Material smooth
	set oldqual $qual
	set qual [[grid.html grid] $Material qual joint]
	puts $qual
    }
}

Examples

Smooth silicon

This command will smooth the silicon mesh.

Bugs and Missing Features

It would be nice, but very difficult, to interpolate solutions accurately.

Because this is a tcl script, it is sensitive to spaces. The following will not work

Smooth insulator  =  lto

because tcl will interpret it as having three arguments, not one. The spaces must be removed for correct operation

Smooth insulator=lto

See Also

grid, tcl command documentation