⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 atomlaser.xmds

📁 XMDS is a code generator that integrates equations. You write them down in human readable form in a
💻 XMDS
字号:
<?xml version="1.0"?><!-- Stochastic atom laser simulation --><!-- $Id: atomlaser.xmds,v 1.21 2004/11/02 22:51:34 joehope Exp $ --><!--  Copyright (C) 2000-2004                                           --><!--                                                                    --><!--  Code contributed by Greg Collecutt, Joseph Hope and Paul Cochrane --><!--                                                                    --><!--  This file is part of xmds.                                        --><!--                                                                    --><!--  This program is free software; you can redistribute it and/or     --><!--  modify it under the terms of the GNU General Public License       --><!--  as published by the Free Software Foundation; either version 2    --><!--  of the License, or (at your option) any later version.            --><!--                                                                    --><!--  This program is distributed in the hope that it will be useful,   --><!--  but WITHOUT ANY WARRANTY; without even the implied warranty of    --><!--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     --><!--  GNU General Public License for more details.                      --><!--                                                                    --><!--  You should have received a copy of the GNU General Public License --><!--  along with this program; if not, write to the Free Software       --><!--  Foundation, Inc., 59 Temple Place - Suite 330, Boston,            --><!--  MA  02111-1307, USA.                                              --><simulation>    <!-- Global system parameters and functionality -->    <name>atomlaser</name>     <author>Joseph Hope</author>    <description>      Stochastic atom laser simulation    </description>    <stochastic>no</stochastic>     <prop_dim>t</prop_dim>    <use_mpi>no</use_mpi>    <error_check>yes</error_check>    <bing>yes</bing>    <use_wisdom>yes</use_wisdom>        <!-- Default is no -->    <benchmark>yes</benchmark>          <!-- Default is no -->    <use_prefs>yes</use_prefs>           <!-- Default is yes -->    <!-- Command line arguments -->    <argv>	<arg>	    <name>kick</name>	    <type>double</type>	    <default_value>-1.0e6</default_value>	</arg>	<arg>	    <name>kappamax</name>	    <type>double</type>	    <default_value>1.0e2</default_value>	</arg>    </argv>        <!-- Global variables for the simulation -->    <globals>	<![CDATA[	    /* physical constants  */	    const double omegax = 25;	    const double g = 9.8;	    // const double kappamax = 1.0e2; // now in <argv> tags	    // const double kick = -1.0e6;    // now in <argv> tags	    const double hbar = 1.05500000000e-34;	    const double M = 1.409539200000000e-25;	    /* absorbing boundary constants */	    const double dpow = 1;	    const double absorbleft = 4.0e4/pow(2.,dpow);	    const double absorbright = 4.0e4/pow(2.,dpow);	    const double xleft = -7.0e-5;	    const double widthl = 3.0e-5;	    const double xright = 5.0e-5;	    const double widthr = 3.0e-5;	    	    /* numerical shift constant  */	    const double ko=-2.5e7;	    ]]>    </globals>      <!-- Field to be integrated over -->    <field>	<name>main</name>	<dimensions>     x      </dimensions>	<lattice>      2048     </lattice>	<domains>(-1.0e-4,8.0e-5)</domains>	<samples>1</samples>	<vector>	    <name>main</name>	    <type>complex</type>	    <components>phi</components>	    <fourier_space> no </fourier_space>	    <!-- <filename format="ascii"> atomlaserinput.dat </filename> -->	    <![CDATA[		const double realfn = pow(M*omegax/M_PI/hbar,1/4.0)*exp(-x*x*M*omegax/2/hbar);		phi = realfn*c_exp(rcomplex(0,(kick-ko)*x));		]]>	</vector>	<vector>	    <name> vc1 </name>	    <type>double</type>	    <components>V damping</components>	    <fourier_space> no </fourier_space>	    <![CDATA[		V = M*g*x/hbar;		damping = x<xleft ? -absorbleft*pow(1-cos(M_PI*(xleft-x)/widthl),dpow)				  : ( x>xright ? -absorbright*pow(1-cos(M_PI*(x-xright)/widthr),dpow): 0);   		]]>	</vector>    </field>    <!-- The sequence of integrations to perform -->    <sequence>	<integrate>	    <algorithm>RK4IP</algorithm>	    <interval>1.0e-7</interval>	    <lattice>1600</lattice>	    <samples>4</samples>	    <k_operators>		<constant>yes</constant>		<operator_names>KE</operator_names>		<![CDATA[		    KE = rcomplex(0,-hbar/M/2*(kx+ko)*(kx+ko));		    ]]>	    </k_operators>	    <vectors> main vc1 </vectors>	    <![CDATA[		dphi_dt = KE[phi] +(damping-i*V)*phi;		]]>	</integrate>    </sequence>    <!-- The output to generate -->    <!-- precision="double|single" (double is default option) -->    <output format="binary">        <!-- enabled="yes|no" (yes is default option) -->        <breakpoint enabled="yes">	    <!-- should the filename be some default name?? -->	    <!-- A: yes.  <simname>_break.dat -->	    <!-- status="unknown|old|new" -->	    <!-- "unknown" : breakpoint input may exist, but not necessarily (default option) -->	    <!-- "old" : breakpoint input must exist, barf if not found -->	    <!-- "new" : breakpoint input not used, input file overwritten if exists -->	    <!-- format="binary|ascii" (binary is default option) -->	    <filename status="new" format="ascii">atomlaser_break.dat</filename>	</breakpoint>	<group>	    <sampling>		<fourier_space>no</fourier_space>		<lattice>2048</lattice>		<moments>phir phii</moments>		<![CDATA[		    phir = phi;		    phii = -i*phi;		    ]]>	    </sampling>	</group>    </output></simulation>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -