forked from HEPcodes/FeynRules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FeynRules.m
43 lines (34 loc) · 1013 Bytes
/
FeynRules.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
(* ::Package:: *)
(* ::Title:: *)
(* FeynRules 2 *)
(* ::Text:: *)
(*Authors : A. Alloul, N. Christensen, C. Degrnade, C. Duhr, B. Fuks 2013*)
(* *)
(* *)
(*Wiki-page for the FeynRules package: http://feynrules.irmp.ucl.ac.be/*)
(**)
(* *)
(* ::Section:: *)
(*Main call to the package*)
(* If the package is already loaded, then it will not be loaded again *)
If[FR$Loaded =!= True,
Get[ToFileName[$FeynRulesPath, "FeynRulesPackage.m"]];
(*Parallelize - NC*)
If[FR$Parallel===False,FR$Parallelize=False,FR$Parallelize=True];
If[FR$Parallelize,
If[ValueQ[FR$KernelNumber],
LaunchKernels[FR$KernelNumber],
LaunchKernels[];
FR$KernelNumber = $KernelCount
];
DistributeDefinitions[$FeynRulesPath];
ParallelEvaluate[
$Output={};
SetDirectory[$FeynRulesPath];
Get[ToFileName[$FeynRulesPath, "FeynRulesPackage.m"]];
$Output={OutputStream["stdout",1]};
];
];
(*End Parallelize - NC*)
,
Print["Package already loaded..."]];