Name: Vladyslav Shtabovenko (email_not_shown)
Date: 08/26/15-11:00:06 PM Z


By the way, I finally found some time to write a wiki article
explaining how to extend FeynCalc 9.0 with new features

https://github.com/FeynCalc/feyncalc/wiki/Development

The new add-ons system is explained here

https://github.com/FeynCalc/feyncalc/wiki/Development#add-ons

I also added a toy add-on "FVProjection"

https://github.com/FeynCalc/feyncalc/tree/master/FeynCalc/AddOns/FVProjection

to the repository, which serves as a minimal working example
and can be used as a template.

Cheers,
Vladyslav

Am 15.07.2015 um 12:38 schrieb Vladyslav Shtabovenko:
> Hi,
>
> the reason for this behavior is that FeynCalc versions
> 4.x - 8.x were doing many "weird" things with Contexts.
>
> When FeynCalc 4 got splitted into many separate files (before it was
> just one big .m file), we (unfortunately) chose not the best way how
> to load the context of those files. Essentially, each function was a
> separate file and each file was a separate package. This way, when the
> user was issuing
>
> <<HighEnergyPhysics`FeynCalc`,System`
>
> he was actually loading hundreds of the packages into MMA's ContextPath.
> This loading system was also very error-prone because a missing
> MakeContext in a "package"-file could easily break the whole code
> inside. This is why in FeynCalc 9 (following Rolf's idea) all this
> context stuff was kicked out in favor of one package with one context
> splitted into many files, where the files are loaded in the same way as
> in the JLink package.
>
> If you really want to stick to FeynCalc 8.2, I guess there is no other
> way as to address the functions you need directly with the full context,
> e.g.
>
> HighEnergyPhysics`FeynCalc`GA`GA
>
> instead of just GA. Have a look at the FaRe package that also uses "old"
> FeynCalc. This is how they do it there:
>
> https://github.com/mrf1g12/FaRe/blob/master/FaRe.m
>
> Cheers,
> Vladyslav
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> The point was
>
>
> Am 15.07.2015 um 02:32 schrieb zhang:
>> Hi, everyone,
>>
>> I use FeynCalc8.2.0 in mathematica 8.
>>
>> I want to define some functions in the context test`.
>> In the definitions of those functions, I want to
>> use some functions in FeynCalc. Besides, functions
>> in test` and functions in FeynCalc` can be used together.
>>
>> However, BeginPackage["test`", "HighEnergyPhysics`FeynCalc`"]
>> leads to $ContextPath {test`,HighEnergyPhysics`FeynCalc`,System`},
>> functions such as GA, SP etc are undefined in this $ContextPath.
>>
>> If we load FeynCalc in test`Private`,i.e.,
>> BeginPackage["test`"]
>> ...
>> Begin["`Private`"]
>> Needs["HighEnergyPhysics`FeynCalc`"]
>> ...
>> ...
>> EndPackage[]
>> Then in the context text`, GA etc can be used.
>> But how should we load FeynCalc outside test`?
>> Needs["HighEnergyPhysics`FeynCalc`"] only
>> add "HighEnergyPhysics`FeynCalc`" to $ContextPath!
>>
>> Thanks
>>
>> zhang
>>
>



This archive was generated by hypermail 2b29 : 09/04/20-12:55:05 AM Z CEST