gfields
Loading...
Searching...
No Matches
test_gfield_dipole.cc File Reference

Example program that loads a dipole field and evaluates it at random points. More...

#include "gfield_options.h"
#include "gmagneto.h"
#include <iostream>
Include dependency graph for test_gfield_dipole.cc:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 Entry point of the example program.
 

Detailed Description

Summary
Demonstrates the minimal workflow to:

This example is referenced from the module mainpage: example_test_gfield_dipole .

Definition in file test_gfield_dipole.cc.

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )
Parameters
argcNumber of command-line arguments.
argvCommand-line argument array.
Returns
Exit status (EXIT_SUCCESS on normal completion).

Expected configuration:

  • The program expects that options define a field named "dipole" (for example via gmultipoles).

Runtime behavior:

  • Constructs GOptions using gfields::defineOptions().
  • Constructs GMagneto which loads and registers configured fields.
  • If the field exists, evaluates it at 100 random points and discards the results (demonstration only).

Definition at line 51 of file test_gfield_dipole.cc.