33 #ifndef __operator_maxwell__
34 #define __operator_maxwell__
62 function dotp = (gradlnepshat[0]*in[0] + gradlnepshat[1]*in[1]
63 + gradlnepshat[2]*in[2]) * box_mask;
67 for(i = 0; i < 3; ++i)
68 preop[i] = diff(dotp, i) * grad_mask;
71 for(i = 0; i < 3; ++i) {
75 preop[i].gaxpy(
complexd(1.0, 0.0), dotp, prefact);
76 out[i] = in[i] -
apply(G, preop[i]);
89 const double _mu0,
const double _eps0,
const vecfunc &_gradlnepshat,
93 prefact(
complexd(0.0, -_omega*_eps0*_mu0)), gradlnepshat(_gradlnepshat),
94 box_mask(_box_mask), grad_mask(_grad_mask), G(_G) {}
std::complex< double > double_complex
Definition: lineplot.cc:16
Main include file for MADNESS and defines Function interface.
double_complex complexd
Definition: operator-maxwell.h:44
Defines common mathematical and physical constants.
Vector< function, 3 > vecfunc
Definition: operator-maxwell.h:46
Definition: operator-maxwell.h:52
Definition: mpreal.h:3066
Defines a general operator interface and a templated GMRES solver for solving linear equations...
EFieldOperator(const function &_epshat, const double _omega, const double _mu0, const double _eps0, const vecfunc &_gradlnepshat, const Function< double, 3 > &_box_mask, const Function< double, 3 > &_grad_mask, const SeparatedConvolution< double, 3 > &_G)
Definition: operator-maxwell.h:88
void action(const vecfunc &in, vecfunc &out) const
The action of the operator.
Definition: operator-maxwell.h:61
const SeparatedConvolution< double, 3 > & G
Definition: operator-maxwell.h:59
const function & epshat
Definition: operator-maxwell.h:54
void clear(bool fence=true)
Clears the function as if constructed uninitialized. Optional fence.
Definition: mra.h:799
const Function< double, 3 > & box_mask
Definition: operator-maxwell.h:57
const Function< double, 3 > & grad_mask
Definition: operator-maxwell.h:58
A multiresolution adaptive numerical function.
Definition: derivative.h:61
double_complex complexd
Definition: envelopedpulse.h:44
Holds machinery to set up Functions/FuncImpls using various Factories and Interfaces.
Definition: chem/atomutil.cc:45
A generic operator: takes in one T and produces another T.
Definition: gmres.h:62
Function< T, NDIM > apply(const Derivative< T, NDIM > &D, const Function< T, NDIM > &f, bool fence=true)
Applies derivative operator to function (for syntactic equivalence to integral operator apply) ...
Definition: derivative.h:613
const vecfunc & gradlnepshat
Definition: operator-maxwell.h:56
const complexd prefact
Definition: operator-maxwell.h:55