-
Notifications
You must be signed in to change notification settings - Fork 7
/
FeynRules.m
51 lines (38 loc) · 1.22 KB
/
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
44
45
46
47
48
49
50
51
(* ::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:: *)
(*Compatibility with Mathematica 12.2*)
If[$VersionNumber>=12.2, SetOptions[ValueQ, Method->"Legacy"]];
(* ::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={};
If[$VersionNumber>=12.2, SetOptions[ValueQ, Method->"Legacy"]]; (* Compatilibity with Mathematica 12.2 *)
SetDirectory[$FeynRulesPath];
Get[ToFileName[$FeynRulesPath, "FeynRulesPackage.m"]];
$Output={OutputStream["stdout",1]};
];
];
(*End Parallelize - NC*)
,
Print["Package already loaded..."]];