Solutions+1

Solutions 1 - for int n =-lim n<= lim n Real x = m a 0.5 n a Real y = n a sqrt 3.0 2 Real r = sqrt(x*x y*y if(r!= 0.0 v = 0.5 exp-r 1(r*r*r 1.0

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
0.6 0.8 1 1.2 1.4 a -2 -1.5 -1 -0.5 0 E/(N q 0 )
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Page 1 of 1 latsum.cc 10/7/11 2:32 PM #define THIS_IS_MAIN #include "matrix.h" #include "indent.h" #include <iomanip> #include <fstream> using namespace std; const int lim = 100 ; int main( int argc, char * argv[]) { for (Real a = 0.5 ; a <= 1.5 ; a += 0.01 ) { Real v = 0 ; for ( int m = -lim; m <= lim; m++)
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: for ( int n = -lim; n <= lim; n++) { Real x = m * a + 0.5 * n * a; Real y = n * a * sqrt( 3.0 )/ 2 ; Real r = sqrt(x*x+y*y); if (r != 0.0 ) v += 0.5 * exp(-r) * ( 1 /(r*r*r) - 1.0 ); } cout << a SP v << endl; } } #ifdef THIS_IS_MAIN #endif...
View Full Document

This note was uploaded on 12/12/2011 for the course PHYS 238 taught by Professor Staff during the Fall '11 term at UC Irvine.

Page1 / 8

Solutions 1 - for int n =-lim n<= lim n Real x = m a 0.5 n a Real y = n a sqrt 3.0 2 Real r = sqrt(x*x y*y if(r!= 0.0 v = 0.5 exp-r 1(r*r*r 1.0

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online