CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
gridTesters.cc File Reference
#include "Grid1D.h"
#include "Grid3D.h"
#include <cassert>
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include "LinearGridInterpolator3D.h"

Go to the source code of this file.

Functions

int grid1d_t ()
 
int grid3d_t ()
 

Function Documentation

int grid1d_t ( )

Definition at line 34 of file gridTesters.cc.

References cms::cuda::assert(), getRunAppsInfo::grid, and print().

34  {
35  bool ok = true;
36  Grid1D grid(-10., 10., 11);
37 
38  print(grid, 7.2);
39  print(grid, 10.);
40  print(grid, -10.2);
41  print(grid, 10.2);
42 
43  ok &= testGrid1D(grid);
44 
45  assert(ok ? 0 : 1);
46  return ok ? 0 : 1;
47 }
assert(be >=bs)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
Definition: Grid1D.h:7
int grid3d_t ( )

Definition at line 72 of file gridTesters.cc.

References gather_cfg::cout, getRunAppsInfo::grid, inter, and LinearGridInterpolator3D::interpolate().

72  {
73  Grid3D const* grid = factory();
74 
76 
77  std::cout << inter.interpolate(7.5, 7.2, -3.4) << std::endl;
78  std::cout << inter.interpolate(-0.5, 10.2, -3.4) << std::endl;
79 
80  delete grid;
81  return 0;
82 }
Definition: Grid3D.h:28
int inter
tuple cout
Definition: gather_cfg.py:144