MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
LineStencil Class Reference

#include <Stencil.h>

+ Inheritance diagram for LineStencil:
+ Collaboration diagram for LineStencil:

Public Member Functions

void addFlux (unsigned int meshIndex, vector< double > &f, const vector< vector< double > > &S, const vector< double > &diffConst) const
 
 LineStencil (double h)
 
 ~LineStencil ()
 
- Public Member Functions inherited from Stencil
 Stencil ()
 
virtual ~Stencil ()
 

Private Attributes

double h_
 
double invHsq_
 

Detailed Description

Assumes a one-D uniform cartesian array, so the index offset for neighboring mesh points is always 1.

Definition at line 50 of file Stencil.h.

Constructor & Destructor Documentation

LineStencil::LineStencil ( double  h)

Definition at line 109 of file Stencil.cpp.

References h_, and invHsq_.

110  : h_( dx )
111 {
112  if ( dx <= 0 ) {
113  h_ = 1;
114  invHsq_ = 1;
115  } else {
116  invHsq_ = 1.0 / ( dx * dx );
117  }
118 }
double h_
Definition: Stencil.h:59
double invHsq_
Definition: Stencil.h:60
LineStencil::~LineStencil ( )

Definition at line 121 of file Stencil.cpp.

122 {;}

Member Function Documentation

void LineStencil::addFlux ( unsigned int  meshIndex,
vector< double > &  f,
const vector< vector< double > > &  S,
const vector< double > &  diffConst 
) const
virtual

computes the Flux f in the voxel on meshIndex. Takes the matrix of molNumber[meshIndex][pool] and the vector of diffusionConst[pool] as arguments.

Implements Stencil.

Definition at line 124 of file Stencil.cpp.

References invHsq_, and stencil1().

127 {
128  assert( f.size() <= S[0].size() );
129  if ( S.size() < 2 )
130  return;
131  assert( meshIndex < S.size() );
132 
133  int index = meshIndex;
134  stencil1( f, index, 1, invHsq_, S, diffConst ); // Diffusion in x
135 }
double invHsq_
Definition: Stencil.h:60
void stencil1(vector< double > &f, int index, unsigned int n, double invSq, const vector< vector< double > > &S, const vector< double > &diffConst)
Definition: Stencil.cpp:18

+ Here is the call graph for this function:

Member Data Documentation

double LineStencil::h_
private

Definition at line 59 of file Stencil.h.

Referenced by LineStencil().

double LineStencil::invHsq_
private

Definition at line 60 of file Stencil.h.

Referenced by addFlux(), and LineStencil().


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