Example #1
0
void run_integration_tests(struct Integrator& i,std::string integrator_name,bool multicomp=true){
    struct integrand_params p;
    p.a = 2.0;
    i.ncomp = 1;
    i.ndim  = 1;
    i.params = (void*) &p;
    printf("#[Info] Integrator: %s\n",integrator_name.c_str());
    printf("\n#[Info] Testing myintegrand0...\n");
    test_integration(i,myintegrand0,myintegrand0_integral);
    printf("\n#[Info] Testing myintegrand1...\n");
    test_integration(i,myintegrand1,myintegrand1_integral);
    if (multicomp){
        i.ncomp = 8;
        i.ndim  = 2;
        printf("\n#[Info] Testing myintegrand_multicomp...\n");
        test_integration(i,myintegrand_multicomp,myintegrand_multicomp_integral);
    }
    printf("\n");
}
Example #2
0
int main(void) {
  test_derivates();
  test_arclength();
  test_integration();
  return 0;
}