Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Nodal_scalar_const_2d< T > Class Template Reference

Adpator for accessing constant scalar node-centered data. More...

Public Types

typedef T Base_type
 
typedef const T Value
 
typedef T Value_nonconst
 
typedef const T Value_const
 
typedef unsigned int Size
 

Public Member Functions

 Nodal_scalar_const_2d (int i, int j)
 Constructor. More...
 
void set_col (int j)
 
Size dimension () const
 Dimension of the attribute. More...
 
get_value (const Base_type *buf, int r) const
 Get the ith data item. Here the index i uses Fortran convention. More...
 

Private Attributes

const int nc
 
int c
 

Detailed Description

template<class T>
class Nodal_scalar_const_2d< T >

Adpator for accessing constant scalar node-centered data.

T is typically Real.

Definition at line 35 of file interpolate_to_centers.C.

Member Typedef Documentation

typedef T Base_type

Definition at line 37 of file interpolate_to_centers.C.

typedef unsigned int Size

Definition at line 41 of file interpolate_to_centers.C.

typedef const T Value

Definition at line 38 of file interpolate_to_centers.C.

typedef const T Value_const

Definition at line 40 of file interpolate_to_centers.C.

typedef T Value_nonconst

Definition at line 39 of file interpolate_to_centers.C.

Constructor & Destructor Documentation

Nodal_scalar_const_2d ( int  i,
int  j 
)
inline

Constructor.

Definition at line 44 of file interpolate_to_centers.C.

44 : nc(i),c(j) {}
blockLoc i
Definition: read.cpp:79
j indices j
Definition: Indexing.h:6

Member Function Documentation

Size dimension ( ) const
inline

Dimension of the attribute.

Definition at line 48 of file interpolate_to_centers.C.

48 { return 1; }
T get_value ( const Base_type buf,
int  r 
) const
inline

Get the ith data item. Here the index i uses Fortran convention.

Definition at line 51 of file interpolate_to_centers.C.

References Nodal_scalar_const_2d< T >::c, and Nodal_scalar_const_2d< T >::nc.

51  {
52  assert( r>=1);
53  return buf[(r-1)*nc+c];
54  }
void set_col ( int  j)
inline

Definition at line 45 of file interpolate_to_centers.C.

References Nodal_scalar_const_2d< T >::c, and j.

45 { c = j; }
j indices j
Definition: Indexing.h:6

Member Data Documentation

const int nc
private

Definition at line 56 of file interpolate_to_centers.C.

Referenced by Nodal_scalar_const_2d< T >::get_value().


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