MADNESS  version 0.9
frequencyhandler.h
Go to the documentation of this file.
1 /*
2  This file is part of MADNESS.
3 
4  Copyright (C) 2007,2010 Oak Ridge National Laboratory
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 
20  For more information please contact:
21 
22  Robert J. Harrison
23  Oak Ridge National Laboratory
24  One Bethel Valley Road
25  P.O. Box 2008, MS-6367
26 
27  email: harrisonrj@ornl.gov
28  tel: 865-241-3937
29  fax: 865-572-0680
30 
31  $Id$
32 */
33 #ifndef __frequency_handler__
34 #define __frequency_handler__
35 
36 #include <string>
37 #include <madness/constants.h>
38 #include <madness/mra/mra.h>
39 #include "envelopedpulse.h"
40 
41 using namespace std;
42 using namespace madness;
43 
45 typedef Function<complexd, 3> function;
47 
58 public:
59  const int freq_index;
60  Vector<Function<double, 3>, 3> inc; //< the 3-D incident pulse
61  vecfunc scat; //< the 3-D scattered field
62  const EnvelopedPulse &pulse; //< The incident pulse / simulation parameters
63  World &world; //< The World to use when making functions
64 
67  FrequencyHandler(const int freq, const EnvelopedPulse &_pulse,
68  World &_world) : freq_index(freq), pulse(_pulse), world(_world) {}
69 
73  bool read_file();
74 };
75 
79 class FrequencyIncident : public FunctionFunctorInterface<double, 3> {
80 protected:
81  const EnvelopedPulse &pulse; //< The incident pulse / simulation parameters
82  const CubicInterpolationTable<double> &interp; //< The interpolation data
83 
84 public:
87  const CubicInterpolationTable<double> &_interp) : pulse(_pulse),
88  interp(_interp) {}
89 
93  double operator() (const Vector<double, 3> &pt) const;
94 };
95 
96 #endif
Vector< function, 3 > vecfunc
Definition: frequencyhandler.h:46
std::complex< double > double_complex
Definition: lineplot.cc:16
Main include file for MADNESS and defines Function interface.
double_complex complexd
Definition: frequencyhandler.h:44
Defines common mathematical and physical constants.
const int freq_index
Definition: frequencyhandler.h:59
Definition: mpreal.h:3066
Vector< Function< double, 3 >, 3 > inc
Definition: frequencyhandler.h:60
vecfunc scat
Definition: frequencyhandler.h:61
FrequencyHandler(const int freq, const EnvelopedPulse &_pulse, World &_world)
Definition: frequencyhandler.h:67
FrequencyIncident(const EnvelopedPulse &_pulse, const CubicInterpolationTable< double > &_interp)
Constructor.
Definition: frequencyhandler.h:86
const EnvelopedPulse & pulse
Definition: frequencyhandler.h:81
const CubicInterpolationTable< double > & interp
Definition: frequencyhandler.h:82
const EnvelopedPulse & pulse
Definition: frequencyhandler.h:62
Definition: envelopedpulse.h:52
Definition: nemo.h:65
A parallel world with full functionality wrapping an MPI communicator.
Definition: worldfwd.h:416
A multiresolution adaptive numerical function.
Definition: derivative.h:61
World & world
Definition: frequencyhandler.h:63
Abstract base class interface required for functors used as input to Functions.
Definition: function_interface.h:58
Definition: frequencyhandler.h:79
Holds machinery to set up Functions/FuncImpls using various Factories and Interfaces.
Definition: chem/atomutil.cc:45
Definition: frequencyhandler.h:57