Package solvcon :: Package kerpak :: Module cuse :: Class CuseSolver
[hide private]
[frames] | no frames]

Class CuseSolver

source code


The base solver class for second-order, multi-dimensional CESE code with CUDA enabled.

Nested Classes [hide private]
  _exedatatype_
Data structure to interface with C.

Inherited from solver.BaseSolver: __metaclass__

Instance Methods [hide private]
 
__init__(self, blk, *args, **kw)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
bind(self)
Bind all the boundary condition objects.
source code
 
unbind(self)
Unbind all the boundary condition objects.
source code
 
init(self, **kw)
Check and initialize BCs.
source code
 
boundcond(self)
Update the boundary conditions.
source code
 
pushibc(self, arrname, bc, recvn, worker=None)
Push data toward selected interface which connect to blocks with larger serial number than myself.
source code
 
pullibc(self, arrname, bc, sendn, worker=None)
Pull data from the interface determined by the serial of peer.
source code
 
locate_point(self, *args)
Locate the cell index where the input coordinate is.
source code
 
update(self, worker=None) source code
 
ibcam(self, worker=None) source code
 
calcsolt(self, worker=None) source code
 
calcsoln(self, worker=None) source code
 
ibcsoln(self, worker=None) source code
 
bcsoln(self, worker=None) source code
 
calccfl(self, worker=None) source code
 
calcdsoln(self, worker=None) source code
 
ibcdsoln(self, worker=None) source code
 
bcdsoln(self, worker=None) source code

Inherited from solver.BlockSolver: call_non_interface_bc, exchangeibc, init_exchange, pull, pullank, push, remote_setattr

Inherited from solver.BaseSolver: dump, exhaust, final, march, postloop, preloop, provide

Inherited from solver.BaseSolver (private): _set_time, _tcall

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from solver.BaseSolver: detect_ncore

Class Variables [hide private]
  _interface_init_ = ['cecnd', 'cevol']
list of attributes (arrays) to be exchanged on interface when initialized.
  _solution_array_ = ['sol', 'soln', 'dsol', 'dsoln']
  _gdlen_ = None
length per group data.
  _jacofunc_ = None
ctypes function to Jacobian calculator.
  _clib_mcu = None
ctypes library for physical model on GPU.
  __clib_cuse_c = {2: <CDLL '/var/lib/buildbot/solvcon/doc/build...
  __clib_cuse_cu = {2: None, 3: None}
  MMNAMES = ['update', 'ibcam', 'calcsolt', 'calcsoln', 'ibcsoln...

Inherited from solver.BlockSolver: CLMFC, CLMND, FCMND

Inherited from solver.BaseSolver: MESG_FILENAME_DEFAULT, _pointers_

Inherited from solver.BaseSolver (private): _clib_solve

Instance Variables [hide private]
  alpha
parameter to the weighting function.
  amsca
Parameter scalar array.
  amvec
Parameter vector array.
  cecnd
solution points for CCEs and BCEs.
  cevol
CCE and BCE volumes.
  cfl
CFL number.
  cnbfac
factor to use BCE centroid, othersize midpoint; 0 off, 1 on.
  debug
flag for debugging.
  dsol
current gradient of solution.
  dsoln
next gradient of solution.
  grpda
group data.
  ncuth
number of thread per block for CUDA.
  ocfl
original CFL number.
  scu
CUDA wrapper.
  sfmrc
sub-face geometry.
  sftfac
factor to shift gradient shape; 0 off, 1 on.
  sigma0
constant parameter for W-3 scheme; should be of order of 1.
  sol
current solution.
  soln
next solution.
  solt
temporal diffrentiation of solution.
  taumin
the lower bound of tau.
  tauscale
scaling of tau.
  taylor
factor for Taylor's expansion; 0 off, 1 on.

Inherited from solver.BlockSolver: all_simplex, bclist, grpnames, ibclist, ibcthread, ngroup, nsvr, svrn, use_incenter

Properties [hide private]
  gdlen
Length per group data.
  nsca
  nvec
  _clib_cuse_c
  _clib_cuse_cu

Inherited from solver.BlockSolver: is_bound, is_unbound, ust

Inherited from solver.BaseSolver: fpdtype, fpdtypestr

Inherited from solver.BaseSolver (private): _clib_solvcon

Inherited from object: __class__

Method Details [hide private]

__init__(self, blk, *args, **kw)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

bind(self)

source code 

Bind all the boundary condition objects.

Returns:
nothing
Overrides: solver.BaseSolver.bind
(inherited documentation)

unbind(self)

source code 

Unbind all the boundary condition objects.

Overrides: gendata.unbind
(inherited documentation)

init(self, **kw)

source code 

Check and initialize BCs.

Overrides: solver.BaseSolver.init

boundcond(self)

source code 

Update the boundary conditions.

Returns:
nothing.
Overrides: solver.BlockSolver.boundcond
(inherited documentation)

pushibc(self, arrname, bc, recvn, worker=None)

source code 

Push data toward selected interface which connect to blocks with larger serial number than myself. If CUDA is present, data are first uploaded to and then downloaded from GPU.

Parameters:
  • arrname (str) - name of the array in the object to exchange.
  • bc (solvcon.boundcond.interface) - the interface BC to push.
  • recvn (int) - serial number of the peer to exchange data with.
  • worker (solvcon.rpc.Worker) - the wrapping worker object for parallel processing.
Overrides: solver.BlockSolver.pushibc

pullibc(self, arrname, bc, sendn, worker=None)

source code 

Pull data from the interface determined by the serial of peer. If CUDA is present, data are first downloaded from GPU and then uploaded to GPU.

Parameters:
  • arrname (str) - name of the array in the object to exchange.
  • bc (solvcon.boundcond.interface) - the interface BC to pull.
  • sendn (int) - serial number of the peer to exchange data with.
  • worker (solvcon.rpc.Worker) - the wrapping worker object for parallel processing.
Overrides: solver.BlockSolver.pullibc

Class Variable Details [hide private]

_gdlen_

length per group data. Must be overridden.
Value:
None

_jacofunc_

ctypes function to Jacobian calculator. Must be overridden.
Value:
None

__clib_cuse_c

Value:
{2: <CDLL '/var/lib/buildbot/solvcon/doc/build/lib/libsc_cuse2d_c.so',\
 handle 296b080 at 293f550>,
 3: <CDLL '/var/lib/buildbot/solvcon/doc/build/lib/libsc_cuse3d_c.so',\
 handle 296bdb0 at 293f5d0>}

MMNAMES

Value:
['update',
 'ibcam',
 'calcsolt',
 'calcsoln',
 'ibcsoln',
 'bcsoln',
 'calccfl',
 'calcdsoln',
...

Instance Variable Details [hide private]

sfmrc

sub-face geometry. It is a 5-dimensional array, and the shape is (ncell, CLMFC, FCMND, 2, NDIM). sfmrc[...,0,:] are centers, while sfmrc[...,1,:] are normal vectors.

sigma0

constant parameter for W-3 scheme; should be of order of 1. Default is 3.0.

Property Details [hide private]

gdlen

Length per group data.

Get Method:
unreachable.gdlen(self) - Length per group data.

nsca

Get Method:
unreachable.nsca(self)

nvec

Get Method:
unreachable.nvec(self)

_clib_cuse_c

Get Method:
unreachable._clib_cuse_c(self)

_clib_cuse_cu

Get Method:
unreachable._clib_cuse_cu(self)