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 | Macros | Typedefs | Functions | Variables
dimensionality.h File Reference
#include "normalization.h"
#include <iostream>
#include <istream>
#include <ostream>

Go to the source code of this file.

Classes

class  Position_< T >
class  Velocity_< T >
 Velocity_ holds the template of a 3-dimensional 'vector'. More...

Typedefs

typedef Position_< double > Position
typedef Position_< int > GridPosition
typedef Velocity_< double > Velocity

Functions

template<class T >
Position_< T > operator- (const Position_< T > &A, T b)
template<class T >
Position_< T > operator- (T a, const Position_< T > &B)
template<class T >
Position_< T > operator+ (const Position_< T > &A, T b)
template<class T >
Position_< T > operator- (const Position_< T > &A, const Position_< T > &B)
template<class T >
Position_< T > operator+ (const Position_< T > &A, const Position_< T > &B)
template<class T1 , class T2 >
double operator* (const Position_< T1 > &A, const Position_< T2 > &B)
template<class T1 , class T2 >
Position_< T1 > & operator*= (Position_< T1 > &A, T2 B)
template<class T >
Position_< T > & operator*= (Position_< T > &A, const Position_< T > &B)
template<class T1 , class T2 >
Position_< T1 > & operator*= (Position_< T1 > &A, const Position_< T2 > &B)
template<class T1 , class T2 >
Position_< T1 > & operator+= (Position_< T1 > &A, const Position_< T2 > &B)
template<class T >
Position_< T > operator* (const Position_< T > &A, T B)
template<class T >
Position_< T > operator/ (const Position_< T > &A, T B)
template<class T >
Position_< T > operator/ (const Position_< T > &A, const Position_< T > &B)
template<class T1 , class T2 >
bool operator< (const Position_< T1 > &A, const Position_< T2 > &B)
template<class T1 , class T2 >
bool operator> (const Position_< T1 > &A, const Position_< T2 > &B)
template<class T1 , class T2 >
bool operator== (const Position_< T1 > &A, const Position_< T2 > &B)
template<class T >
std::ostream & operator<< (std::ostream &O, const Position_< T > &A)
 Write the Position_ into a stream.
template<class T >
std::istream & operator>> (std::istream &I, Position_< T > &A)
 Read the Position_ from a stream.
template<class T1 , class T2 >
int indexgreater (const Position_< T1 > &A, const Position_< T2 > &B)
 Returns the index of the first component of A that is greater than the according component in B. If !(A>B) then the result is undefined.
template<class G >
void WeightOnGrid (G &g, const Position &p, double v)
const GridPosition ZeroGrid (0, 0, 0)
const GridPosition UnitGrid (1, 1, 1)
const GridPosition UnitX (1, 0, 0)
const GridPosition UnitY (0, 1, 0)
const GridPosition UnitZ (0, 0, 1)
const GridPosition UnitnX (-1, 0, 0)
const GridPosition UnitnY (0,-1, 0)
const GridPosition UnitnZ (0, 0,-1)
template<class T >
Velocity_< T > operator- (const Velocity_< T > &A, T b)
template<class T >
Velocity_< T > operator+ (const Velocity_< T > &A, T b)
template<class T >
Velocity_< T > operator* (const Velocity_< T > &A, T b)
template<class T >
Velocity_< T > operator/ (const Velocity_< T > &A, T b)
template<class T >
Velocity_< T > operator/ (const Velocity_< T > &A, const Velocity_< T > &B)
template<class T >
Velocity_< T > operator- (const Velocity_< T > &A, const Velocity_< T > &B)
template<class T >
Velocity_< T > operator+ (const Velocity_< T > &A, const Velocity_< T > &B)
template<class T1 , class T2 >
double operator* (const Velocity_< T1 > &A, const Velocity_< T2 > &B)
template<class T >
Velocity_< T > & operator*= (Velocity_< T > &A, const Velocity_< T > &B)
template<class T1 , class T2 >
Velocity_< T1 > & operator*= (Velocity_< T1 > &A, const T2 &B)
template<class T >
Velocity_< T > & operator/= (Velocity_< T > &A, const T &B)
template<class T1 , class T2 >
Velocity_< T1 > & operator+= (Velocity_< T1 > &A, const Velocity_< T2 > &B)
template<class T >
Velocity_< T > & operator+= (Velocity_< T > &A, const T &B)
template<class T >
Velocity_< T > operator/ (double A, const Velocity_< T > &B)
template<class T1 , class T2 >
bool operator<= (const Velocity_< T1 > &A, const Velocity_< T2 > &B)
template<class T1 , class T2 >
bool operator>= (const Velocity_< T1 > &A, const Velocity_< T2 > &B)
template<class T1 , class T2 >
int indexgreater (const Velocity_< T1 > &A, const Velocity_< T2 > &B)
 Returns the index of the first component of A that is greater than the according component in B. If !(A>B) then the result is undefined.
template<class T >
std::ostream & operator<< (std::ostream &O, const Velocity_< T > &A)
 Write the Velocity_ into a stream.
template<class T >
std::istream & operator>> (std::istream &I, Velocity_< T > &A)
 Read the Velocity_ from a stream.
template<class G , class T >
WeightedSum (const G &g, Velocity_< T > p1, Velocity_< T > p2, const Velocity_< T > &wa, const Velocity_< T > &wb)
 Returns the sum of a grid g for calculation of an interpolated value.
const Velocity ZeroVelocity (0, 0, 0)
Position frandPosition ()
 Calculates a Position where all components are random numbers between 0 and 1.

Variables

const int Dimension = 3
const int TwoPowDim = 8

Detailed Description

This file tries to encapsulate everything that depends on the dimension of the simulation. This has not yet quite succeeded.


Function Documentation

template<class G , class T >
T WeightedSum ( const G &  g,
Velocity_< T >  p1,
Velocity_< T >  p2,
const Velocity_< T > &  wa,
const Velocity_< T > &  wb 
)

Returns the sum of a grid g for calculation of an interpolated value.

Todo:
Why is this defined for velocities and not individually for each value of the dimension?