7 # The contents of this file are subject to the terms of the Common Development
8 # and Distribution License Version 1.0 (the "License").
10 # You can obtain a copy of the license at
11 # http://www.opensource.org/licenses/CDDL-1.0. See the License for the
12 # specific language governing permissions and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each file and
15 # include the License file in a prominent location with the name LICENSE.CDDL.
16 # If applicable, add the following below this CDDL HEADER, with the fields
17 # enclosed by brackets "[]" replaced with your own identifying information:
19 # Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
25 # Copyright (c) 2013--2015, Regents of the University of Minnesota.
26 # All rights reserved.
34 flName=LennardJones612ImplementationComputeDispatch.cpp
36 printf "switch (GetComputeIndex(isComputeProcess_dEdr,\n" > $flName
37 printf " isComputeProcess_d2Edr2,\n" >> $flName
38 printf " isComputeEnergy,\n" >> $flName
39 printf " isComputeForces,\n" >> $flName
40 printf " isComputeParticleEnergy,\n" >> $flName
41 printf " isComputeVirial,\n" >> $flName
42 printf " isComputeParticleVirial,\n" >> $flName
43 printf " isShift))\n" >> $flName
44 printf "{\n" >> $flName
47 for processdE in false true; do
48 for processd2E in false true; do
49 for energy in false true; do
50 for force in false true; do
51 for particleEnergy in false true; do
52 for virial in false true; do
53 for particleVirial in false true; do
54 for sshift in false true; do
55 printf " case $i:\n" >> $flName
56 printf " ier = Compute<$processdE, $processd2E, " >> $flName
57 printf "$energy, $force, " >> $flName
58 printf "$particleEnergy, $virial, " >> $flName
59 printf "$particleVirial, $sshift>(\n" >> $flName
60 printf " modelCompute,\n" >> $flName
61 printf " modelComputeArguments,\n" >> $flName
62 printf " particleSpeciesCodes,\n" >> $flName
63 printf " particleContributing,\n" >> $flName
64 printf " coordinates,\n" >> $flName
65 printf " energy,\n" >> $flName
66 printf " forces,\n" >> $flName
67 printf " particleEnergy,\n" >> $flName
68 printf " *virial,\n" >> $flName
69 printf " particleVirial);\n" >> $flName
70 printf " break;\n" >> $flName
81 printf " default:\n" >> $flName
82 printf " std::cout << \"Unknown compute function index\" << std::endl;\n" >> $flName
83 printf " ier = true;\n" >> $flName
84 printf " break;\n" >> $flName
85 printf "}\n" >> $flName