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

RestrictMatVec.C File Reference

Restriction MatVec. More...

#include "petsc.h"
#include "petscmat.h"
#include "omg.h"
#include "oda.h"

Go to the source code of this file.

Namespaces

namespace  ot

Private Functions

PetscErrorCode addRestrictMatVec (Mat R, Vec v1, Vec v2, Vec v3)
PetscErrorCode dummyRestrictMatVecType1 (TransferOpData *data)
PetscErrorCode restrictMatVecType1 (Mat R, Vec f, Vec c)
PetscErrorCode restrictMatVecType2 (Mat R, Vec f, Vec c)

Defines

#define iC(fun)   {CHKERRQ(fun);}
#define INTERGRID_TRANSFER_LOOP_BLOCK(ITLB_SET_VALUE)
#define INTERGRID_TRANSFER_LOOP_BLOCK_DUMMY
#define INTERGRID_TRANSFER_LOOP_BLOCK_DUMMY_FINAL_A
#define INTERGRID_TRANSFER_LOOP_BLOCK_DUMMY_FINAL_W
#define ITLB_DUMMY_FCTR_BLOCK1
#define ITLB_DUMMY_FCTR_BLOCK2
#define ITLB_DUMMY_FINAL_SET_VALUE(nodeNum, idx)
#define ITLB_SET_VALUE_NO_SUPPRESSED_DOFS
#define ITLB_SET_VALUE_SUPPRESSED_DOFS


Detailed Description

Restriction MatVec.

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

Definition in file RestrictMatVec.C.


Define Documentation

#define iC fun   )     {CHKERRQ(fun);}
 

Definition at line 14 of file RestrictMatVec.C.

#define INTERGRID_TRANSFER_LOOP_BLOCK ITLB_SET_VALUE   ) 
 

Definition at line 82 of file RestrictMatVec.C.

#define INTERGRID_TRANSFER_LOOP_BLOCK_DUMMY
 

Definition at line 153 of file RestrictMatVec.C.

#define INTERGRID_TRANSFER_LOOP_BLOCK_DUMMY_FINAL_A
 

Definition at line 370 of file RestrictMatVec.C.

#define INTERGRID_TRANSFER_LOOP_BLOCK_DUMMY_FINAL_W
 

Value:

{\
  /*To avoid redundant writes, only the element whose anchor is */\
  /*the regular fine grid node writes for all the 8 elements */\
  /*surrounding this node. Note, that some of these elements */\
  /* may be owned by other processors. So all processors take */\
  /* care of all the 8 elements surrounding the node they own.*/\
  /* The only other problem is with the positive boundary nodes. */\
  /* The element whose anchor is this positive boundary node is only */\
  /* a pseudo-element and will never be visited while looping through the */\
  /* elements. To make things worse, we can have situtations where a */\
  /* positive boundary node is owned by one processor and all the */\
  /* true  elements that share this node are on different processors. */\
  /* Thus a writable loop will never suffice to take care of this */\
  /* scenario. Hence, this WRITABLE loop will handle all nodes except */\
  /* positive boundaries and a separate ALL loop will handle positive */\
  /* boundary nodes alone. NOTE, that unlike the other loops in the */\
  /* restriction/prolongation, these two loops are not simultaneous */\
  /* loops through both the fine and coarse grids. Looping through the */\
  /* fine mesh will suffice.*/\
  unsigned char fhnMask = daf->getHangingNodeIndex(daf->curr());\
  ITLB_DUMMY_FINAL_SET_VALUE(0,daf->curr())\
}

Definition at line 347 of file RestrictMatVec.C.

#define ITLB_DUMMY_FCTR_BLOCK1
 

Definition at line 252 of file RestrictMatVec.C.

#define ITLB_DUMMY_FCTR_BLOCK2
 

Value:

{\
  if(dummyMapPtrs[dummyFctr]) {\
    for(unsigned char dummyCctr = 0; dummyCctr < 8; dummyCctr++) {\
      if(coarseVtxId == dummyMapPtrs[dummyFctr][dummyCctr]) {\
        skipThisEntry = true;\
        break;\
      }\
    }\
    if(skipThisEntry) {\
      break;\
    }\
  }\
}

Definition at line 301 of file RestrictMatVec.C.

#define ITLB_DUMMY_FINAL_SET_VALUE nodeNum,
idx   ) 
 

Definition at line 315 of file RestrictMatVec.C.

#define ITLB_SET_VALUE_NO_SUPPRESSED_DOFS
 

Value:

{\
  carr[cidx+l] += (Rval*farr[fidx+l]);\
}

Definition at line 71 of file RestrictMatVec.C.

#define ITLB_SET_VALUE_SUPPRESSED_DOFS
 

Value:

{\
  if(!( (suppressedDOFf && suppressedDOFf[fidx+l]) ||\
        (suppressedDOFc && suppressedDOFc[cidx+l]) )) {\
    carr[cidx+l] += (Rval*farr[fidx+l]);\
  }\
}

Definition at line 75 of file RestrictMatVec.C.


Function Documentation

PetscErrorCode ot::addRestrictMatVec Mat  R,
Vec  v1,
Vec  v2,
Vec  v3
 

Definition at line 32 of file RestrictMatVec.C.

References iC.

Referenced by ot::createInterpolationType1(), and ot::createInterpolationType2().

PetscErrorCode ot::dummyRestrictMatVecType1 TransferOpData *  data  ) 
 

Definition at line 410 of file RestrictMatVec.C.

References ot::DA::createVector(), ot::DA::curr(), ot::TransferOpData::dac, ot::TransferOpData::daf, ot::DA::end(), ot::TransferOpData::fineTouchedFlags, ot::DA::iAmActive(), ot::DA::init(), ot::DA::next(), PROF_MG_RESTRICT_DUMMY_BEGIN, PROF_MG_RESTRICT_DUMMY_END, ot::DA::vecGetBuffer(), ot::DA::vecRestoreBuffer(), ot::DA::WriteToGhostsBegin(), and ot::DA::WriteToGhostsEnd().

Referenced by ot::createInterpolationType1(), and ot::createInterpolationType2().

PetscErrorCode ot::restrictMatVecType1 Mat  R,
Vec  f,
Vec  c
 

Definition at line 486 of file RestrictMatVec.C.

References ot::DA::curr(), ot::DA::currWithInfo(), ot::DA::end(), ot::DA::getElementSize(), ot::DA::iAmActive(), iC, ot::DA::init(), INTERGRID_TRANSFER_LOOP_BLOCK, ITLB_SET_VALUE_NO_SUPPRESSED_DOFS, ITLB_SET_VALUE_SUPPRESSED_DOFS, ot::DA::next(), PROF_MG_RESTRICT_BEGIN, PROF_MG_RESTRICT_END, ot::DA::ReadFromGhostsBegin(), ot::DA::ReadFromGhostsEnd(), ot::DA::vecGetBuffer(), ot::DA::vecRestoreBuffer(), ot::DA::WriteToGhostsBegin(), and ot::DA::WriteToGhostsEnd().

Referenced by ot::createInterpolationType1(), and ot::restrictMatVecType2().

PetscErrorCode ot::restrictMatVecType2 Mat  R,
Vec  f,
Vec  c
 

Definition at line 55 of file RestrictMatVec.C.

References iC, ot::restrictMatVecType1(), and par::scatterValues().

Referenced by ot::createInterpolationType2().


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