Graph Framework
Loading...
Searching...
No Matches
dispersion_test.cpp File Reference

Tests for math nodes. More...

#include <cassert>
#include "../graph_framework/dispersion.hpp"

Functions

template<dispersion::function DISPERSION>
void test_solve (const typename DISPERSION::base tolarance, const typename DISPERSION::base omega, const typename DISPERSION::base k_guess, equilibrium::shared< typename DISPERSION::base > &eq)
 The newton solve for dispersion relation.
 
template<jit::float_scalar T>
void run_tests (const T tolarance)
 Run tests with a specified backend.
 
int main (int argc, const char *argv[])
 Main program of the test.
 

Detailed Description

Tests for math nodes.

Function Documentation

◆ main()

int main ( int  argc,
const char *  argv[] 
)

Main program of the test.

Parameters
[in]argcNumber of commandline arguments.
[in]argvArray of commandline arguments.

◆ run_tests()

template<jit::float_scalar T>
void run_tests ( const T  tolarance)

Run tests with a specified backend.

Template Parameters
TBase type of the calculation.
Parameters
[in]tolaranceTolarance to solver the dispersion function to.

◆ test_solve()

template<dispersion::function DISPERSION>
void test_solve ( const typename DISPERSION::base  tolarance,
const typename DISPERSION::base  omega,
const typename DISPERSION::base  k_guess,
equilibrium::shared< typename DISPERSION::base > &  eq 
)

The newton solve for dispersion relation.

Template Parameters
DISPERSIONClass of dispersion function to use.
Parameters
[in]tolaranceTolarance to solver the dispersion function to.
[in]omegaRay frequency.
[in]k_guessInital guess for the wave number.
[in,out]eqThe equilibrium.