本文整理汇总了C++中Force::setup方法的典型用法代码示例。如果您正苦于以下问题:C++ Force::setup方法的具体用法?C++ Force::setup怎么用?C++ Force::setup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Force
的用法示例。
在下文中一共展示了Force::setup方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
}
if((strcmp(argv[i],"-tex")==0)||(strcmp(argv[i],"--texture")==0)) {use_tex=atoi(argv[++i]); continue;}
if((strcmp(argv[i],"-tpa")==0)) {threads_per_atom=atoi(argv[++i]); continue;}
if((strcmp(argv[i],"-h")==0)||(strcmp(argv[i],"--help")==0))
{
printf("\n---------------------------------------------------------\n");
printf("-------------" VARIANT_STRING "------------\n");
printf("---------------------------------------------------------\n\n");
printf("miniMD is a simple, parallel molecular dynamics (MD) code,\n"
"which is part of the Mantevo project at Sandia National\n"
"Laboratories ( http://www.mantevo.org ).\n"
"The original authors of MPI based miniMD are Steve Plimpton ([email protected]) ,\n"
"Paul Crozier ([email protected]) with current versions \n"
"written by Christian Trott ([email protected]).\n\n");
printf("Commandline Options:\n");
printf("\n Execution configuration:\n");
printf("\t-t / --num_threads <threads>: set number of threads per block (default 32)\n");
printf("\t--half_neigh <int>: use half neighborlists (default 0)\n"
"\t 0: full neighborlist\n"
"\t 1: half neighborlist (not supported in OpenCL variant)\n"
"\t -1: original miniMD half neighborlist force \n"
"\t (not supported in OpenCL variant)\n");
printf("\t-d / --device <int>: select device (default 0)\n");
printf("\t-dm / --device_map: map devices to MPI ranks\n");
printf("\t-ng / --num_gpus <int>: give number of GPUs per Node (used in conjuction with -dm\n"
"\t to determine device id: 'id=mpi_rank%%ng' (default 2)\n");
printf("\t--skip_gpu <int>: skip the specified gpu when assigning devices to MPI ranks\n"
"\t used in conjunction with -dm (but must come first in arg list)\n");
printf("\t-p / --platform <int>: select platform (default 0)\n");
printf("\t-sse <sse_version>: use explicit sse intrinsics (use miniMD-SSE variant)\n");
printf("\t-gn / --ghost_newton <int>: set usage of newtons third law for ghost atoms\n"
"\t (only applicable with half neighborlists)\n");
printf("\n Simulation setup:\n");
printf("\t-i / --input_file <string>: set input file to be used (default: in.lj.miniMD)\n");
printf("\t-n / --nsteps <nsteps>: set number of timesteps for simulation\n");
printf("\t-s / --size <size>: set linear dimension of systembox and neighbor bins\n");
printf("\t-b / --neigh_bins <int>: set linear dimension of neighbor bin grid\n");
printf("\t-u / --units <string>: set units (lj or metal), see LAMMPS documentation\n");
printf("\t-p / --force <string>: set interaction model (lj or eam)\n");
printf("\t-f / --data_file <string>: read configuration from LAMMPS data file\n");
printf("\n Miscelaneous:\n");
printf("\t--check_exchange: check whether atoms moved further than subdomain width\n");
printf("\t--safe_exchange: perform exchange communication with all MPI processes\n"
"\t within rcut_neighbor (outer force cutoff)\n");
printf("\t--yaml_output <int>: level of yaml output (default 0)\n");
printf("\t--yaml_screen: write yaml output also to screen\n");
printf("\t-tex / --texture <int>: use texture cache in force kernel (default 0)\n");
printf("\t-h / --help: display this help message\n\n");
printf("---------------------------------------------------------\n\n");
exit(0);
}
}
Atom atom;
Force force;
Neighbor neighbor;
Integrate integrate;
Thermo thermo;
Comm comm;
Timer timer;
ThreadData threads;
if(in.forcetype == FORCEEAM) {
示例2: main
//.........这里部分代码省略.........
if((strcmp(argv[i], "-gn") == 0) || (strcmp(argv[i], "--ghost_newton") == 0)) {
ghost_newton = atoi(argv[++i]);
continue;
}
if((strcmp(argv[i], "-h") == 0) || (strcmp(argv[i], "--help") == 0)) {
printf("\n-----------------------------------------------------------------------------------------------------------\n");
printf("-------------" VARIANT_STRING "--------------------\n");
printf("-------------------------------------------------------------------------------------------------------------\n\n");
printf("miniMD is a simple, parallel molecular dynamics (MD) code,\n"
"which is part of the Mantevo project at Sandia National\n"
"Laboratories ( http://www.mantevo.org ).\n"
"The original authors of miniMD are Steve Plimpton ([email protected]) ,\n"
"Paul Crozier ([email protected]) with current\n"
"versions written by Christian Trott ([email protected]).\n\n");
printf("Commandline Options:\n");
printf("\n Execution configuration:\n");
printf("\t--teams <nteams>: set number of thread-teams used per MPI rank (default 1)\n");
printf("\t-t / --num_threads <threads>: set number of threads per thread-team (default 1)\n");
printf("\t--half_neigh <int>: use half neighborlists (default 1)\n"
"\t 0: full neighborlist\n"
"\t 1: half neighborlist\n"
"\t -1: original miniMD half neighborlist force (not OpenMP safe)\n");
printf("\t-d / --device <int>: choose device to use (only applicable for GPU execution)\n");
printf("\t-dm / --device_map: map devices to MPI ranks\n");
printf("\t-ng / --num_gpus <int>: give number of GPUs per Node (used in conjuction with -dm\n"
"\t to determine device id: 'id=mpi_rank%%ng' (default 2)\n");
printf("\t--skip_gpu <int>: skip the specified gpu when assigning devices to MPI ranks\n"
"\t used in conjunction with -dm (but must come first in arg list)\n");
printf("\t-sse <sse_version>: use explicit sse intrinsics (use miniMD-SSE variant)\n");
printf("\t-gn / --ghost_newton <int>: set usage of newtons third law for ghost atoms\n"
"\t (only applicable with half neighborlists)\n");
printf("\n Simulation setup:\n");
printf("\t-i / --input_file <string>: set input file to be used (default: in.lj.miniMD)\n");
printf("\t-n / --nsteps <int>: set number of timesteps for simulation\n");
printf("\t-s / --size <int>: set linear dimension of systembox\n");
printf("\t-nx/-ny/-nz <int>: set linear dimension of systembox in x/y/z direction\n");
printf("\t-b / --neigh_bins <int>: set linear dimension of neighbor bin grid\n");
printf("\t-u / --units <string>: set units (lj or metal), see LAMMPS documentation\n");
printf("\t-p / --force <string>: set interaction model (lj or eam)\n");
printf("\t-f / --data_file <string>: read configuration from LAMMPS data file\n");
printf("\n Miscelaneous:\n");
printf("\t--check_exchange: check whether atoms moved further than subdomain width\n");
printf("\t--safe_exchange: perform exchange communication with all MPI processes\n"
"\t within rcut_neighbor (outer force cutoff)\n");
printf("\t--sort <n>: resort atoms (simple bins) every <n> steps (default: use reneigh frequency; never=0)");
printf("\t-o / --yaml_output <int>: level of yaml output (default 1)\n");
printf("\t--yaml_screen: write yaml output also to screen\n");
printf("\t-h / --help: display this help message\n\n");
printf("---------------------------------------------------------\n\n");
exit(0);
}
}
Atom atom;
Neighbor neighbor;
Integrate integrate;
Thermo thermo;
Comm comm;
Timer timer;
ThreadData threads;