LJTable Class Reference

#include <LJTable.h>

List of all members.

Public Member Functions

 LJTable (void)
 ~LJTable (void)
const TableEntrytable_row (unsigned int i) const
const TableEntrytable_val (unsigned int i, unsigned int j) const
const TableEntrytable_val_scale14 (unsigned int i, unsigned int j) const
const TableEntryget_table () const
int get_table_dim () const

Classes

struct  TableEntry


Detailed Description

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 13 of file LJTable.h.


Constructor & Destructor Documentation

LJTable::LJTable ( void   ) 

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 16 of file LJTable.C.

References Parameters::get_num_vdw_params(), j, Node::Object(), and Node::parameters.

00017 {
00018   table_dim = Node::Object()->parameters->get_num_vdw_params();
00019   table_alloc = new char[2*table_dim*table_dim*sizeof(TableEntry) + 31];
00020   char *table_align = table_alloc;
00021   while ( (long)table_align % 32 ) table_align++;
00022   table = (TableEntry *) table_align;
00023 
00024   for (register int i=0; i < table_dim; i++)
00025     for (register int j=i; j < table_dim; j++)
00026     {
00027       TableEntry *curij = &(table[2*(i*table_dim+j)]);
00028       TableEntry *curji = &(table[2*(j*table_dim+i)]);
00029       compute_vdw_params(i,j,curij,curij+1);
00030 
00031       // Copy to transpose entry
00032       *curji = *curij;
00033       *(curji + 1) = *(curij + 1);
00034     }
00035 
00036 }

LJTable::~LJTable ( void   ) 

Definition at line 39 of file LJTable.C.

00040 {
00041   delete [] table_alloc;
00042 }


Member Function Documentation

const TableEntry* LJTable::get_table (  )  const [inline]

Definition at line 43 of file LJTable.h.

Referenced by dumpbench().

00043 { return table; }

int LJTable::get_table_dim (  )  const [inline]

Definition at line 44 of file LJTable.h.

Referenced by ComputeNonbondedCUDA::build_lj_table(), and dumpbench().

00044 { return table_dim; }

const TableEntry* LJTable::table_row ( unsigned int  i  )  const [inline]

Definition at line 31 of file LJTable.h.

Referenced by ExclElem::computeForce(), and SELF().

00031                                                     {
00032     return table + 2 * (i * table_dim);
00033   }

const TableEntry* LJTable::table_val ( unsigned int  i,
unsigned int  j 
) const [inline]

Definition at line 35 of file LJTable.h.

Referenced by ComputeNonbondedCUDA::build_lj_table().

00035                                                                     {
00036     return table + 2 * (i * table_dim + j);
00037   }

const TableEntry* LJTable::table_val_scale14 ( unsigned int  i,
unsigned int  j 
) const [inline]

Definition at line 39 of file LJTable.h.

00039                                                                             {
00040     return table + 2 * (i * table_dim + j) + 1;
00041   }


The documentation for this class was generated from the following files:
Generated on Sat Sep 23 01:17:19 2017 for NAMD by  doxygen 1.4.7