DOUG 0.2
Functions/Subroutines | Variables

CoarseCreateRestrict Module Reference

The main aim of this module is to create the restriction matrix. More...

Functions/Subroutines

subroutine CreateRestrict (C, M, R)
subroutine CreatePathRestrict (C, M, R, gendata, getvals, getsize)
subroutine getSizeOne (ptcnt, nsd, rsz, isz)
subroutine genNoData (cpts, csz, nsd, routp, ioutp)
subroutine getInvDistVals (cpts, csz, nsd, rinp, iinp, pt, outp)
subroutine getKrigingSize (ptcnt, nsd, rsz, isz)
subroutine genKrigingData (cpts, csz, nsd, routp, ioutp)
subroutine getKrigingVals (cpts, csz, nsd, rinp, iinp, pt, outp)
subroutine stripRestrict (M, R)

Variables

real(kind=xyzk), parameter invdistpow = 0.5_xyzk

Detailed Description

The main aim of this module is to create the restriction matrix.

In the bi/trilinear case some of this functionality is moved to GeomInterp. The main framework, however, resides here.

General idea

First the prolongation matrix is created for nodes that would interpolate values from coarse nodes to fine nodes. That matrix is then transposed and translated from nodes to freedoms, thus giving the proper Restriction matrix required. The resulting matrix is such that it can interpolate the value of every fine node based on the coarse nodes. That restrict is used to create the coarse matrix. However, to create coarse vectors, some rows need to be removed so there wouldnt be any value overlap for the freedoms present on many different processes. That is achieved by the function stripRestrict.

Restriction matrix itself is currently created in a top down way - the points used in interpolation for a fine node are the centers of elements that are passed in descending in the refinement tree. The sad thing is that inverse distances and kriging dont really provide a continuos interpolation (in fact, contrasts can be quite sharp), so their practicality in this implementation is doubtful.


Function/Subroutine Documentation

subroutine CoarseCreateRestrict::CreatePathRestrict ( type(CoarseGrid),intent(inout)  C,
type(Mesh),intent(in)  M,
type(SpMtx),intent(out)  R,
  gendata,
  getvals,
  getsize 
)

Definition at line 99 of file CreateRestrict.F90.

Referenced by CreateRestrict().

subroutine CoarseCreateRestrict::CreateRestrict ( type(CoarseGrid),intent(inout)  C,
type(Mesh),intent(in)  M,
type(SpMtx),intent(out)  R 
)
subroutine CoarseCreateRestrict::genKrigingData ( real(kind=xyzk),dimension(:,:),intent(in)  cpts,
integer  csz,
integer  nsd,
real(kind=xyzk),dimension(:),intent(out)  routp,
integer,dimension(:),intent(out)  ioutp 
)

Definition at line 422 of file CreateRestrict.F90.

References invdistpow.

Referenced by CreateRestrict().

subroutine CoarseCreateRestrict::genNoData ( real(kind=xyzk),dimension(:,:),intent(in)  cpts,
integer  csz,
integer  nsd,
real(kind=xyzk),dimension(:),intent(out)  routp,
integer,dimension(:),intent(out)  ioutp 
)

Definition at line 369 of file CreateRestrict.F90.

Referenced by CreateRestrict().

subroutine CoarseCreateRestrict::getInvDistVals ( real(kind=xyzk),dimension(:,:),intent(in)  cpts,
integer  csz,
integer  nsd,
real(kind=xyzk),dimension(:),intent(in)  rinp,
integer,dimension(:),intent(in)  iinp,
real(kind=xyzk),dimension(:),intent(in)  pt,
float(kind=rk),dimension(:),intent(out)  outp 
)

Definition at line 379 of file CreateRestrict.F90.

References globals::eps, invdistpow, and RealKind::rk.

Referenced by CreateRestrict().

subroutine CoarseCreateRestrict::getKrigingSize ( integer,intent(in)  ptcnt,
integer,intent(in)  nsd,
integer,intent(out)  rsz,
integer,intent(out)  isz 
)

Definition at line 414 of file CreateRestrict.F90.

Referenced by CreateRestrict().

subroutine CoarseCreateRestrict::getKrigingVals ( real(kind=xyzk),dimension(:,:),intent(in)  cpts,
integer  csz,
integer  nsd,
float(kind=rk),dimension(:),intent(in)  rinp,
integer,dimension(:),intent(in)  iinp,
real(kind=xyzk),dimension(:),intent(in)  pt,
float(kind=rk),dimension(:),intent(out)  outp 
)

Definition at line 460 of file CreateRestrict.F90.

References invdistpow, and RealKind::rk.

Referenced by CreateRestrict().

subroutine CoarseCreateRestrict::getSizeOne ( integer,intent(in)  ptcnt,
integer,intent(in)  nsd,
integer,intent(out)  rsz,
integer,intent(out)  isz 
)

Definition at line 362 of file CreateRestrict.F90.

Referenced by CreateRestrict().

subroutine CoarseCreateRestrict::stripRestrict ( type(Mesh),intent(in)  M,
type(SpMtx),intent(inout)  R 
)

Definition at line 493 of file CreateRestrict.F90.

References SpMtx_class::D_SpMtx_ARRNG_NO, and globals::stream.


Variable Documentation

real(kind=xyzk),parameter CoarseCreateRestrict::invdistpow = 0.5_xyzk

Definition at line 54 of file CreateRestrict.F90.

Referenced by genKrigingData(), getInvDistVals(), and getKrigingVals().