Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/cmu-ci-lab/mcspeckle
30 June 2024, 09:00:48 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
Revision 8572b98d593e12fddfdf90947c7f9fb937e0a685 authored by igkiou on 10 August 2017, 23:15:04 UTC, committed by igkiou on 10 August 2017, 23:15:04 UTC
flag
1 parent b21666c
  • Files
  • Changes
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • 8572b98d593e12fddfdf90947c7f9fb937e0a685
    No releases to show
  • 154b76e
  • /
  • emc
  • /
  • README.txt
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
  • snapshot
origin badgerevision badge
swh:1:rev:8572b98d593e12fddfdf90947c7f9fb937e0a685
origin badgedirectory badge
swh:1:dir:6ed76ddfa4df728b5e365c3fdd579d7d1b5f67be
origin badgecontent badge
swh:1:cnt:2a144aa1ef2bff156a1f0509921cf7612725611e
origin badgesnapshot badge
swh:1:snp:3a35cdb24ad67a89d2a1abf099040aff3c71b7b4

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 8572b98d593e12fddfdf90947c7f9fb937e0a685 authored by igkiou on 10 August 2017, 23:15:04 UTC
flag
Tip revision: 8572b98
README.txt
====================================================
Release 0.5 of Electric Field Monte Carlo code (EMC)

Dr. Min Xu <minxu@sci.ccny.cuny.edu>
see COPYRIGHT
====================================================

1. Pre-requirements
EMC depends on the installation of certain softwares.

(a) a C++ compiler
   GNU C++ should be fine. The compiler should support templates.
 
(b) MIEV package by Dr. Warren J. Wiscombe
(wiscombe@climate.gsfc.nasa.gov).
   This is an excellent code for Mie calculations.

(c) mtwist-0.5 package by Prof. Geoff Kuenning at Harvey Mudd College
(geoff@cs.hmc.edu). 
   This is an Mersenne Twist Pseudorandom Number Generator
   Package. The Mersenne Twist method for generating pseudorandom 
   numbers is an extremely fast, flexible, and desirable approach to
   random-number generation. It has superb statistical properties and
   a ridiculously long period (2^19937-1).

(d) Netcdf package (optional)
   Netcdf API is used in some examples coming with EMC to store
   simulation outputs. The benefit of using netcdf files is the
   platform-independence of these files.

I have included parts of (a-c) in the distribution only for the purpose 
your convenience. Full credit should be given to respective authors.

2. EMC
EMC package is implemented in C++ and contained in three headers
files. We use x as the size parameter of the particle, m the complex
relative refractive index, S1 and S2 are the diagonal elements of the
amplitude scattering matrix (whose off-diagonal elements are zero) in 
convention of Hulst.

dmiev.h:	a C interface for MIEV package, used by scatterer.h

scatterer.h:	a C++ header implementing a class "scatterer". The key
		methods include: 
		 
		 // N and nslot can be increased for a higher accuracy
		 // of the forward and inverse table.
		 scatterer(double x, dcmplx m, int N=10001, int nslot=10000);
		 
		 // obtain S1 and S2 at a list of cosines of angles of
		 // length n
		 phasef(int n, double* mu, dcmplx* s1, dcmplx* s2);
		 
		 // obtain S1 and S2 at the cosine of one angle mu
		 phasef(double mu, dcmplx* s1, dcmplx* s2);

		 // a quicker version using the lookup table pre-computed
		 phasef_lu(double mu, dcmplx* s1, dcmplx* s2);

		 // yield the scattering angle given the probability
		 // within (0,1) using the inverse table pre-computed
		 draw_mu(double p);


pol_montecarlo.h:	the core header file of EMC implementing a
		class "photonPacket". The key methods include:

		 // initialization
		 photonPacket(const scatterer* sct, char* fname=NULL,
		 unsigned long seed=0); 
		 
		 // launch the photons. The incident electric field is
		 // given by (E1, E2) where light is propagating in the
		 // direction (u, v, w), E1 is in the direction (l, m,
		 // n), and E2 is in the direction specified by the cross 
		 // product of the above two directions. Light is
		 // incident upon the position (x,y,z) at time t. The
		 // incident light intensity must be unity (|E1|^2 +
		 // |E2|^2=1) and the directions must be unit vectors.
		 void launch(dcmplx E1=1, dcmplx E2=0, double l=1,
		 double m=0, double n=0, double u=0, double v=0,
		 double w=1, double x=0, double y=0, double z=0,
		 double t=0); 

		 // move to next scattering or absorption event
		 void move();

		 // absorption event
		 void absorb();

		 // scattering event
		 void scatter();

		 // next event estimator of (Ed1, Ed2) with the
                 // direction vector Q at time td crossing the boundary
                 // z=zd in the direction (ud, vd, wd) 
		 void pointestimator(double *td, double *deposit,
                 double Q[3][3], dcmplx *Ed1, dcmplx *Ed2, double zd,
                 double ud=0, double vd=0, double wd=1); 

                
		The photon status is stored in the public data members
                of the class, they are:

		 xold, yold, zold, told:
		 the position and time of the previous scattering
		 event

		 x, y, z, t, weight:
		 the current position and time of photon and its weight

		 E1, E2:
		 electric field components

	         P[3][3]:
		 (l, m, n) the unit vector for E1 direction
		 (p, q, r) the unit vector for E2 direction
		 (u, v, w) the propagation direction

		 nsct:                   
		 number of scattering events
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API