Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

dolfin::ParticleSystem Class Reference

#include <ParticleSystem.h>

Inheritance diagram for dolfin::ParticleSystem:

Inheritance graph
[legend]
Collaboration diagram for dolfin::ParticleSystem:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ParticleSystem (unsigned int n, unsigned int dim=3)
 Constructor.

 ~ParticleSystem ()
 Destructor.

virtual real x0 (unsigned int i)
 Return x-component of initial position for particle i.

virtual real y0 (unsigned int i)
 Return y-component of initial position for particle i.

virtual real z0 (unsigned int i)
 Return z-component of initial position for particle i.

virtual real vx0 (unsigned int i)
 Return x-component of initial velocity for particle i.

virtual real vy0 (unsigned int i)
 Return x-component of initial velocity for particle i.

virtual real vz0 (unsigned int i)
 Return x-component of initial velocity for particle i.

virtual real Fx (unsigned int i, real t)
 Return x-component of the force on particle i at time t.

virtual real Fy (unsigned int i, real t)
 Return y-component of the force on particle i at time t.

virtual real Fz (unsigned int i, real t)
 Return z-component of the force on particle i at time t.

virtual real mass (unsigned int i, real t)
 Return mass of particle i at time t.

real u0 (unsigned int i)
 Return initial value for ODE.

real f (const Vector &u, real t, unsigned int i)
 Return right-hand side for ODE.


Protected Member Functions

real x (unsigned int i) const
real y (unsigned int i) const
real z (unsigned int i) const
real vx (unsigned int i) const
real vy (unsigned int i) const
real vz (unsigned int i) const
real dist (unsigned int i, unsigned int j) const

Protected Attributes

unsigned int n
unsigned int dim
unsigned int offset
const Vectoru

Detailed Description

A ParticleSystem represents a system of particles in three dimensions, consisting of a given number of particles and obeying Newton's second law:

F = m * a

where F is the force, m is the mass, and a is the acceleration.

Positions and velocities are stored in the following order in the solution vector u(t):

u = (x_0, y_0, z_0, ... , x_n, y_n, z_n, x_0', y_0', z_0', ... , x_n', y_n', z_n')


Constructor & Destructor Documentation

ParticleSystem::ParticleSystem unsigned int  n,
unsigned int  dim = 3
 

Constructor.

ParticleSystem::~ParticleSystem  ) 
 

Destructor.


Member Function Documentation

real ParticleSystem::dist unsigned int  i,
unsigned int  j
const [protected]
 

real ParticleSystem::f const Vector u,
real  t,
unsigned int  i
[virtual]
 

Return right-hand side for ODE.

Implements dolfin::ODE.

real ParticleSystem::Fx unsigned int  i,
real  t
[virtual]
 

Return x-component of the force on particle i at time t.

Reimplemented in Benchmark, Spring, Lattice, Simple, and Benchmark.

real ParticleSystem::Fy unsigned int  i,
real  t
[virtual]
 

Return y-component of the force on particle i at time t.

Reimplemented in Lattice.

real ParticleSystem::Fz unsigned int  i,
real  t
[virtual]
 

Return z-component of the force on particle i at time t.

real ParticleSystem::mass unsigned int  i,
real  t
[virtual]
 

Return mass of particle i at time t.

Reimplemented in Lattice.

real ParticleSystem::u0 unsigned int  i  )  [virtual]
 

Return initial value for ODE.

Implements dolfin::ODE.

real dolfin::ParticleSystem::vx unsigned int  i  )  const [inline, protected]
 

real ParticleSystem::vx0 unsigned int  i  )  [virtual]
 

Return x-component of initial velocity for particle i.

Reimplemented in Benchmark.

real dolfin::ParticleSystem::vy unsigned int  i  )  const [inline, protected]
 

real ParticleSystem::vy0 unsigned int  i  )  [virtual]
 

Return x-component of initial velocity for particle i.

real dolfin::ParticleSystem::vz unsigned int  i  )  const [inline, protected]
 

real ParticleSystem::vz0 unsigned int  i  )  [virtual]
 

Return x-component of initial velocity for particle i.

real dolfin::ParticleSystem::x unsigned int  i  )  const [inline, protected]
 

real ParticleSystem::x0 unsigned int  i  )  [virtual]
 

Return x-component of initial position for particle i.

Reimplemented in Benchmark, Spring, Lattice, Simple, and Benchmark.

real dolfin::ParticleSystem::y unsigned int  i  )  const [inline, protected]
 

real ParticleSystem::y0 unsigned int  i  )  [virtual]
 

Return y-component of initial position for particle i.

Reimplemented in Lattice.

real dolfin::ParticleSystem::z unsigned int  i  )  const [inline, protected]
 

real ParticleSystem::z0 unsigned int  i  )  [virtual]
 

Return z-component of initial position for particle i.


Member Data Documentation

unsigned int dolfin::ParticleSystem::dim [protected]
 

unsigned int dolfin::ParticleSystem::n [protected]
 

unsigned int dolfin::ParticleSystem::offset [protected]
 

const Vector* dolfin::ParticleSystem::u [protected]
 


The documentation for this class was generated from the following files:


Documentation automatically generated with Doxygen on 10 Sep 2004.