Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tueda
Copy link
Collaborator

@tueda tueda commented Nov 24, 2025

Update: This PR depends on:

The former may not be needed depending on how we treat the cache files.

TODO:

  • Move the test file (probably) to check/extra. Tests should be fast enough. Put them in check/diagrams.frm. The core routines moved to check/diagrams/diagrams.h.
  • Define the standard test set. For example, it may include 2-loop amplitudes with commonly used options, like:
    • 0
    • `ONEPARTI_'+`FLOOP_'
  • Add reference-output cache files for the standard test set.
  • Add optional thorough tests that don't run on CI (possibly in check/diagrams).

This PR introduces tests for comparing the diagram generator with QGRAF. The core routines also support FeynGraph, which could be helpful when we implement and test vacuum diagrams in the future (#485). For now, the test cases in the file cover only simple 1-loop diagrams and compare them with QGRAF.

The code contains two #pipe preprocessor instructions. One checks whether a cache file exists (see also #240). The other checks the FeynGraph version, for which I couldn't find any way to get it from the result using a Jinja template.

Open questions:

  • where to place this file (check, check/extra or check/diagrams)
  • whether to use the cache and where to store cache files
  • which test cases should be the defaults if we put this file in check

The CanonicalizeDiagrams procedure may perform better if spectators are used in a smarter way.

@coveralls
Copy link

coveralls commented Nov 24, 2025

Coverage Status

coverage: 53.184% (-4.0%) from 57.152%
when pulling 9dc826b on tueda:pr/test/diagram-comparison
into b25960b on form-dev:master.

@tueda tueda force-pushed the pr/test/diagram-comparison branch from 93412ae to 97fe0e1 Compare November 25, 2025 03:52
@tueda tueda force-pushed the pr/test/diagram-comparison branch 3 times, most recently from 6feac9e to 9dc826b Compare December 9, 2025 12:36
@tueda tueda marked this pull request as draft December 9, 2025 12:48
@tueda tueda force-pushed the pr/test/diagram-comparison branch from 9dc826b to f7b595c Compare January 5, 2026 11:04
tueda added 3 commits January 5, 2026 20:26
The core part of the diagram generator comparison tests. This includes
FORM routines for comparing the diagram generator with QGRAF and
FeynGraph:

http://cefema-gt.tecnico.ulisboa.pt/~paulo/qgraf.html
https://jens-braun.github.io/FeynGraph/
The standard test set of the diagram generator.
@tueda tueda force-pushed the pr/test/diagram-comparison branch from f7b595c to 4436907 Compare January 5, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants