test1.di
来自「算断裂的」· DI 代码 · 共 185 行
DI
185 行
Thu Aug 26 14:52:32 EDT 1999-----> ## QMG test 1Thu Aug 26 14:52:32 EDT 1999-----> ## This is an approximation to the mesh on the cover of Claes Thu Aug 26 14:52:32 EDT 1999-----> ## Johnson's book ``Numerical solutions of partial differentialThu Aug 26 14:52:32 EDT 1999-----> ## equations by the finite element method'' , Cambridge U. Press 1987.Thu Aug 26 14:52:32 EDT 1999-----> ## It has greater refinement near the origin.Thu Aug 26 14:52:32 EDT 1999-----> global PIThu Aug 26 14:52:32 EDT 1999-----> global interactiveThu Aug 26 14:52:32 EDT 1999-----> set wedgeangle [expr $PI/6.0]0.52359877559829837Thu Aug 26 14:52:32 EDT 1999-----> ## Make a circular approximation with 4 Bezier curves from pi/6 to 2pi.Thu Aug 26 14:52:32 EDT 1999-----> gmset {verts codes} [gm_circ_approx $wedgeangle [expr 2 * $PI] 4]Thu Aug 26 14:52:32 EDT 1999-----> ## Put one more vertex to start the wedge.Thu Aug 26 14:52:32 EDT 1999-----> gmset newverts [concat {{0 0}} $verts]Thu Aug 26 14:52:32 EDT 1999-----> gmset newcodes [concat 0 $codes]Thu Aug 26 14:52:32 EDT 1999-----> gmset domain [gm_cpoly $newverts $newcodes]Thu Aug 26 14:52:32 EDT 1999-----> ## The size function is of the form h0*r^p+f, where p is determinedThu Aug 26 14:52:32 EDT 1999-----> ## by (4.31) in Johnson, and f is determined so that the H1 error onThu Aug 26 14:52:32 EDT 1999-----> ## the innermost triangles matches the H1 error everywhere else.Thu Aug 26 14:52:32 EDT 1999-----> set h0 0.20.2Thu Aug 26 14:52:32 EDT 1999-----> set gamma [expr $PI / ( 2*$PI - $wedgeangle)]0.54545454545454541Thu Aug 26 14:52:32 EDT 1999-----> set f [expr pow($h0,(1.0/$gamma))]0.052306419440473213Thu Aug 26 14:52:32 EDT 1999-----> set p [expr 1.0 - $gamma]0.45454545454545459Thu Aug 26 14:52:32 EDT 1999-----> set sizectl "(formula ($h0 * pow(%0*%0+%1*%1, $p/2.0) + $f))"(formula (0.2 * pow(%0*%0+%1*%1, 0.45454545454545459/2.0) + 0.052306419440473213))Thu Aug 26 14:52:32 EDT 1999-----> set show 00Thu Aug 26 14:52:32 EDT 1999-----> if {[llength [info globals interactive]]} { puts "size control string = $sizectl" set show 1}Thu Aug 26 14:52:32 EDT 1999-----> gmset mesh [gmmeshgen $domain size $sizectl show $show]Thu Aug 26 14:52:39 EDT 1999-----> gmset {numvtx numelt} [gmmeshsize $mesh]Thu Aug 26 14:52:39 EDT 1999-----> set asp [gmchecktri $domain $mesh]Maximum aspect ratio = 10.2397 achieved insimplex #359 of topological entity mregion (2:0) which has vertices 13 11 230 Maximum global side length = 0.200806Minimum global altitude = 0.00727931Number of nodes = 259 number of elements = 44710.239729237340125Thu Aug 26 14:52:40 EDT 1999-----> if {[llength [info globals aspprod]]} { global aspprod set aspprod [expr $aspprod * $asp] global meshsizesum set meshsizesum [expr $meshsizesum + $numvtx]}259Thu Aug 26 14:52:40 EDT 1999-----> if {[llength [info globals interactive]]} { gmviz $mesh white}Thu Aug 26 14:52:40 EDT 1999-----> # ------------------------------------------------------------------Thu Aug 26 14:52:40 EDT 1999-----> # Copyright (c) 1999 by Cornell University. All rights reservedThu Aug 26 14:52:40 EDT 1999-----> # See the accompanying file 'Copyright' for authorship information,Thu Aug 26 14:52:40 EDT 1999-----> # the terms of the license governing this software, and disclaimersThu Aug 26 14:52:40 EDT 1999-----> # concerning this software.Thu Aug 26 14:52:40 EDT 1999-----> # ------------------------------------------------------------------Thu Aug 26 14:52:40 EDT 1999-----> # This file is part of the QMG software. Thu Aug 26 14:52:40 EDT 1999-----> # Version 2.0 of QMG, release date RELDATE.Thu Aug 26 14:52:40 EDT 1999-----> # ------------------------------------------------------------------Thu Aug 26 14:52:40 EDT 1999
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?