Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

matProp.C File Reference

#include "omg.h"
#include "oda.h"
#include "omgJac.h"
#include "parUtils.h"

Go to the source code of this file.

Defines

#define ASSIGN_MAT_PROP_1_CUBE_ELEM_BLOCK
#define ASSIGN_MAT_PROP_ANALYTIC_FN_ELEM_BLOCK
#define ASSIGN_MAT_PROP_CHECKER_BOARD_ELEM_BLOCK
#define ASSIGN_MAT_PROP_COARSE_TO_FINE_ELEM_BLOCK
#define ASSIGN_MAT_PROP_FINE_TO_COARSE_ELEM_BLOCK
#define ASSIGN_MAT_PROP_FROM_PTS_ELEM_BLOCK
#define ASSIGN_MAT_PROP_MULTIPLE_CUBES_ELEM_BLOCK
#define CHK_AND_SCATTER_FINE_TO_COARSE_BLOCK
#define COARSE_TO_FINE_BLOCK
#define FINE_TO_COARSE_BLOCK
#define SET_SINGLE_LEVEL_MAT_PROP_BLOCK(ELEM_MAT_PROP_BLOCK, EXTRA_INITS)
#define SQUARE(x)   ((x)*(x))

Functions

void DestroyUserContexts (ot::DAMG *damg)
void SetCoarseToFineFromPts (ot::DAMG *damg, const std::vector< double > &pts, const std::vector< double > &lapJump)
void SetUserContexts (ot::DAMG *damg)
void SetUserContextsCoarsestToFinest (ot::DAMG *damg)
void SetUserContextsFromPts (ot::DAMG *damg, const std::vector< double > &pts, const std::vector< double > &lapJump)


Detailed Description

Author:
Rahul Sampath, rahul.sampath@gmail.com

Definition in file matProp.C.


Define Documentation

#define ASSIGN_MAT_PROP_1_CUBE_ELEM_BLOCK
 

Definition at line 67 of file matProp.C.

Referenced by SetUserContexts(), and SetUserContextsCoarsestToFinest().

#define ASSIGN_MAT_PROP_ANALYTIC_FN_ELEM_BLOCK
 

Value:

{\
  Point pt = da->getCurrentOffset();\
  unsigned int idx = da->curr();\
  unsigned int lev = da->getLevel(idx);\
  double h = ((double)(1u << (maxD - lev)))/((double)(1u << (maxD-1)));\
  double x = ((double)(pt.xint()))/((double)(1u << (maxD-1)));\
  double y = ((double)(pt.yint()))/((double)(1u << (maxD-1)));\
  double z = ((double)(pt.zint()))/((double)(1u << (maxD-1)));\
  matPropArr[2*idx+1] = massBase; /*Mass Matrix's coefficient*/\
  /*Laplacian's coefficient*/\
  matPropArr[2*idx] = 1.0 +\
  (lapFac*(SQUARE(cos(lapFreq*M_PI*(x+(0.5*h))))+\
           SQUARE(cos(lapFreq*M_PI*(y+(0.5*h))))+\
           SQUARE(cos(lapFreq*M_PI*(z+(0.5*h))))));\
  if(matPropArr[2*idx] > maxCoeff) {\
    maxCoeff = matPropArr[2*idx];\
  }\
  if(matPropArr[2*idx] < minCoeff) {\
    minCoeff = matPropArr[2*idx];\
  }\
}

Definition at line 170 of file matProp.C.

Referenced by SetUserContexts(), and SetUserContextsCoarsestToFinest().

#define ASSIGN_MAT_PROP_CHECKER_BOARD_ELEM_BLOCK
 

Definition at line 132 of file matProp.C.

Referenced by SetUserContexts(), and SetUserContextsCoarsestToFinest().

#define ASSIGN_MAT_PROP_COARSE_TO_FINE_ELEM_BLOCK
 

Definition at line 687 of file matProp.C.

#define ASSIGN_MAT_PROP_FINE_TO_COARSE_ELEM_BLOCK
 

Definition at line 192 of file matProp.C.

#define ASSIGN_MAT_PROP_FROM_PTS_ELEM_BLOCK
 

Definition at line 14 of file matProp.C.

Referenced by SetCoarseToFineFromPts(), and SetUserContextsFromPts().

#define ASSIGN_MAT_PROP_MULTIPLE_CUBES_ELEM_BLOCK
 

Value:

{\
  unsigned int idx = da->curr();\
  matPropArr[2*idx] = 1.0; /*Laplacian's coefficient*/\
  matPropArr[2*idx+1] = massBase; /*Mass Matrix's coefficient*/\
  unsigned int procElementSize = da->getElementSize();\
  unsigned int numCubesInterval = procElementSize/numCubes;\
  if( (idx % numCubesInterval) == 0 ) {\
    matPropArr[2*idx] += lapFac; /*Laplacian's coefficient*/\
    matPropArr[2*idx+1] +=  massFac; /*Mass Matrix's coefficient*/\
  }\
  if(matPropArr[2*idx] > maxCoeff) {\
    maxCoeff = matPropArr[2*idx];\
  }\
  if(matPropArr[2*idx] < minCoeff) {\
    minCoeff = matPropArr[2*idx];\
  }\
}

