src
MagneticField
Interpolation
src
Grid3D.cc
Go to the documentation of this file.
1
#include "
Grid3D.h
"
2
#include <iostream>
3
4
/*
5
Grid3D::Grid3D( const Grid1D& ga, const Grid1D& gb, const Grid1D& gc,
6
std::vector<ValueType> const & data) :
7
grida_(ga), gridb_(gb), gridc_(gc) {
8
data_.reserve(data.size());
9
//FIXME use a std algo
10
for (size_t i=0; i<=data.size(); ++i)
11
data_.push_back(ValueType(data[i].x(),data[i].y(),data[i].z()));
12
stride1_ = gridb_.nodes() * gridc_.nodes();
13
stride2_ = gridc_.nodes();
14
}
15
*/
16
17
void
Grid3D::dump
()
const
{
18
for
(
int
j
= 0;
j
<
gridb
().
nodes
(); ++
j
) {
19
for
(
int
k
= 0;
k
<
gridc
().
nodes
(); ++
k
) {
20
for
(
int
i
= 0;
i
<
grida
().
nodes
(); ++
i
) {
21
std::cout
<<
grida
().
node
(
i
) <<
" "
<<
gridb
().
node
(
j
) <<
" "
<<
gridc
().
node
(
k
) <<
" "
<<
operator()
(
i
,
j
,
k
)
22
<< std::endl;
23
}
24
}
25
}
26
}
mps_fire.i
i
Definition:
mps_fire.py:428
Grid3D::grida
const Grid1D & grida() const
Definition:
Grid3D.h:59
dqmiolumiharvest.j
j
Definition:
dqmiolumiharvest.py:66
Grid3D.h
Grid3D::dump
void dump() const
Definition:
Grid3D.cc:17
Grid1D::node
Scalar node(int i) const
Definition:
Grid1D.h:24
Grid1D::nodes
int nodes() const
Definition:
Grid1D.h:21
Grid3D::gridb
const Grid1D & gridb() const
Definition:
Grid3D.h:60
Grid3D::gridc
const Grid1D & gridc() const
Definition:
Grid3D.h:61
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
Grid3D::operator()
ValueType operator()(int i) const
Definition:
Grid3D.h:55
dqmdumpme.k
k
Definition:
dqmdumpme.py:60
Generated for CMSSW Reference Manual by
1.8.14