Go to the source code of this file.
Defines | |
#define | ABOUT "MOLECULAR DYNAMICS SIMULATOR BY A.V.SMIRNOV\nandrei.v.smirnov@gmail.com\n" |
#define | DOCTYPE "remody" |
#define | REAL double |
#define | TINY 1e-10 |
#define | SMALL 1e-30 |
#define | LARGE 1e30 |
#define | MAXLINLEN 510 |
#define | WORDLENGTH 64 |
#define | ESC 0x1B |
#define | PI 3.14159265358979323846 |
#define | SQRTPIo8 0.62666 |
#define | ERROR(message) { fprintf(stderr,"\nERROR: %s\n",message);exit(1);} |
#define | TRUE 1 |
#define | FALSE 0 |
#define | OMP |
#define | WAIT for(int i=0;i<999999&&locked;i++) |
#define | LOCAL |
#define | COLLISIONTIME |
#define | RND (REAL)((double)rand()/RAND_MAX) |
#define | MAX(a, b) ((a)>(b)?a:b) |
#define | ZERO(n, x) for (int i=0; i<(n); i++)x[i]=0.0 |
#define | ADD(n, x, y) for (int i=0; i<(n); i++) (x)[i] += (y)[i] |
#define | SUB(n, x, y) for (int i=0; i<(n); i++) (x)[i] -= (y)[i] |
#define | ADDC(n, x, y, d) for (int i=0; i<(n); i++) (x)[i] += (y)[i]*(d) |
#define | SUBC(n, x, y, d) for (int i=0; i<(n); i++) (x)[i] -= (y)[i]*(d) |
#define | MUL(n, x, y) for (int i=0; i<(n); i++) (x)[i] *= (y)[i] |
#define | MULC(n, x, c) for (int i=0; i<(n); i++) (x)[i] *= (c) |
#define | DIV(n, x, y) for (int i=0; i<(n); i++) (x)[i] /= (y)[i] |
#define | MULVEC(x, s) for (int i=0; i<DIM; i++) (x)[i] *= (s) |
#define | ADDVEC(x, y) for (int i=0; i<DIM; i++) (x)[i] += (y)[i] |
#define | COPYVEC(x, y) for (int i=0; i<DIM; i++) (x)[i] = (y)[i] |
#define | ZEROVEC(x) for (int i=0; i<DIM; i++) (x)[i] = 0. |
#define | SCLP(A, B) (A[0]*B[0]+A[1]*B[1]+A[2]*B[2]) |
#define | VECP(A, B, C) |
#define | LENGTH(A) sqrt(SCLP(A,A)) |
#define | VOIDSPECIE nspecies |
#define | GAUSS Run::gauss() |
#define | DIM 3 |
#define | BoltzmannConstant 1.38066e-23 |
#define | AtomicMassUnit 1.66053886e-27 |
#define | AvogadroNumber 6.02214179e23 |
Avogadro Number in 1/mol. | |
#define | DOFK 3 |
#define | DOF(cp) MAX(2.0*((cp)*GasConstantInv-1.0),DOFK) |
#define | DOFI(dof) (dof-DOFK) |
Variables | |
const int | maxcounters = 4 |
const REAL | onethird = 1.0/3.0 |
const REAL | twothirds = 2.0/3.0 |
const REAL | Sqrt2 = sqrt(2.0) |
const REAL | Sqrt2Over2 = 0.5*Sqrt2 |
const REAL | sqrt1p5 = sqrt(1.5) |
const REAL | sqrt1p25 = sqrt(1.25) |
const REAL | Sqrt3 = sqrt(3.0) |
const REAL | OneOverSqrt2 = 1.0/Sqrt2 |
const REAL | OneOverSqrt3 = 1.0/Sqrt3 |
const REAL | Sqrt3Over2 = 0.5*Sqrt3 |
const REAL | GasConstant = BoltzmannConstant*AvogadroNumber |
const REAL | GasConstantInv = 1.0/GasConstant |
#define ABOUT "MOLECULAR DYNAMICS SIMULATOR BY A.V.SMIRNOV\nandrei.v.smirnov@gmail.com\n" |
#define ADD | ( | n, | |||
x, | |||||
y | ) | for (int i=0; i<(n); i++) (x)[i] += (y)[i] |
#define ADDC | ( | n, | |||
x, | |||||
y, | |||||
d | ) | for (int i=0; i<(n); i++) (x)[i] += (y)[i]*(d) |
#define ADDVEC | ( | x, | |||
y | ) | for (int i=0; i<DIM; i++) (x)[i] += (y)[i] |
#define AtomicMassUnit 1.66053886e-27 |
Definition at line 68 of file def.h.
Referenced by Domain::Domain(), Domain::init(), Domain::injection(), Domain::run(), and Molecule::Temperature().
#define AvogadroNumber 6.02214179e23 |
#define BoltzmannConstant 1.38066e-23 |
Definition at line 67 of file def.h.
Referenced by Domain::Domain(), Domain::init(), Domain::injection(), Domain::run(), and Molecule::Temperature().
#define COPYVEC | ( | x, | |||
y | ) | for (int i=0; i<DIM; i++) (x)[i] = (y)[i] |
#define DIM 3 |
Definition at line 66 of file def.h.
Referenced by Geom::area(), Domain::boundary(), Domain::BoundaryType(), Domain::computeBounds(), Molecule::Coordinate(), Molecule::Coordinates(), Molecule::copy(), Geom::distance(), Geom::distvec(), Domain::Domain(), GridContainer::index(), GridContainer::init(), Bulk::init(), Gui::initdisp(), Bulk::inject(), Boundary::Inject(), Domain::injection(), Domain::interact(), Domain::interaction(), Molecule::KineticEnergy(), Geom::length(), Domain::load(), Molecule::Move(), Geom::normalize(), GridContainer::put(), Gui::readconf(), Domain::run(), Geom::sclp(), Molecule::setCoordinates(), Molecule::setVelocity(), Species::Specie::Specie(), and Molecule::Velocity().
#define DIV | ( | n, | |||
x, | |||||
y | ) | for (int i=0; i<(n); i++) (x)[i] /= (y)[i] |
#define DOCTYPE "remody" |
Definition at line 3 of file def.h.
Referenced by Domain::Domain(), IO::getIter(), IO::getTimeXML(), and Gui::readconf().
#define DOF | ( | cp | ) | MAX(2.0*((cp)*GasConstantInv-1.0),DOFK) |
Definition at line 77 of file def.h.
Referenced by Domain::boundary(), Domain::interact(), Domain::run(), and Molecule::Temperature().
#define DOFI | ( | dof | ) | (dof-DOFK) |
Definition at line 78 of file def.h.
Referenced by Domain::boundary(), Domain::interact(), Domain::run(), and Molecule::Temperature().
#define DOFK 3 |
#define ERROR | ( | message | ) | { fprintf(stderr,"\nERROR: %s\n",message);exit(1);} |
#define ESC 0x1B |
Definition at line 10 of file def.h.
Referenced by Gui::animate(), Gui::keyboard(), main(), and Domain::run().
#define GAUSS Run::gauss() |
#define LARGE 1e30 |
Definition at line 7 of file def.h.
Referenced by Domain::computeBounds(), Gui::initdisp(), Domain::load(), and Domain::run().
#define LENGTH | ( | A | ) | sqrt(SCLP(A,A)) |
#define MAXLINLEN 510 |
Definition at line 8 of file def.h.
Referenced by Gui::commandMode(), Gui::consoleMenu(), Domain::Domain(), Gui::Exit(), IO::getCharAttr(), IO::getIntAttr(), IO::getIter(), IO::getTimeXML(), Gui::keyboard(), Domain::load(), IO::parseWord(), Gui::Quit(), Gui::readconf(), Domain::save(), and IO::xwd().
#define MUL | ( | n, | |||
x, | |||||
y | ) | for (int i=0; i<(n); i++) (x)[i] *= (y)[i] |
#define MULC | ( | n, | |||
x, | |||||
c | ) | for (int i=0; i<(n); i++) (x)[i] *= (c) |
#define MULVEC | ( | x, | |||
s | ) | for (int i=0; i<DIM; i++) (x)[i] *= (s) |
#define PI 3.14159265358979323846 |
#define REAL double |
Definition at line 4 of file def.h.
Referenced by Geom::area(), Domain::boundary(), Domain::computeBounds(), Gui::display(), Geom::distance(), Domain::Domain(), Run::gauss(), GridContainer::init(), Gui::initdisp(), Bulk::inject(), Boundary::Inject(), Domain::injection(), Domain::interact(), Domain::interaction(), Molecule::KineticEnergy(), Geom::length(), Domain::load(), Gui::motion(), Molecule::Move(), Geom::normalize(), IO::parseFloat(), Palette::pickcolor(), GridContainer::put(), Gui::readconf(), Run::rnd(), Domain::run(), Geom::sclp(), Gui::showParticle(), Gui::showSphere(), Molecule::Temperature(), Run::testrnd(), and Potential::value().
#define RND (REAL)((double)rand()/RAND_MAX) |
Definition at line 40 of file def.h.
Referenced by Domain::boundary(), Bulk::inject(), Boundary::Inject(), Domain::injection(), and Domain::interact().
#define SCLP | ( | A, | |||
B | ) | (A[0]*B[0]+A[1]*B[1]+A[2]*B[2]) |
#define SMALL 1e-30 |
Definition at line 6 of file def.h.
Referenced by Domain::boundary(), Bulk::inject(), Boundary::Inject(), Domain::interact(), Molecule::Move(), and Domain::run().
#define SUB | ( | n, | |||
x, | |||||
y | ) | for (int i=0; i<(n); i++) (x)[i] -= (y)[i] |
#define SUBC | ( | n, | |||
x, | |||||
y, | |||||
d | ) | for (int i=0; i<(n); i++) (x)[i] -= (y)[i]*(d) |
#define TINY 1e-10 |
#define VECP | ( | A, | |||
B, | |||||
C | ) |
Value:
A[0]=B[1]*C[2]-B[2]*C[1];\ A[1]=B[2]*C[0]-B[0]*C[2];\ A[2]=B[0]*C[1]-B[1]*C[0];
Definition at line 58 of file def.h.
Referenced by Geom::area().
#define VOIDSPECIE nspecies |
Definition at line 62 of file def.h.
Referenced by Domain::boundary(), Domain::Domain(), Domain::interact(), Domain::interaction(), Species::Reaction::Outcome::Outcome(), GridContainer::put(), Domain::run(), and Domain::save().
#define WAIT for(int i=0;i<999999&&locked;i++) |
Definition at line 20 of file def.h.
Referenced by Container< Element >::append(), Collection< Element >::append(), Container< Element >::append1(), Container< Element >::insert(), Collection< Element >::insert(), Container< Element >::insert1(), Container< Element >::link(), Container< Element >::remove(), Collection< Element >::remove(), and Container< Element >::unlink().
#define WORDLENGTH 64 |
const REAL GasConstant = BoltzmannConstant*AvogadroNumber |
const REAL GasConstantInv = 1.0/GasConstant |
const int maxcounters = 4 |
Definition at line 21 of file def.h.
Referenced by Container< Element >::append(), Collection< Element >::append(), Container< Element >::append0(), Collection< Element >::append0(), Collection< Element >::Collection(), Container< Element >::Container(), Container< Element >::goFirst(), Collection< Molecule >::goFirst(), Collection< Element >::init(), Container< Element >::insert(), Collection< Element >::insert(), Container< Element >::insert0(), Collection< Element >::insert0(), Container< Element >::insert1(), Collection< Element >::insertAfter(), Container< Element >::link(), Container< Element >::link0(), Collection< Molecule >::maxCounters(), Container< Element >::remove(), Collection< Element >::remove(), Container< Element >::remove0(), Collection< Element >::remove0(), Domain::run(), Container< Element >::unlink(), Container< Element >::unlink0(), Collection< Element >::~Collection(), and Container< Element >::~Container().
const REAL OneOverSqrt2 = 1.0/Sqrt2 |
const REAL OneOverSqrt3 = 1.0/Sqrt3 |
const REAL onethird = 1.0/3.0 |
const REAL Sqrt2Over2 = 0.5*Sqrt2 |
const REAL Sqrt3Over2 = 0.5*Sqrt3 |
const REAL twothirds = 2.0/3.0 |