Definition at line 114 of file matProp.C.

Referenced by SetUserContexts(), and SetUserContextsCoarsestToFinest().

#define CHK_AND_SCATTER_FINE_TO_COARSE_BLOCK
 

Definition at line 234 of file matProp.C.

Referenced by SetPDECoefFromPts(), SetUserContexts(), and SetUserContextsFromPts().

#define COARSE_TO_FINE_BLOCK
 

Definition at line 731 of file matProp.C.

Referenced by SetCoarseToFineFromPts(), and SetUserContextsCoarsestToFinest().

#define FINE_TO_COARSE_BLOCK
 

Definition at line 326 of file matProp.C.

Referenced by SetPDECoefFromPts(), SetUserContexts(), and SetUserContextsFromPts().

#define SET_SINGLE_LEVEL_MAT_PROP_BLOCK ELEM_MAT_PROP_BLOCK,
EXTRA_INITS   ) 
 

Definition at line 269 of file matProp.C.

Referenced by SetCoarseToFineFromPts(), SetUserContexts(), SetUserContextsCoarsestToFinest(), and SetUserContextsFromPts().

#define SQUARE  )     ((x)*(x))
 

Definition at line 12 of file matProp.C.


Function Documentation

void DestroyUserContexts ot::DAMG damg  ) 
 

Definition at line 999 of file matProp.C.

References Jac3MFreeData::changedPartition, ot::DAMG, Jac3MFreeData::inTmp, Jac2MFreeData::inTmp, Jac3MFreeData::Jmat_private, Jac2MFreeData::Jmat_private, Jac3MFreeData::matProp, Jac2MFreeData::matProp, Jac3MFreeData::matPropFine, ot::_p_DAMG::nlevels, Jac3MFreeData::outTmp, Jac2MFreeData::outTmp, and ot::_p_DAMG::user.

void SetCoarseToFineFromPts ot::DAMG damg,
const std::vector< double > &  pts,
const std::vector< double > &  lapJump
 

Definition at line 945 of file matProp.C.

References ASSIGN_MAT_PROP_FROM_PTS_ELEM_BLOCK, COARSE_TO_FINE_BLOCK, ot::DAMG, ot::_p_DAMG::nlevels, and SET_SINGLE_LEVEL_MAT_PROP_BLOCK.

Referenced by main().

void SetUserContexts ot::DAMG damg  ) 
 

Definition at line 399 of file matProp.C.

References ASSIGN_MAT_PROP_1_CUBE_ELEM_BLOCK, ASSIGN_MAT_PROP_ANALYTIC_FN_ELEM_BLOCK, ASSIGN_MAT_PROP_CHECKER_BOARD_ELEM_BLOCK, ASSIGN_MAT_PROP_MULTIPLE_CUBES_ELEM_BLOCK, CHK_AND_SCATTER_FINE_TO_COARSE_BLOCK, ot::DAMG, FINE_TO_COARSE_BLOCK, ot::_p_DAMG::nlevels, SET_SINGLE_LEVEL_MAT_PROP_BLOCK, SetUserContextsCoarsestToFinest(), and ot::_p_DAMG::user.

Referenced by main().

void SetUserContextsCoarsestToFinest ot::DAMG damg  ) 
 

Definition at line 880 of file matProp.C.

References ASSIGN_MAT_PROP_1_CUBE_ELEM_BLOCK, ASSIGN_MAT_PROP_ANALYTIC_FN_ELEM_BLOCK, ASSIGN_MAT_PROP_CHECKER_BOARD_ELEM_BLOCK, ASSIGN_MAT_PROP_MULTIPLE_CUBES_ELEM_BLOCK, COARSE_TO_FINE_BLOCK, ot::DAMG, ot::_p_DAMG::nlevels, and SET_SINGLE_LEVEL_MAT_PROP_BLOCK.

Referenced by SetUserContexts().

void SetUserContextsFromPts ot::DAMG damg,
const std::vector< double > &  pts,
const std::vector< double > &  lapJump
 

Definition at line 558 of file matProp.C.

References ASSIGN_MAT_PROP_FROM_PTS_ELEM_BLOCK, CHK_AND_SCATTER_FINE_TO_COARSE_BLOCK, ot::DAMG, FINE_TO_COARSE_BLOCK, ot::_p_DAMG::nlevels, SET_SINGLE_LEVEL_MAT_PROP_BLOCK, and ot::_p_DAMG::user.

Referenced by main().


Generated on Tue Mar 24 16:14:08 2009 for DENDRO by  doxygen 1.3.9.1