MADNESS  version 0.9
Functions
maxwell.cc File Reference
#include <string>
#include <madness/mra/mra.h>
#include <madness/mra/sdf_shape_3D.h>
#include <madness/constants.h>
#include <madness/misc/interpolation_1d.h>
#include <madness/tensor/gmres.h>
#include "envelopedpulse.h"
#include "frequencyhandler.h"
#include "complex_fun.h"
#include "operator-maxwell.h"
Include dependency graph for maxwell.cc:

Functions

void calcEpshat (const double omega, const double ag_eps, const double ag_sigma, const Function< double, 3 > &ag_shape, Function< complexd, 3 > &epshat, Function< complexd, 3 > &epshatI, Function< complexd, 3 > &lnepshat)
 
void calcScatField (const double omega, const double ag_eps, const double ag_sigma, const Function< double, 3 > &ag_shape, FrequencyHandler &fh, const Function< double, 3 > &box_mask, const Function< double, 3 > &grad_mask, const SeparatedConvolution< double, 3 > &G)
 
int main (int argc, char **argv)
 

Function Documentation

void calcEpshat ( const double  omega,
const double  ag_eps,
const double  ag_sigma,
const Function< double, 3 > &  ag_shape,
Function< complexd, 3 > &  epshat,
Function< complexd, 3 > &  epshatI,
Function< complexd, 3 > &  lnepshat 
)
inline

Function to setup the frequency-dependent complex dielectric constant Needs the frequency, the Ag permittivity, the Ag conductivity, the mask function for distinguishing Ag from vacuum (1 for Ag, 0 for vacuum), and the functions to put: 1) epshat = I omega eps - sigma 2) epshatI = I omega (eps - eps0) - sigma -> Used with the incident field 3) lnepshat = ln(epshat) ... easier to compute with the shape function

These three functions are assumed to be constant in a region, and to vary as the shape function between the two. Calculating lnepshat in this manner, and not as a pointwise ln of epshat, produces smoother results.

References madness::Function< T, NDIM >::add_scalar(), madness::copy(), mpfr::log(), and madness::constants::pi.

Referenced by calcScatField().

void calcScatField ( const double  omega,
const double  ag_eps,
const double  ag_sigma,
const Function< double, 3 > &  ag_shape,
FrequencyHandler fh,
const Function< double, 3 > &  box_mask,
const Function< double, 3 > &  grad_mask,
const SeparatedConvolution< double, 3 > &  G 
)

Function to solve for a scattered field... Needs the frequency, the permittivity/conductivity/shape of Ag, the Frequency handler for storage, the total domain mask to zero out a function near the boundary, an interior mask function to damp out spurious oscillations in derivatives near the boundaries, and the Green's function.

References madness::apply(), calcEpshat(), madness::Function< T, NDIM >::clear(), madness::Function< T, NDIM >::compress(), madness::copy(), EnvelopedPulse::eps0, madness::GMRES(), FrequencyHandler::inc, EnvelopedPulse::mu0, EnvelopedPulse::nm_per_au, madness::plotvtk_begin(), madness::plotvtk_data(), FrequencyHandler::pulse, FrequencyHandler::scat, and FrequencyHandler::world.

Referenced by main().

int main ( int  argc,
char **  argv 
)