O P A R - Open Architecture Particle in Cell Simulation - Version 3.0
Plasma simulations with dust particles
 All Classes Files Functions Variables Friends Macros Groups Pages
Classes | Functions
numeric.h File Reference
#include "dimensionality.h"
#include <fstream>
#include <cmath>
#include <cassert>
#include <valarray>
#include <iostream>

Go to the source code of this file.

Classes

class  grid< T >
 A n-dimensional grid of arbitrary type to hold, densities, fields, boundary values etc. Unlike C-arrays the grid size specifies the maximum index of the elements. This means that the grid contains one element more in each direction than the equivalent C-array. Elements are from (0,0,...,0) to (size[0], size[1], ... , size[n]). The implementation is mostly independent on the dimension of the system because it makes use of the dimensionality dependent Position and GridPosition classes. More...

Functions

double frand ()
 Random double numbers. This function transforms integer random numbers to double random numbers. For most applications this is ok. However care has to be applied because of the finite graininess of the resulting random numbers. Especially: There is a smallest nonzero frand which is 1/RAND_MAX.
double srand ()
template<typename T >
sqr (T val)
template<typename T >
max (T a, T b)
template<class T >
WeightedSum (const grid< T > &g, GridPosition p1, GridPosition p2, const Position &wa, const Position &wb)

Detailed Description

Contains classes for the grid, operators and different numeric topics.