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

📄 lane_emden.xmds

📁 XMDS is a code generator that integrates equations. You write them down in human readable form in a
💻 XMDS
字号:
<?xml version="1.0"?><simulation><!-- $Id: lane_emden.xmds,v 1.1 2004/05/31 03:15:40 paultcochrane 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.                                              -->    <name> lane_emden </name>      <!-- the name of the simulation -->    <author> Paul Cochrane </author>  <!-- the author of the simulation -->  <description>    Example simulation of the Lane-Emden equation.    This equation models stellar polytropes.    Taken from the UQ Physics Astrophysics course notes.  </description>    <!-- Global system parameters and functionality -->  <prop_dim> xi </prop_dim>    <!-- name of main propagation dim -->    <error_check> yes </error_check>   <!-- defaults to yes -->  <use_wisdom> yes </use_wisdom>     <!-- defaults to no -->  <benchmark> yes </benchmark>       <!-- defaults to no -->  <use_prefs> yes </use_prefs>       <!-- defaults to yes -->    <argv>    <arg>      <!-- polytropic index -->      <name> n </name>      <type> double </type>      <default_value> 0.0 </default_value>    </arg>  </argv>  <!-- Global variables for the simulation -->  <globals>  <![CDATA[    // initial values of variables    const double theta0 = 1.0;       //   ]]>  </globals>    <!-- Field to be integrated over -->  <field>    <name> main </name>    <samples> 1 </samples>       <!-- sample 1st point of dim? -->        <vector>      <name> main </name>      <type> complex </type>           <!-- data type of vector -->      <components> theta DthetaDxi </components>       <!-- names of components -->      <fourier_space> no </fourier_space> <!-- defined in k-space? -->      <![CDATA[        theta = theta0;        DthetaDxi = 0.0;   // the derivative of theta to xi      ]]>    </vector>  </field>    <!-- The sequence of integrations to perform -->  <sequence>    <integrate>      <algorithm> RK4EX </algorithm> <!-- RK4EX, RK4IP, SIEX, SIIP -->      <interval> 10 </interval>   <!-- how far in main dim? -->      <lattice> 1000 </lattice>     <!-- no. points in main dim -->      <samples> 100 </samples> <!-- no. pts in output moment group -->      <![CDATA[        dtheta_dxi = DthetaDxi;	dDthetaDxi_dxi = -(2.0/(xi+1e-10))*DthetaDxi - pow(theta,n);                ]]>    </integrate>  </sequence>    <!-- The output to generate -->  <output format="ascii">    <group>      <sampling>        <fourier_space> no </fourier_space> <!-- sample in k-space? -->        <lattice> 100 </lattice>           <!-- no. points to sample -->        <moments> thetaOut </moments> <!-- names of moments -->        <![CDATA[          thetaOut = theta;        ]]>      </sampling>    </group>  </output>  </simulation>

⌨️ 快捷键说明

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