{"id":142,"date":"2020-02-23T14:41:51","date_gmt":"2020-02-23T06:41:51","guid":{"rendered":"https:\/\/www.yemeng.site\/?p=142"},"modified":"2020-02-26T12:02:36","modified_gmt":"2020-02-26T04:02:36","slug":"small-box-fft%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%ef%bc%88%e4%ba%8c%ef%bc%89%ef%bc%9a%e6%95%b0%e6%8d%ae%e7%bb%93%e6%9e%84","status":"publish","type":"post","link":"https:\/\/ru.yemeng.site\/?p=142","title":{"rendered":"Small Box FFT\u5b66\u4e60\u7b14\u8bb0\uff08\u4e8c\uff09\uff1a\u9876\u5c42\u8c03\u7528"},"content":{"rendered":"\n<p>\u4ece\u672c\u7bc7\u5f00\u59cb\uff0c\u5c06\u5f00\u59cb\u5bf9\u4e8eSBFFT\u76f8\u5173\u4ee3\u7801\u7684\u5b66\u4e60\u3002\u6211\u4f7f\u7528\u7684\u662f\u5317\u4eac\u5927\u5b66\u9648\u9ed8\u6db5\u8001\u5e08\u4f7f\u7528Fortran 03\u8bed\u8a00\u7f16\u5199\u7684SBFFT\u8f6f\u4ef6\u5305\uff08\u76f8\u5173\u4fe1\u606f\u53c2\u89c1<a href=\"https:\/\/sites.temple.edu\/mohanchen\/software\/\">\u8fd9\u91cc<\/a>\uff09\u3002\u6211\u7684\u5b66\u4e60\u601d\u8def\u662f\u9996\u5148\u5f04\u6e05\u695a\u9876\u5c42\u76f8\u5173\u5b50\u7a0b\u5e8f\uff08subroutine\uff09\u7684\u8c03\u7528\uff0c\u7136\u540e\u5b66\u4e60\u5e95\u5c42\u7684\u57fa\u672c\u6570\u636e\u7ed3\u6784\u4ee5\u53caSBFFT\u7b97\u6cd5\u7684\u5b9e\u73b0\uff0c\u6700\u540e\u5c06\u9876\u5c42\u8c03\u7528\u7684\u5b50\u7a0b\u5e8f\u4e0e\u4e0a\u4e00\u7bc7\u4e2d\u7684<a href=\"?p=80\/#sec-3\">\u8ba1\u7b97\u6d41\u7a0b<\/a>\u5bf9\u5e94\u8d77\u6765\u3002\u672c\u6587\u8ba8\u8bba\u7684\u5b50\u7a0b\u5e8f\u8c03\u7528\u4e5f\u53ef\u4ee5\u770b\u4f5c\u8f6f\u4ef6\u4e00\u4e2a\u7b80\u660e\u7248\u672c\u7684API\u624b\u518c\u3002<\/p>\n\n\n\n<p>\u5728SBFFT\u8f6f\u4ef6\u5305\u4e2d\u8ba1\u7b97Hartree\u52bf\uff08\u4e0a\u4e00\u7bc7\u4e2d\u6211\u4eec\u79f0\u4e3a\u5e93\u4ed1\u52bf\uff09\u662f\u901a\u8fc7\u8c03\u7528CalPotPlus4\u4e2d\u7684CalculatePotentialPlus4\u5b50\u7a0b\u5e8f\uff08CalPotential4.f90\u6587\u4ef6\uff09\u5b9e\u73b0\u7684\u3002\u5728\u8fd9\u4e00\u5b50\u7a0b\u5e8f\u4e2d\uff0c\u901a\u8fc7\u8c03\u7528\u4e00\u7cfb\u5217\u5f62\u5f0f\u4e3aCalculateHartree*\u7684\u5b50\u7a0b\u5e8f\u6765\u5b9e\u73b0\u8f93\u5165\u7684\u7535\u8377\u5bc6\u5ea6rhoIn\u5230\u5e93\u4ed1\u52bfpotential\u7684\u8ba1\u7b97\uff0c\u6ce8\u610f\u8fd9\u4e24\u4e2a\u6570\u7ec4\u7684\u5927\u5c0f\u603b\u662f\u4e00\u81f4\u7684\u3002\u4e0b\u9762\u5148\u6765\u4ecb\u7ecd\u8fd9\u4e9b\u5b50\u7a0b\u5e8f\u7684\u76f8\u5173\u53c2\u6570\uff1a<\/p>\n\n\n\n<div class=\"wp-block-group\" id=\"code_PotPlus\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>(1) HartInit\u6a21\u5757\u4e2d\u7684CalculateHartreePotPlus\u5b50\u7a0b\u5e8f\uff08HartInit.f90\u6587\u4ef6\uff09\uff0c\u8fd9\u4e00\u5b50\u7a0b\u5e8f\u4f7f\u7528\u5168\u5c40\u7b97\u6cd5\u8ba1\u7b97\u5e93\u4ed1\u52bf\uff0c\u9700\u8981\u8fdb\u884c\u4e24\u6b21DG-FFT\u8ba1\u7b97\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"fortran\" class=\"language-fortran\">subroutine CalculateHartreePotPlus(\n\treal*8, dimension( *, *, * )  \trhoIn,\n\treal*8, dimension( *, *, * )  \tpotential,\n\tlogical  \t\t\t\t\t\tcalcEnergy,\n\treal*8, dimension(9)  \t\t\tlocETable\n\t)<\/code><\/pre>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\" id=\"code_SB\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>(2) HartInit\u6a21\u5757\u4e2d\u7684CalculateHartreeSB\u5b50\u7a0b\u5e8f\uff08HartInit.f90\u6587\u4ef6\uff09\uff0c\u8fd9\u4e00\u5b50\u7a0b\u5e8f\u4f7f\u7528\u5206\u5757\u65b9\u6cd5\u8ba1\u7b97\u5e93\u4ed1\u52bf\uff0c\u5373\u4f7f\u7528<a href=\"?p=80\">\u4e0a\u4e00\u7bc7<\/a>\u4e2d\u7684\u8ba1\u7b97\u6d41\u7a0b\u3002<\/p>\n\n\n\n<pre title=\"\" class=\"wp-block-code\"><code lang=\"fortran\" class=\"language-fortran\">subroutine CalculateHartreeSB(\n\treal*8, dimension( *, *, * )  \trhoIn,\n\treal*8, dimension( *, *, * )  \tpotential,\n\tlogical  \t\t\t\t\t\tcalcEnergy,\n\treal*8  \t\t\t\t\t\tenergy_short,\n\treal*8  \t\t\t\t\t\tenergy_long\n\t)<\/code><\/pre>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\" id=\"code_step1\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>(3) HartStep1\u6a21\u5757\u4e2d\u7684CalculateHartree_step1\u5b50\u7a0b\u5e8f\uff08HartStep1.f90\u6587\u4ef6\uff09\uff0c\u8fd9\u4e00\u5b50\u7a0b\u5e8f\u4e0eCalculateHartreePotPlus\u7c7b\u4f3c\uff0c\u4e5f\u662f\u8fdb\u884c\u5168\u5c40\u7684DG-FFT\u8ba1\u7b97\uff0c\u4e0d\u540c\u7684\u662f\u8fd9\u4e00\u5b50\u7a0b\u5e8f\u53ef\u4ee5\u4f7f\u7528\u81ea\u5b9a\u4e49\u7684\u6838\u51fd\u6570\uff0c\u5e76\u4e14\u901a\u8fc7short_kernel_flag\u548clong_kernel_flag\u4e24\u4e2a\u53d8\u91cf\u6765\u5206\u522b\u63a7\u5236\u662f\u5426\u4f7f\u7528\u77ed\u7a0b\u548c\u957f\u7a0b\u9879\u3002 <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"fortran\" class=\"language-fortran\">subroutine CalculateHartree_step1(\n\tlogical  \t\t\t\t\t\tshort_kernel_flag,\n\tlogical  \t\t\t\t\t\tlong_kernel_flag,\n\treal*8, dimension( *, *, * )  \trhoIn,\n\treal*8, dimension( *, *, * )  \tpotential,\n\tlogical  \t\t\t\t\t\tcalcEnergy,\n\treal*8,  \t\t\t\t\t\tenergy_long,\n\treal*8, dimension(9)  \t\t\tlocETable\n\t)<\/code><\/pre>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\" id=\"code_step2\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>(4) HartStep2\u6a21\u5757\u4e2d\u7684CalculateHartree_step2\u5b50\u7a0b\u5e8f\uff08HartStep2.f90\u6587\u4ef6\uff09\uff0c\u901a\u8fc7\u5206\u5757\u65b9\u6cd5\u8ba1\u7b97\u77ed\u7a0b\u5e93\u4ed1\u52bf\uff0c\u5373\u4f7f\u7528<a href=\"?p=80#sec-1\">\u4e0a\u4e00\u7bc7<\/a>\u4e2d\u7684\u7b97\u6cd5\u3002  <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"fortran\" class=\"language-fortran\">subroutine CalculateHartree_step2(\n\treal*8, dimension( *, *, * )  \trhoIn,\n\treal*8, dimension( *, *, * )  \tpotential,\n\tlogical  \t\t\t\t\t\tcalcEnergy,\n\treal*8,  \t\t\t\t\t\tenergy_short\n\t)<\/code><\/pre>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\" id=\"code_step3\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>(5) HartStep3\u6a21\u5757\u4e2d\u7684CalculateHartree_step3\u5b50\u7a0b\u5e8f\uff08HartStep3.f90\u6587\u4ef6\uff09\uff0c\u901a\u8fc7\u5206\u5757\u65b9\u6cd5\u8ba1\u7b97\u957f\u7a0b\u5e93\u4ed1\u52bf\uff0c\u5373\u4f7f\u7528<a href=\"?p=80#sec-2\">\u4e0a\u4e00\u7bc7<\/a>\u4e2d\u7684\u7b97\u6cd5\u3002     <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"fortran\" class=\"language-fortran\">subroutine CalculateHartree_step3(\n\treal*8, dimension( *, *, * )  \trhoIn,\n\treal*8, dimension( *, *, * )  \tpotential,\n\tlogical  \t\t\t\t\t\tcalcEnergy,\n\treal*8,  \t\t\t\t\t\tenergy_long\n\t)<\/code><\/pre>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\" id=\"code_step4\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>(6) HartStep4\u6a21\u5757\u4e2d\u7684CalculateHartree_step4\u5b50\u7a0b\u5e8f\uff08HartStep4.f90\u6587\u4ef6\uff09\uff0c\u4e0eCalculateHartree_step3\u529f\u80fd\u76f8\u4f3c\uff0c\u4e0d\u540c\u4e4b\u5904\u5728\u4e8e\uff08\u5f53calcEnergy\u4e3a.TRUE.\uff09\u65f6\u8fd8\u5c06\u8ba1\u7b97\u5206\u5757\u65b9\u6cd5\u548c\u5168\u5c40\u7b97\u6cd5\u5f97\u5230\u7684Hartree\u80fd\u91cf\u5e76\u8fdb\u884c\u6bd4\u8f83\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"fortran\" class=\"language-fortran\">subroutine CalculateHartree_step4(\n\treal*8, dimension( *, *, * )  \trhoIn,\n\treal*8, dimension( *, *, * )  \tpotential,\n\tlogical  \t\t\t\t\t\tcalcEnergy,\n\treal*8  \t\t\t\t\t\tenergy_long\n\t)<\/code><\/pre>\n<\/div><\/div>\n\n\n\n<p>\u5728CalculatePotentialPlus4\u5b50\u7a0b\u5e8f\u4e2d\u662f\u901a\u8fc7\u5b57\u7b26\u4e32sbtype_har\u6765\u63a7\u5236\u4f7f\u7528\u4e0d\u540c\u7684\u7b97\u6cd5\u6765\u5bf9\u77ed\u7a0b\u548c\u957f\u7a0b\u9879\u8fdb\u884c\u5904\u7406\uff0c\u5177\u4f53\u8bf4\u660e\u5982\u4e0b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>(1) sbtype_har\u4e3a&#8221;DGBX&#8221;\u65f6\uff0c\u4f7f\u7528\u5168\u5c40\u7b97\u6cd5\u8ba1\u7b97\u77ed\u7a0b\u548c\u957f\u7a0b\u9879\uff0c\u76f8\u5e94\u7684\u8c03\u7528\u4e3a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"fortran\" class=\"language-fortran\">call CalculateHartreePotPlus(rhoIn, potential, ...)<\/code><\/pre>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>(2) sbtype_har\u4e3a&#8221;DSBX&#8221;\u65f6\uff0c\u4f7f\u7528\u5206\u5757\u65b9\u6cd5\u8ba1\u7b97\u77ed\u7a0b\u548c\u957f\u7a0b\u9879\uff0c\u76f8\u5e94\u7684\u8c03\u7528\u4e3a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"fortran\" class=\"language-fortran\">call CalculateHartreeSB(rhoIn, potential, ...)<\/code><\/pre>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>(3) sbtype_har\u4e3a&#8221;DGT1&#8243;\u65f6\uff0c\u4f7f\u7528\u5168\u5c40\u7b97\u6cd5\u8ba1\u7b97\u77ed\u7a0b\u548c\u957f\u7a0b\u9879\uff0c\u4f46\u662f\u4f7f\u7528\u81ea\u5b9a\u4e49\u7684\u6838\u51fd\u6570\uff0c\u76f8\u5e94\u7684\u8c03\u7528\u4e3a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"fortran\" class=\"language-fortran\">call CalculateHartree_step1('TRUE', 'TRUE', rhoIn, potential, ...)<\/code><\/pre>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>(4) sbtype_har\u4e3a&#8221;DGT2&#8243;\u65f6\uff0c\u77ed\u7a0b\u9879\u4f7f\u7528\u5206\u5757\u7b97\u6cd5\uff0c\u957f\u7a0b\u9879\u4f7f\u7528\u5168\u5c40\u7b97\u6cd5\uff0c\u76f8\u5e94\u7684\u8c03\u7528\u4e3a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"fortran\" class=\"language-fortran\">call CalculateHartree_step1('FALSE', 'TRUE', rhoIn, potential, ...)\ncall CalculateHartree_step2(rhoIn, potential, ...)<\/code><\/pre>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>(5) sbtype_har\u4e3a&#8221;DGT3&#8243;\u65f6\uff0c\u77ed\u7a0b\u9879\u4f7f\u7528\u5168\u5c40\u7b97\u6cd5\uff0c\u957f\u7a0b\u9879\u4f7f\u7528\u5206\u5757\u7b97\u6cd5 \uff0c\u76f8\u5e94\u7684\u8c03\u7528\u4e3a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"fortran\" class=\"language-fortran\">call CalculateHartree_step1('TRUE', 'False', rhoIn, potential, ...)\ncall CalculateHartree_step3(rhoIn, potential, ...)<\/code><\/pre>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>(6) sbtype_har\u4e3a&#8221;DGT4&#8243;\u65f6\uff0c\u4e0e(5)\u8ba1\u7b97\u6548\u679c\u76f8\u540c\uff0c\u589e\u52a0\u5168\u5c40\u7b97\u6cd5\u8ba1\u7b97\u957f\u7a0b\u9879\u5e76\u4e0e\u5206\u5757\u65b9\u6cd5\u8fdb\u884c\u6bd4\u8f83 \uff0c\u76f8\u5e94\u7684\u8c03\u7528\u4e3a\uff1a <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"fortran\" class=\"language-fortran\">call CalculateHartree_step1('TRUE', 'False', rhoIn, potential, ...)\ncall CalculateHartree_step4(rhoIn, potential, ...)<\/code><\/pre>\n<\/div><\/div>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230&#8221;DGBX&#8221;\u548c&#8221;DSBX&#8221;\u9009\u9879\u662f\u5e38\u7528\u7684\uff0c\u5206\u522b\u5bf9\u5e94\u5168\u5c40\u7b97\u6cd5\u548c<a href=\"?p=80\">\u4e0a\u4e00\u7bc7<\/a>\u4e2d\u4ecb\u7ecd\u7684\u5206\u5757\u7b97\u6cd5\uff0c&#8221;DGT*&#8221;\u9009\u9879\u53ef\u4ee5\u7528\u4e8e\u6d4b\u8bd5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ece\u672c\u7bc7\u5f00\u59cb\uff0c\u5c06\u5f00\u59cb\u5bf9\u4e8eSBFFT\u76f8\u5173\u4ee3\u7801\u7684\u5b66\u4e60\u3002\u6211\u4f7f\u7528\u7684\u662f\u5317\u4eac\u5927\u5b66\u9648\u9ed8\u6db5\u8001\u5e08\u4f7f\u7528Fortran 03\u8bed\u8a00\u7f16\u5199\u7684 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,9,6],"tags":[8,5],"class_list":["post-142","post","type-post","status-publish","format-standard","hentry","category-7","category-9","category-6","tag-fortran","tag-small-box-fft"],"_links":{"self":[{"href":"https:\/\/ru.yemeng.site\/index.php?rest_route=\/wp\/v2\/posts\/142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ru.yemeng.site\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ru.yemeng.site\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ru.yemeng.site\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ru.yemeng.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=142"}],"version-history":[{"count":12,"href":"https:\/\/ru.yemeng.site\/index.php?rest_route=\/wp\/v2\/posts\/142\/revisions"}],"predecessor-version":[{"id":218,"href":"https:\/\/ru.yemeng.site\/index.php?rest_route=\/wp\/v2\/posts\/142\/revisions\/218"}],"wp:attachment":[{"href":"https:\/\/ru.yemeng.site\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ru.yemeng.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ru.yemeng.site\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}