https://github.com/cepgen/cepgenfortranprocessexample

A dummy example for a Fortran process implementation in CepGen

https://github.com/cepgen/cepgenfortranprocessexample

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.0%) to scientific vocabulary

Keywords

cepgen
Last synced: 9 months ago · JSON representation

Repository

A dummy example for a Fortran process implementation in CepGen

Basic Info
  • Host: GitHub
  • Owner: cepgen
  • License: gpl-3.0
  • Language: CMake
  • Default Branch: master
  • Size: 32.2 KB
Statistics
  • Stars: 0
  • Watchers: 2
  • Forks: 1
  • Open Issues: 1
  • Releases: 0
Topics
cepgen
Created about 6 years ago · Last pushed about 1 year ago
Metadata Files
Readme Funding License

README.md

Fortran process for CepGen

This repository provides a simple skeletton of an implementation of a Fortran process in CepGen.

As for other CepGen-derived projects, the build system is CMake, and its "standard recipe".

If you are not using a precompiled version of CepGen (i.e. your version of CepGen is built from sources), the CEPGEN_PATH environment variable should be set to the base source directory:

bash export CEPGEN_PATH=/path/to/cepgen/sources

Then, the usual CMake build recipe can be used:

bash mkdir build cd build cmake .. make [-j]

The resulting object is a shared library containing all requirements to define a process in CepGen's runtime environment. By default, the library name is set to CepGenFortranProcess. However you can override it using the PROCESS_NAME CMake variable, i.e. adding the flag -DPROCESS_NAME=MyProcessName in the cmake command.

This .so or .dll library can then be imported through the -a argument of CepGen's main executable, or using the cepgen::loadLibrary statement in custom user-defined executables.

In this example, the dummy_process Fortran double-precision typed function is built from the *.f source files (here, only dummy_process.f, and registered using the ProcessesWrapper.cpp file. This latter acts as a link between the CepGen runtime environment and this new process definition.

In this file, two functions are respectively declaring the main matrix element, and registering it into the runtime database: * DECLARE_FORTRAN_FUNCTION(dummy_process) takes the F77 name of the function as an argument ; * REGISTER_FORTRAN_PROCESS(dummy, "A dummy Fortran process", dummy_process) links this function to a new CepGen process named dummy, described with the second argument.

Once compiled and linked into a shared library, it can be loaded into the CepGen runtime environment and added into the processes collection. For the latter, the main CepGen executable can be steered when providing an extra -a flag linking to this library, i.e. bash $CEPGEN_PATH/bin/cepgen -a libCepGenFortranProcess.so -i cards/dummy_cfg.py

All steering cards (conventionally, for backward compatibility, new ones should be following the Python format) stored in the cards/ directory are copied into a new directory in the build directory, for simplicity.

Owner

  • Name: cepgen
  • Login: cepgen
  • Kind: organization

GitHub Events

Total
  • Issue comment event: 1
  • Push event: 3
  • Pull request event: 1
Last Year
  • Issue comment event: 1
  • Push event: 3
  • Pull request event: 1