abl
cvode_aux.h
Go to the documentation of this file.
1  subroutine cvunpack(w1,y)
2 c
3 c copy the internal cvode vector y to nek array w1
4 c
5  include 'SIZE'
6  include 'TOTAL'
7  include 'CVODE'
8 
9  real w1(lx1,ly1,lz1,lelt,*)
10  real y(*)
11 
12  nxyz = lx1*ly1*lz1
13 
14  j = 1
15  do ifield = 2,nfield
16  if (ifcvfld(ifield)) then
17  ntot = nxyz*nelfld(ifield)
18  call copy (w1(1,1,1,1,ifield-1),y(j),ntot)
19  call bcdirsc(w1(1,1,1,1,ifield-1)) ! restore dirichlet bcs
20  j = j + ntot
21  endif
22  enddo
23 
24  return
25  end
26 c----------------------------------------------------------------------
27  subroutine cvpack(y,w1,ifrhs)
28 c
29 c copy the nek array w1 to the internal cvode vector y
30 c note: assumes temperature is stored in ifield=2 (only for ifdp0dt)
31 c
32  include 'SIZE'
33  include 'TOTAL'
34  include 'CVODE'
35 
36  real y(*)
37  real w1(lx1,ly1,lz1,lelt,*)
38  logical ifrhs
39 
40  common /scrsf/ dtmp(lx1,ly1,lz1,lelt)
41 
42 
43  nxyz = lx1*ly1*lz1
44 
45  if (ifrhs .and. ifdp0dt) then
46  call qthermal ! computes dp0thdt
47  dd = (gamma0 - 1.)/gamma0
48  dd = dd * dp0thdt
49  ntot = nxyz*nelfld(2)
50  call invers2(dtmp,vtrans(1,1,1,1,2),ntot)
51  call cmult(dtmp,dd,ntot)
52  call add2 (w1,dtmp,ntot)
53  endif
54 
55  j = 1
56  do ifield = 2,nfield
57  if (ifcvfld(ifield)) then
58  ntot = nxyz*nelfld(ifield)
59  call copy (y(j),w1(1,1,1,1,ifield-1),ntot)
60  if (ifrhs) call col2(y(j),tmask(1,1,1,1,ifield-1),ntot)
61  j = j + ntot
62  endif
63  enddo
64 
65  return
66  end
sparse_cholesky::Lrp
uint * Lrp
Definition: crs_xxt.c:56
csr_mat::A
double * A
Definition: crs_xxt.c:204
yale_mat::v
double v
Definition: crs_xxt.c:793
xxt::fac_A_ll
struct sparse_cholesky fac_A_ll
Definition: crs_xxt.c:252
xxt
Definition: crs_xxt.c:207
xxt::share_weight
double * share_weight
Definition: crs_xxt.c:231
xxt::plevels
unsigned plevels
Definition: crs_xxt.c:213
dof
Definition: crs_xxt.c:328
dof::id
ulong id
Definition: crs_xxt.c:328
crs_stats
#define crs_stats
Definition: crs_xxt.c:12
crs_setup
#define crs_setup
Definition: crs_xxt.c:10
sparse_cholesky_solve
void sparse_cholesky_solve(double *x, const struct sparse_cholesky *fac, double *b)
Definition: crs_xxt.c:169
xxt::pcoord
uint pcoord
Definition: crs_xxt.c:212
xxt::vx
double * vx
Definition: crs_xxt.c:257
xxt::X
double * X
Definition: crs_xxt.c:254
crs_solve
#define crs_solve
Definition: crs_xxt.c:11
col2
subroutine col2(a, b, n)
Definition: math.f:564
ly1
subroutine ly1
Definition: cvode_aux.h:9
xxt::req
comm_req * req
Definition: crs_xxt.c:220
xxt::cn
uint cn
Definition: crs_xxt.c:242
cmult
subroutine cmult(a, const, n)
Definition: math.f:315
dof::level
uint level
Definition: crs_xxt.c:328
xxt::null_space
unsigned null_space
Definition: crs_xxt.c:230
sparse_cholesky::Lj
uint * Lj
Definition: crs_xxt.c:56
xxt::un
uint un
Definition: crs_xxt.c:235
xxt::A_sl
struct csr_mat A_sl
Definition: crs_xxt.c:253
sparse_cholesky::D
double * D
Definition: crs_xxt.c:57
csr_mat::Aj
uint * Aj
Definition: crs_xxt.c:204
add2
subroutine add2(a, b, n)
Definition: math.f:622
sparse_cholesky::L
double * L
Definition: crs_xxt.c:57
xxt::ln
uint ln
Definition: crs_xxt.c:245
csr_mat::n
uint n
Definition: crs_xxt.c:204
crs_free
#define crs_free
Definition: crs_xxt.c:13
xxt::sep_size
uint * sep_size
Definition: crs_xxt.c:225
lelt
subroutine lelt
Definition: cvode_aux.h:9
xxt::nsep
unsigned nsep
Definition: crs_xxt.c:224
sparse_cholesky_factor
void sparse_cholesky_factor(uint n, const uint *Arp, const uint *Aj, const double *A, struct sparse_cholesky *out, buffer *buf)
Definition: crs_xxt.c:187
xxt::combuf
double * combuf
Definition: crs_xxt.c:257
xxt::pother
sint * pother
Definition: crs_xxt.c:214
invers2
subroutine invers2(a, b, n)
Definition: math.f:51
xxt::sn
uint sn
Definition: crs_xxt.c:245
lz1
subroutine lz1
Definition: cvode_aux.h:9
csr_mat
Definition: crs_amg.c:42
copy
subroutine copy(a, b, n)
Definition: math.f:260
xxt::xn
uint xn
Definition: crs_xxt.c:249
xxt::perm_u2c
sint * perm_u2c
Definition: crs_xxt.c:243
yale_mat::j
uint j
Definition: crs_xxt.c:793
yale_mat
Definition: crs_xxt.c:793
xxt::comm
struct comm comm
Definition: crs_xxt.c:211
dof::count
uint count
Definition: crs_xxt.c:328
sparse_cholesky
Definition: crs_xxt.c:55
xxt::vc
double * vc
Definition: crs_xxt.c:257
csr_mat::Arp
uint * Arp
Definition: crs_xxt.c:204
CHECK
#define CHECK(i)
cvunpack
subroutine cvunpack(w1, y) c c copy the internal cvode vector y to nek array w1 c include 'SIZE' include 'TOTAL' include 'CVODE' real w1(lx1
dnekclock_sync
real *8 function dnekclock_sync()
Definition: comm_mpi.f:400
sparse_cholesky::n
uint n
Definition: crs_xxt.c:56
bcdirsc
subroutine bcdirsc(S)
Definition: bdry.f:710
sparse_cholesky_free
void sparse_cholesky_free(struct sparse_cholesky *fac)
Definition: crs_xxt.c:197
dnekclock
real *8 function dnekclock()
Definition: comm_mpi.f:392
qthermal
subroutine qthermal
Definition: plan4.f:637
yale_mat::i
uint i
Definition: crs_xxt.c:793
xxt::vl
double * vl
Definition: crs_xxt.c:257
xxt::Xp
uint * Xp
Definition: crs_xxt.c:254