파일:Stability region for BDF1.svg

testwiki
둘러보기로 이동 검색으로 이동
    원본 파일 (SVG 파일, 실제 크기 720 × 540 픽셀, 파일 크기: 88 KB)

    이 파일은 위키미디어 공용에 있으며, 다른 프로젝트에서 사용하고 있을 가능성이 있습니다. 해당 파일에 대한 설명이 아래에 나와 있습니다.

    파일 설명

    설명
    English: Region of absolute stability for the backward Euler = BDF1 method. See below for Python source. Compare with page 350 of Süli, Endre; Mayers, David (2003), An Introduction to Numerical Analysis, Cambridge University Press, ISBN 0521007941.
    날짜
    출처 자작
    저자 Jitse Niesen
    SVG 발전
    InfoField
     이 SVG 파일의 소스 코드 문법이 올바릅니다.
     이 벡터 그림은 Matplotlib(으)로 제작되었습니다.
    소스 코드
    InfoField

    Python code

    import numpy
    from matplotlib import pyplot
    
    BFDcoeffs = { 1: {'alpha': [1, -1], 'beta': 1},
                  2: { 'alpha': [3, -4, 1], 'beta': 2 },
                  3: { 'alpha': [11, -18, 9, -2], 'beta': 6 },
                  4: { 'alpha': [25, -48, 36, -16, 3], 'beta': 12 },
                  5: { 'alpha': [137, -300, 300, -200, 75, -12], 'beta': 60 },
                  6: { 'alpha': [147, -360, 450, -400, 225, -72], 'beta': 60 } }
    
    plotWindow = { 1: { 'realPart': [-2, 3], 'imagPart': [-2, 2] },
                   2: { 'realPart': [-2, 5], 'imagPart': [-3, 3] },
                   3: { 'realPart': [-4, 8], 'imagPart': [-5, 5] },
                   4: { 'realPart': [-4, 14], 'imagPart': [-8, 8] },
                   5: { 'realPart': [-10, 25], 'imagPart': [-15, 15] },
                   6: { 'realPart': [-20, 40], 'imagPart': [-30, 30] } }
    
    # Returns > 1 if argument is not in region of absolute stability
    def stabilityFunction(hTimesLambda, s):
        stabPolyCoeffs = list(BFDcoeffs[s]['alpha'])
        stabPolyCoeffs[0] -= hTimesLambda * BFDcoeffs[s]['beta']
        return max(abs(numpy.roots(stabPolyCoeffs)))
    
    # Main program
    for s in range(1,7):
        x = numpy.linspace(*plotWindow[s]['realPart'], num=400)
        y = numpy.linspace(*plotWindow[s]['imagPart'], num=400)
        [X,Y] = numpy.meshgrid(x,y)
        Z = numpy.zeros(X.shape)
        for m in range(X.shape[0]):
            for n in range(X.shape[1]):
                Z[m,n] = stabilityFunction(X[m,n] + 1j * Y[m,n], s)
        pyplot.contour(X, Y, Z, [1], colors='k')
        pyplot.contourf(X, Y, Z, [0,1], colors=[[1, 0.5, 0.8]])
        pyplot.plot(plotWindow[s]['realPart'], [0, 0], 'k--')
        pyplot.plot([0, 0], plotWindow[s]['imagPart'], 'k--')
        pyplot.gca().tick_params(labelsize = 20)
        pyplot.savefig('Stability_region_for_BDF%d.svg' % s)
        pyplot.clf()
    

    라이선스

    나는 아래 작품의 저작권자로서, 이 저작물을 다음과 같은 라이선스로 배포합니다:
    Creative Commons CC-Zero 이 파일은 크리에이티브 커먼즈 CC0 1.0 보편적 퍼블릭 도메인 귀속에 따라 이용할 수 있습니다.
    저작물에 본 권리증서를 첨부한 자는 법률에서 허용하는 범위 내에서 저작인접권 및 관련된 모든 권리들을 포함하여 저작권법에 따라 전 세계적으로 해당 저작물에 대해 자신이 갖는 일체의 권리를 포기함으로써 저작물을 퍼블릭 도메인으로 양도하였습니다. 저작권자의 허락을 구하지 않아도 이 저작물을 상업적인 목적을 포함하여 모든 목적으로 복제, 수정·변경, 배포, 공연·실연할 수 있습니다.

    설명

    이 파일이 나타내는 바에 대한 한 줄 설명을 추가합니다

    이 파일에 묘사된 항목

    다음을 묘사함

    89,670 바이트

    image/svg+xml

    1ab3969aaa8b95ec917e5a8368f4a4b1ec33a2a4

    파일 역사

    날짜/시간 링크를 클릭하면 해당 시간의 파일을 볼 수 있습니다.

    날짜/시간섬네일크기사용자설명
    현재2012년 3월 20일 (화) 16:372012년 3월 20일 (화) 16:37 판의 섬네일720 × 540 (88 KB)wikimediacommons>Jitse Niesen

    이 파일을 사용하는 문서가 없습니다.