亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? nbody_sh1p.c

?? mpi編程
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
               // Time-stamp: <2002-01-18 21:51:36 piet>              // Time-stamp: <2003-21-10 03:22:41 spz>             //================================================================            //                                                                |           //           /__----__                         ........            |          //       .           \                     ....:        :.          |         //       :                 _\|/_         ..:                         |        //       :                   /|\         :                     _\|/_  |       //  ___   ___                  _____                      ___    /|\   |      //  /     |   \    /\ \     / |   |   \  / |        /\    |   \         |     //  |   __ |___/   /  \ \   /  |   |    \/  |       /  \   |___/         |    //   |    | |  \   /____\ \ /   |   |    /   |      /____\  |   \     \/  |   //     \___| |   \ /      \ V    |   |   /    |____ /      \ |___/     |   |  //                                                                      /   | //              :                       _/|     :..                    |/    |//                :..               ____/           :....          ..         |/*   o   //          :.    _\|/_     /                   :........:           | *  O  `//\                 /|\                                               | *  |     /\                                                                  | *============================================================================= * *  nbody_sh1p.C: an N-body integrator with a shared but variable time step *                (the same for all particles but changing in time), using *                the Hermite integration scheme. *                         *                ref.: Hut, P., Makino, J. & McMillan, S., 1995, *                      Astrophysical Journal Letters 443, L93-L96. *                 *                The original version (nbody_sh1.C) has been adapted  *                for a parallel ring algorithm using the MPI library.  *_____________________________________________________________________________ * *  usage: nbody_sh1p [-h (for help)] [-d step_size_control_parameter] *                    [-e diagnostics_interval] [-o output_interval] *                    [-t total_duration] [-i (start output at t = 0)] *                    [-x (extra debugging diagnostics)] *  *         "step_size_control_parameter" is a coefficient determining the *            the size of the shared but variable time step for all particles * *         "diagnostics_interval" is the time between output of diagnostics, *            in the form of kinetic, potential, and total energy; with the *            -x option, a dump of the internal particle data is made as well *  *         "output_interval" is the time between successive snapshot outputs * *         "total_duration" is the integration time, until the program stops * *         Input and output are written from the standard i/o streams.  Since *         all options have sensible defaults, the simplest way to run the code *         is by only specifying the i/o files for the N-body snapshots: * *            nbody_sh1 < data.in > data.out * *         The diagnostics information will then appear on the screen. *         To capture the diagnostics information in a file, capture the *         standard error stream as follows: * *            (nbody_sh1 < data.in > data.out) >& data.err * *  Note: if any of the times specified in the -e, -o, or -t options are not an *        an integer multiple of "step", output will occur slightly later than *        predicted, after a full time step has been taken.  And even if they *        are integer multiples, round-off error may induce one extra step. *_____________________________________________________________________________ * *  External data format: * *     The program expects input of a single snapshot of an N-body system, *     in the following format: the number of particles in the snapshot n; *     the time t; mass mi, position ri and velocity vi for each particle i, *     with position and velocity given through their three Cartesian *     coordinates, divided over separate lines as follows: * *                      n *                      t *                      m1 r1_x r1_y r1_z v1_x v1_y v1_z *                      m2 r2_x r2_y r2_z v2_x v2_y v2_z *                      ... *                      mn rn_x rn_y rn_z vn_x vn_y vn_z * *     Output of each snapshot is written according to the same format. * *  Internal data format: * *     The data for an N-body system is stored internally as a 1-dimensional *     array for particle characteristics collected in a structure. *     The structure contains particle identity, mass, and 1-dimensional  *     arrays for the position, velocity, acceleration and jerk. *     The particle identity is added in the MPI implemetation to prevent  *     computing acceleration and force on itself. *_____________________________________________________________________________ * *  Extera about the MPI implementation * *     The topology assumes a 1-dimensional ring of processors with  *     int(N/p) particles per processor. At the moment only p*int(N/p) *     particles can be integrated; excess of p*int(N/p) particles are ignored  *     in the input and particle residtribution. *     All I/O is via the root processor (0).  * *     Possible adjustments and improvement: *     - It is assumed that each star has a unique identifier, which is  *       provided at runtime. *     - For the comminucation all particle information is passed to other  *       processes, where this is not always required. *     - Since each processor works with N/p particles, little memory per  *       node is requires, the root node, however, requires to store an  *       entire snapshot at I/O. *     - Acceleration and jerk are computed for all particles individually,  *       the symmetry in the force calculation is not used. *_____________________________________________________________________________ * *  Compiling * *    Successfull compilation requires the presence of MPI or some compatible  *    derivative such as MPICH. *    Here we give the command line example for compilation with MPICH  *    assuming that it is installed on your system on /usr/local/MPI * *    First: create the pipe.o object file: *    %> /usr/local/MPI/bin/mpiCC -g -O2 -I/usr/local/MPI/include -c pipe.C * *    Second: compile nbody_sh1p.C and link it with pipe.o: *    %> /usr/local/MPI/bin/mpiCC -g -O2 -I/usr/local/MPI/include \ *          nbody_sh1p.C -L/usr/local/MPI/lib -lmpich pipe.o -o nbody_sh1p *_____________________________________________________________________________ * *  Testrun *  *    Test run with 6 processors by the following command line *    %> /usr/local/MPI/bin/mpirun -np 6 ./nbody_sh1p < n24body.in *_____________________________________________________________________________ * *    version 1:  Jan 2002   Piet Hut, Jun Makino *    version 2:  Okt 2003   Simon Portegies Zwart *_____________________________________________________________________________ */#include  <iostream>#include  <cmath>                          // to include sqrt(), etc.#include  <cstdlib>                        // for atoi() and atof()#include  <unistd.h>                       // for getopt()#include  <mpi.h>                          // include the MPI library#include  "pipe.h"                         // the MPI pipe routinesusing namespace std;typedef double  real;                      // "real" as a general name for the                                           // standard floating-point data type// practical for debugging#define PRI(x) {for (int __pri__ = 0; __pri__ < x; __pri__++) cerr << " ";}#define PR(x)  cerr << #x << " = " << x << " "#define PRC(x) cerr << #x << " = " << x << ",  "#define PRL(x) cerr << #x << " = " << x << endlconst int NDIM = 3;                        // number of spatial dimensionsconst real VERY_LARGE_NUMBER = 1e300;const int root = 0;                        // identity of the root processor// The Particle structuretypedef struct {  int id;  real mass;  real pos[NDIM];  real vel[NDIM];  real acc[NDIM];  real jerk[NDIM];} Particle;void correct_step(Particle p[], Particle po[], int n, real dt);void evolve(Particle p[],            int n, real & t, real dt_param, real dt_dia, real dt_out,            real dt_tot, bool init_out, bool x_flag, void *pipe,	    MPI_Datatype particletype);void evolve_step(Particle p[], int n, real & t,                 real dt, real & epot, real & coll_time,		 void *pipe);void get_acc_jerk_pot_coll(Particle pl[], int nl, 			   Particle po[], int no, 			   real & epot, real & coll_time);Particle * get_snapshot(int &n, real &t, MPI_Datatype &particletype);void predict_step(Particle p[], int n, real dt);void put_snapshot(Particle p[], int n, real t, MPI_Datatype particletype);bool read_options(int argc, char *argv[], real & dt_param, real & dt_dia,                  real & dt_out, real & dt_tot, bool & i_flag, bool & x_flag);void write_diagnostics(Particle p[], int n, real t, real epot,                       int nsteps, real & einit, bool init_flag,                       bool x_flag, real &tcpu);#define loop(idx,last) for (idx = 0; idx < last ; idx++)void uniform(real a, real *x);void uniform(Particle p[], int n);void get_acc_jerk_pot_coll(Particle p[], int n, real &epot, real &coll_time, 			   void *pipe);/*----------------------------------------------------------------------------- *  main  --  reads option values, reads a snapshot, and launches the *            integrator *----------------------------------------------------------------------------- */int main(int argc, char *argv[]){    // initialize MPI    int rank, size;    MPI_Init( &argc, &argv );    MPI_Comm_rank( MPI_COMM_WORLD, &rank );    MPI_Comm_size( MPI_COMM_WORLD, &size );    real  dt_param = 0.03;     // control parameter to determine time step size    real  dt_dia = 1;          // time interval between diagnostics output    real  dt_out = 1;          // time interval between output of snapshots    real  dt_tot = 10;         // duration of the integration    bool  init_out = false;    // if true: snapshot output with start at t = 0                               //          with an echo of the input snapshot    bool  x_flag = false;      // if true: extra debugging diagnostics output    if (! read_options(argc, argv, dt_param, dt_dia, dt_out, dt_tot, init_out,                       x_flag))        return 1;                // halt criterion detected by read_options()    int n;    real t;    MPI_Datatype particletype;    Particle *p = get_snapshot(n, t, particletype);    real noutp = 1;    real dt;    put_snapshot(p, n, t, particletype);    void * pipe;  // Create a MPI pipe for a 1-dimensional ring topology    MPE_Pipe_create( MPI_COMM_WORLD, particletype, n, &pipe );    evolve(p, n, t, dt_param, dt_dia, dt_out, dt_tot, init_out,	   x_flag, pipe, particletype);    delete []p;    MPE_Pipe_free( &pipe );             // Clean up MPI    MPI_Type_free( &particletype );    MPI_Finalize();}/*----------------------------------------------------------------------------- *  read_options  --  reads the command line options, and implements them. * *  note: when the help option -h is invoked, the return value is set to false, *        to prevent further execution of the main program; similarly, if an *        unknown option is used, the return value is set to false. *----------------------------------------------------------------------------- */bool read_options(int argc, char *argv[], real & dt_param, real & dt_dia,                  real & dt_out, real & dt_tot, bool & i_flag, bool & x_flag){    int c;    while ((c = getopt(argc, argv, "hd:e:o:t:ix")) != -1)        switch(c){            case 'h': cerr << "usage: " << argv[0]                           << " [-h (for help)]"

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美中文字幕久久| 国产成人在线看| 欧美日韩国产一级| 欧美精品一区二区三区高清aⅴ| 美日韩一区二区三区| 久久香蕉国产线看观看99| 国产精品77777| 中文字幕一区av| 欧洲精品一区二区| 日韩av在线免费观看不卡| 欧美成人三级电影在线| 国产凹凸在线观看一区二区| 中文字幕日本不卡| 欧美日韩国产片| 国产一区视频网站| 亚洲人成在线播放网站岛国| 欧美色网一区二区| 六月丁香婷婷久久| 中文字幕一区二区三中文字幕| 欧美色爱综合网| 国内精品伊人久久久久影院对白| 欧美精彩视频一区二区三区| 日本伦理一区二区| 久久se这里有精品| 亚洲欧美精品午睡沙发| 日韩欧美激情四射| www.av精品| 麻豆精品在线看| 自拍偷拍欧美精品| 精品奇米国产一区二区三区| 91丝袜高跟美女视频| 美女脱光内衣内裤视频久久影院| 国产精品国产三级国产普通话三级| 在线不卡a资源高清| 国产精品一级片在线观看| 亚洲小说春色综合另类电影| 国产性做久久久久久| 欧美日韩成人在线一区| jlzzjlzz国产精品久久| 日本午夜精品视频在线观看| 日韩理论在线观看| 国产亚洲精久久久久久| 8v天堂国产在线一区二区| 91麻豆国产精品久久| 国产成人免费视| 久久99精品久久久久久| 婷婷综合久久一区二区三区| 亚洲欧洲一区二区三区| 精品蜜桃在线看| 91超碰这里只有精品国产| 94色蜜桃网一区二区三区| 狠狠色综合播放一区二区| 日韩电影免费在线看| 亚洲男人的天堂一区二区| 欧美经典一区二区三区| 精品免费国产二区三区| 欧美精品 日韩| 欧美色网站导航| 在线观看日韩国产| 色哟哟国产精品免费观看| 处破女av一区二区| 国产美女一区二区三区| 久久精品国产网站| 丝袜亚洲精品中文字幕一区| 亚洲一区二区四区蜜桃| 亚洲欧美日韩久久| 国产精品久久久久久久久搜平片| 国产午夜久久久久| 欧美国产日产图区| 久久夜色精品一区| 久久久久国产精品麻豆| 久久久久久黄色| 国产欧美一区在线| 国产精品网站一区| 欧美激情在线免费观看| 国产精品午夜在线| 综合久久国产九一剧情麻豆| 亚洲欧美日韩一区二区三区在线观看| 国产精品久久三| 中文字幕av一区二区三区免费看| 国产日韩av一区二区| 国产欧美视频一区二区三区| 国产免费观看久久| 亚洲裸体xxx| 亚洲第一激情av| 日韩av网站在线观看| 免费三级欧美电影| 国产激情精品久久久第一区二区 | 老司机免费视频一区二区| 婷婷激情综合网| 蜜桃久久久久久| 国产精品99久久久久久久女警| 成人在线视频一区二区| 成人av小说网| 欧美优质美女网站| 欧美本精品男人aⅴ天堂| 国产日韩三级在线| 亚洲男人的天堂网| 日韩精品福利网| 国产成人精品一区二区三区四区 | av成人免费在线观看| 在线视频国内自拍亚洲视频| 717成人午夜免费福利电影| 精品国产一区二区三区久久影院| 久久精品一区二区三区不卡牛牛 | 国产午夜精品久久久久久免费视 | 欧美亚洲一区二区在线| 日韩免费一区二区三区在线播放| 国产日韩欧美a| 午夜精品福利一区二区三区av | 成人高清视频在线| 欧美男人的天堂一二区| 欧美国产日本韩| 天堂va蜜桃一区二区三区漫画版| 国产精品99久久久| 欧美乱妇15p| 亚洲国产精品成人综合| 亚洲大片一区二区三区| 国产凹凸在线观看一区二区| 在线中文字幕不卡| 国产欧美一区二区精品性| 亚洲一二三专区| 高清国产午夜精品久久久久久| 在线观看一区二区视频| 久久久一区二区三区捆绑**| 一区二区久久久久| 成人视屏免费看| 91精品国产综合久久久蜜臀粉嫩| 99精品欧美一区二区三区小说| 亚洲国产精品黑人久久久| 亚洲国产精品久久久久秋霞影院 | 日本不卡一区二区| 久久久99精品久久| 亚洲视频一二三区| 91免费在线播放| 日韩理论片网站| 色88888久久久久久影院按摩 | 1024精品合集| 色哟哟国产精品免费观看| 亚洲伦在线观看| 欧美日韩精品欧美日韩精品一| 午夜精品久久久久久不卡8050| 欧美日韩成人综合在线一区二区 | a级高清视频欧美日韩| 国产精品久久久久精k8| 日本道免费精品一区二区三区| 亚洲一区二区三区激情| 欧美一区二区三区四区在线观看| 免费看欧美美女黄的网站| 久久午夜羞羞影院免费观看| 成人理论电影网| 1区2区3区精品视频| 日本电影亚洲天堂一区| 日韩高清不卡一区二区三区| 欧美成人性福生活免费看| 国产91精品精华液一区二区三区 | 91麻豆精品国产91久久久久| 日本欧美在线观看| 久久这里只有精品视频网| 成人精品一区二区三区四区| 亚洲精品ww久久久久久p站| 欧美日韩国产高清一区二区三区 | 欧美在线看片a免费观看| 日韩1区2区日韩1区2区| 国产视频一区在线播放| 色综合久久久久综合| 午夜精品一区二区三区电影天堂 | 在线不卡免费av| 国产·精品毛片| 亚洲一区二区视频在线观看| 精品日韩一区二区三区免费视频| 成人黄色一级视频| 日韩高清欧美激情| 国产精品国产精品国产专区不蜜| 欧美午夜精品理论片a级按摩| 蜜臀av性久久久久蜜臀aⅴ流畅| 国产精品午夜久久| 777xxx欧美| 99热精品一区二区| 久久精品国产精品青草| 亚洲精品ww久久久久久p站| 精品久久久久久久久久久久包黑料| 不卡一卡二卡三乱码免费网站| 三级不卡在线观看| 国产精品久久久久7777按摩| 日韩一区国产二区欧美三区| 波多野结衣视频一区| 老司机精品视频在线| 一区二区三区中文字幕在线观看| 精品美女在线观看| 精品视频一区二区不卡| 国产凹凸在线观看一区二区| 日韩电影在线一区| 亚洲美女屁股眼交3| 国产色91在线| 日韩免费观看高清完整版 | 国产欧美综合在线观看第十页| 欧美日韩成人一区二区| 99久久免费精品高清特色大片| 麻豆一区二区三|