source: src/Fragmentation/Summation/SetValues/SamplingGrid_inline.hpp@ cdac1d

SaturateAtoms_singleDegree
Last change on this file since cdac1d was b5f548, checked in by Frederik Heber <heber@…>, 12 years ago

FIX: Shifted all helper functions from SamplingGrid to ..Properties.

  • these functions just rely on member values of ..Properties and allow for using the properties as replacement to the full grid when its values (and the window) are of no more interest.
  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 * SamplingGrid_inline.hpp
3 *
4 * Created on: Jan 27, 2013
5 * Author: heber
6 */
7
8#ifndef SAMPLINGGRID_INLINE_HPP_
9#define SAMPLINGGRID_INLINE_HPP_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16#include "SamplingGrid.hpp"
17
18#ifdef HAVE_INLINE
19inline
20#endif
21const double SamplingGrid::getWindowVolume() const
22{
23 double volume = 1.;
24 for (size_t i=0;i<3;++i)
25 volume *= end_window[i]-begin_window[i];
26 return volume;
27}
28
29#ifdef HAVE_INLINE
30inline
31#endif
32const double SamplingGrid::getWindowLengthPerAxis(const size_t axis) const
33{
34 return (end_window[axis] - begin_window[axis]);
35}
36
37#ifdef HAVE_INLINE
38inline
39#endif
40const size_t SamplingGrid::getWindowGridPoints() const
41{
42 return getWindowGridPointsPerAxis(0)
43 *getWindowGridPointsPerAxis(1)
44 *getWindowGridPointsPerAxis(2);
45}
46
47#ifdef HAVE_INLINE
48inline
49#endif
50void SamplingGrid::setDomainSize(
51 const double _begin[3],
52 const double _end[3])
53{
54 for (size_t index=0;index<3;++index) {
55 begin[index] = _begin[index];
56 end[index] = _end[index];
57 }
58}
59
60#endif /* SAMPLINGGRID_INLINE_HPP_ */
Note: See TracBrowser for help on using the repository browser.