Merged changes from svn dev version.
parent
13d6f8c8a7
commit
bbba6a670e
@ -0,0 +1,37 @@
|
||||
TOP=../..
|
||||
include $(TOP)/Make.inc
|
||||
LIBDIR=$(TOP)/lib
|
||||
INCLUDEDIR=$(TOP)/include
|
||||
MODDIR=$(TOP)/modules
|
||||
HERE=..
|
||||
|
||||
FINCLUDES=$(FMFLAG). $(FMFLAG)$(HERE) $(FMFLAG)$(MODDIR)
|
||||
CINCLUDES=-I. -I$(HERE) -I$(INCLUDEDIR)
|
||||
|
||||
OBJS=psb_base_krylov_cbind_mod.o \
|
||||
psb_skrylov_cbind_mod.o psb_dkrylov_cbind_mod.o psb_ckrylov_cbind_mod.o psb_zkrylov_cbind_mod.o
|
||||
CMOD=psb_krylov_cbind.h
|
||||
|
||||
|
||||
LIBMOD=psb_base_krylov_cbind_mod$(.mod) \
|
||||
psb_skrylov_cbind_mod$(.mod) psb_dkrylov_cbind_mod$(.mod) \
|
||||
psb_ckrylov_cbind_mod$(.mod) psb_zkrylov_cbind_mod$(.mod)
|
||||
|
||||
LOCAL_MODS=$(LIBMOD)
|
||||
LIBNAME=$(CKRYLOVLIBNAME)
|
||||
|
||||
|
||||
lib: $(OBJS) $(CMOD)
|
||||
$(AR) $(HERE)/$(LIBNAME) $(OBJS)
|
||||
$(RANLIB) $(HERE)/$(LIBNAME)
|
||||
/bin/cp -p $(HERE)/$(LIBNAME) $(LIBDIR)
|
||||
/bin/cp -p $(LIBMOD) $(CMOD) $(HERE)
|
||||
|
||||
psb_skrylov_cbind_mod.o psb_dkrylov_cbind_mod.o psb_ckrylov_cbind_mod.o psb_zkrylov_cbind_mod.o: psb_base_krylov_cbind_mod.o
|
||||
veryclean: clean
|
||||
/bin/rm -f $(HERE)/$(LIBNAME)
|
||||
|
||||
clean:
|
||||
/bin/rm -f $(OBJS) $(LOCAL_MODS)
|
||||
|
||||
veryclean: clean
|
@ -0,0 +1,27 @@
|
||||
module psb_base_krylov_cbind_mod
|
||||
|
||||
use iso_c_binding
|
||||
type, bind(c) :: solveroptions
|
||||
integer(c_int) :: iter, itmax, itrace, irst, istop
|
||||
real(c_double) :: eps, err
|
||||
end type solveroptions
|
||||
|
||||
contains
|
||||
|
||||
function psb_c_DefaultSolverOptions(options)&
|
||||
& bind(c,name='psb_c_DefaultSolverOptions') result(res)
|
||||
implicit none
|
||||
type(solveroptions) :: options
|
||||
integer(c_int) :: res
|
||||
|
||||
options%itmax = 1000
|
||||
options%itrace = 0
|
||||
options%istop = 2
|
||||
options%irst = 10
|
||||
options%eps = 1.d-6
|
||||
|
||||
res = 0
|
||||
end function psb_c_DefaultSolverOptions
|
||||
|
||||
|
||||
end module psb_base_krylov_cbind_mod
|
@ -0,0 +1,106 @@
|
||||
module psb_ckrylov_cbind_mod
|
||||
|
||||
use psb_base_krylov_cbind_mod
|
||||
|
||||
contains
|
||||
|
||||
function psb_c_ckrylov(methd,&
|
||||
& ah,ph,bh,xh,cdh,options) bind(c) result(res)
|
||||
use psb_base_mod
|
||||
use psb_prec_mod
|
||||
use psb_krylov_mod
|
||||
use psb_objhandle_mod
|
||||
use psb_prec_cbind_mod
|
||||
use psb_base_string_cbind_mod
|
||||
implicit none
|
||||
integer(c_int) :: res
|
||||
type(psb_c_cspmat) :: ah
|
||||
type(psb_c_descriptor) :: cdh
|
||||
type(psb_c_cprec) :: ph
|
||||
type(psb_c_cvector) :: bh,xh
|
||||
character(c_char) :: methd(*)
|
||||
type(solveroptions) :: options
|
||||
|
||||
res= psb_c_ckrylov_opt(methd, ah, ph, bh, xh, options%eps,cdh, &
|
||||
& itmax=options%itmax, iter=options%iter,&
|
||||
& itrace=options%itrace, istop=options%istop,&
|
||||
& irst=options%irst, err=options%err)
|
||||
|
||||
end function psb_c_ckrylov
|
||||
|
||||
|
||||
function psb_c_ckrylov_opt(methd,&
|
||||
& ah,ph,bh,xh,eps,cdh,itmax,iter,err,itrace,irst,istop) bind(c) result(res)
|
||||
use psb_base_mod
|
||||
use psb_prec_mod
|
||||
use psb_krylov_mod
|
||||
use psb_objhandle_mod
|
||||
use psb_prec_cbind_mod
|
||||
use psb_base_string_cbind_mod
|
||||
implicit none
|
||||
integer(c_int) :: res
|
||||
type(psb_c_cspmat) :: ah
|
||||
type(psb_c_descriptor) :: cdh
|
||||
type(psb_c_cprec) :: ph
|
||||
type(psb_c_cvector) :: bh,xh
|
||||
integer(c_int), value :: itmax,itrace,irst,istop
|
||||
real(c_double), value :: eps
|
||||
integer(c_int) :: iter
|
||||
real(c_double) :: err
|
||||
character(c_char) :: methd(*)
|
||||
type(solveroptions) :: options
|
||||
type(psb_desc_type), pointer :: descp
|
||||
type(psb_cspmat_type), pointer :: ap
|
||||
type(psb_cprec_type), pointer :: precp
|
||||
type(psb_c_vect_type), pointer :: xp, bp
|
||||
|
||||
integer :: info,fitmax,fitrace,first,fistop,fiter
|
||||
character(len=20) :: fmethd
|
||||
real(psb_spk_) :: feps,ferr
|
||||
|
||||
res = -1
|
||||
if (c_associated(cdh%item)) then
|
||||
call c_f_pointer(cdh%item,descp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
if (c_associated(xh%item)) then
|
||||
call c_f_pointer(xh%item,xp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
if (c_associated(bh%item)) then
|
||||
call c_f_pointer(bh%item,bp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
if (c_associated(ah%item)) then
|
||||
call c_f_pointer(ah%item,ap)
|
||||
else
|
||||
return
|
||||
end if
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
|
||||
call stringc2f(methd,fmethd)
|
||||
feps = eps
|
||||
fitmax = itmax
|
||||
fitrace = itrace
|
||||
first = irst
|
||||
fistop = istop
|
||||
|
||||
call psb_krylov(fmethd, ap, precp, bp, xp, feps, &
|
||||
& descp, info,&
|
||||
& itmax=fitmax,iter=fiter,itrace=fitrace,istop=fistop,&
|
||||
& irst=first, err=ferr)
|
||||
iter = fiter
|
||||
err = ferr
|
||||
res = info
|
||||
|
||||
end function psb_c_ckrylov_opt
|
||||
|
||||
end module psb_ckrylov_cbind_mod
|
@ -0,0 +1,108 @@
|
||||
module psb_dkrylov_cbind_mod
|
||||
|
||||
use psb_base_krylov_cbind_mod
|
||||
|
||||
contains
|
||||
|
||||
function psb_c_dkrylov(methd,&
|
||||
& ah,ph,bh,xh,cdh,options) bind(c) result(res)
|
||||
use psb_base_mod
|
||||
use psb_prec_mod
|
||||
use psb_krylov_mod
|
||||
use psb_objhandle_mod
|
||||
use psb_prec_cbind_mod
|
||||
use psb_base_string_cbind_mod
|
||||
implicit none
|
||||
integer(c_int) :: res
|
||||
type(psb_c_dspmat) :: ah
|
||||
type(psb_c_descriptor) :: cdh
|
||||
type(psb_c_dprec) :: ph
|
||||
type(psb_c_dvector) :: bh,xh
|
||||
character(c_char) :: methd(*)
|
||||
type(solveroptions) :: options
|
||||
|
||||
write(0,*) 'psb_c_dkrylov options ', options%eps
|
||||
res= psb_c_dkrylov_opt(methd, ah, ph, bh, xh, options%eps,cdh, &
|
||||
& itmax=options%itmax, iter=options%iter,&
|
||||
& itrace=options%itrace, istop=options%istop,&
|
||||
& irst=options%irst, err=options%err)
|
||||
|
||||
end function psb_c_dkrylov
|
||||
|
||||
|
||||
function psb_c_dkrylov_opt(methd,&
|
||||
& ah,ph,bh,xh,eps,cdh,itmax,iter,err,itrace,irst,istop) bind(c) result(res)
|
||||
use psb_base_mod
|
||||
use psb_prec_mod
|
||||
use psb_krylov_mod
|
||||
use psb_objhandle_mod
|
||||
use psb_prec_cbind_mod
|
||||
use psb_base_string_cbind_mod
|
||||
implicit none
|
||||
integer(c_int) :: res
|
||||
type(psb_c_dspmat) :: ah
|
||||
type(psb_c_descriptor) :: cdh
|
||||
type(psb_c_dprec) :: ph
|
||||
type(psb_c_dvector) :: bh,xh
|
||||
integer(c_int), value :: itmax,itrace,irst,istop
|
||||
real(c_double), value :: eps
|
||||
integer(c_int) :: iter
|
||||
real(c_double) :: err
|
||||
character(c_char) :: methd(*)
|
||||
type(solveroptions) :: options
|
||||
type(psb_desc_type), pointer :: descp
|
||||
type(psb_dspmat_type), pointer :: ap
|
||||
type(psb_dprec_type), pointer :: precp
|
||||
type(psb_d_vect_type), pointer :: xp, bp
|
||||
|
||||
integer :: info,fitmax,fitrace,first,fistop,fiter
|
||||
character(len=20) :: fmethd
|
||||
real(psb_dpk_) :: feps,ferr
|
||||
|
||||
write(0,*) 'psb_c_dkrylov_opt options ', eps
|
||||
res = -1
|
||||
if (c_associated(cdh%item)) then
|
||||
call c_f_pointer(cdh%item,descp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
if (c_associated(xh%item)) then
|
||||
call c_f_pointer(xh%item,xp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
if (c_associated(bh%item)) then
|
||||
call c_f_pointer(bh%item,bp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
if (c_associated(ah%item)) then
|
||||
call c_f_pointer(ah%item,ap)
|
||||
else
|
||||
return
|
||||
end if
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
|
||||
call stringc2f(methd,fmethd)
|
||||
feps = eps
|
||||
fitmax = itmax
|
||||
fitrace = itrace
|
||||
first = irst
|
||||
fistop = istop
|
||||
|
||||
call psb_krylov(fmethd, ap, precp, bp, xp, feps, &
|
||||
& descp, info,&
|
||||
& itmax=fitmax,iter=fiter,itrace=fitrace,istop=fistop,&
|
||||
& irst=first, err=ferr)
|
||||
iter = fiter
|
||||
err = ferr
|
||||
res = info
|
||||
|
||||
end function psb_c_dkrylov_opt
|
||||
|
||||
end module psb_dkrylov_cbind_mod
|
@ -0,0 +1,51 @@
|
||||
#ifndef PSB_KRYL_CBIND_
|
||||
#define PSB_KRYL_CBIND_
|
||||
|
||||
#include "psb_base_cbind.h"
|
||||
#include "psb_prec_cbind.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Object handle related routines */
|
||||
/* No new handles for Krylov methods. */
|
||||
/* Here's a choice: define a struct to hold the options */
|
||||
/* Drawback: we end up defining defaults in two places */
|
||||
/* Note: must be interoperable */
|
||||
typedef struct psb_c_solveroptions {
|
||||
int iter; /* On exit how many iterations were performed */
|
||||
int itmax; /* On entry maximum number of iterations */
|
||||
int itrace; /* On entry print an info message every itrace iterations */
|
||||
int irst; /* Restart depth for RGMRES or BiCGSTAB(L) */
|
||||
int istop; /* Stopping criterion: 1:backward error 2: ||r||_2/||b||_2 */
|
||||
double eps; /* Stopping tolerance */
|
||||
double err; /* Convergence indicator on exit */
|
||||
} psb_c_SolverOptions;
|
||||
|
||||
int psb_c_DefaultSolverOptions(psb_c_SolverOptions *opt);
|
||||
|
||||
int psb_c_skrylov(const char *method, psb_c_sspmat *ah, psb_c_sprec *ph,
|
||||
psb_c_svector *bh, psb_c_svector *xh,
|
||||
psb_c_descriptor *cdh, psb_c_SolverOptions *opt);
|
||||
|
||||
int psb_c_dkrylov(const char *method, psb_c_dspmat *ah, psb_c_dprec *ph,
|
||||
psb_c_dvector *bh, psb_c_dvector *xh,
|
||||
psb_c_descriptor *cdh, psb_c_SolverOptions *opt);
|
||||
|
||||
int psb_c_ckrylov(const char *method, psb_c_cspmat *ah, psb_c_cprec *ph,
|
||||
psb_c_cvector *bh, psb_c_cvector *xh,
|
||||
psb_c_descriptor *cdh, psb_c_SolverOptions *opt);
|
||||
|
||||
int psb_c_zkrylov(const char *method, psb_c_zspmat *ah, psb_c_zprec *ph,
|
||||
psb_c_zvector *bh, psb_c_zvector *xh,
|
||||
psb_c_descriptor *cdh, psb_c_SolverOptions *opt);
|
||||
|
||||
#define PSB_VALID_KRYLOV_METHODS_STRINGS "CG","CGS","BICG","BICGSTAB","RGMRES","BICGSTABL","FCG","GCR"
|
||||
#define PSB_VALID_KRYLOV_METHODS_STRING "CG CGS BICG BICGSTAB RGMRES BICGSTABL FCG GCR"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif
|
@ -0,0 +1,106 @@
|
||||
module psb_skrylov_cbind_mod
|
||||
|
||||
use psb_base_krylov_cbind_mod
|
||||
|
||||
contains
|
||||
|
||||
function psb_c_skrylov(methd,&
|
||||
& ah,ph,bh,xh,cdh,options) bind(c) result(res)
|
||||
use psb_base_mod
|
||||
use psb_prec_mod
|
||||
use psb_krylov_mod
|
||||
use psb_objhandle_mod
|
||||
use psb_prec_cbind_mod
|
||||
use psb_base_string_cbind_mod
|
||||
implicit none
|
||||
integer(c_int) :: res
|
||||
type(psb_c_sspmat) :: ah
|
||||
type(psb_c_descriptor) :: cdh
|
||||
type(psb_c_sprec) :: ph
|
||||
type(psb_c_svector) :: bh,xh
|
||||
character(c_char) :: methd(*)
|
||||
type(solveroptions) :: options
|
||||
|
||||
res= psb_c_skrylov_opt(methd, ah, ph, bh, xh, options%eps,cdh, &
|
||||
& itmax=options%itmax, iter=options%iter,&
|
||||
& itrace=options%itrace, istop=options%istop,&
|
||||
& irst=options%irst, err=options%err)
|
||||
|
||||
end function psb_c_skrylov
|
||||
|
||||
|
||||
function psb_c_skrylov_opt(methd,&
|
||||
& ah,ph,bh,xh,eps,cdh,itmax,iter,err,itrace,irst,istop) bind(c) result(res)
|
||||
use psb_base_mod
|
||||
use psb_prec_mod
|
||||
use psb_krylov_mod
|
||||
use psb_objhandle_mod
|
||||
use psb_prec_cbind_mod
|
||||
use psb_base_string_cbind_mod
|
||||
implicit none
|
||||
integer(c_int) :: res
|
||||
type(psb_c_sspmat) :: ah
|
||||
type(psb_c_descriptor) :: cdh
|
||||
type(psb_c_sprec) :: ph
|
||||
type(psb_c_svector) :: bh,xh
|
||||
integer(c_int), value :: itmax,itrace,irst,istop
|
||||
real(c_double), value :: eps
|
||||
integer(c_int) :: iter
|
||||
real(c_double) :: err
|
||||
character(c_char) :: methd(*)
|
||||
type(solveroptions) :: options
|
||||
type(psb_desc_type), pointer :: descp
|
||||
type(psb_sspmat_type), pointer :: ap
|
||||
type(psb_sprec_type), pointer :: precp
|
||||
type(psb_s_vect_type), pointer :: xp, bp
|
||||
|
||||
integer :: info,fitmax,fitrace,first,fistop,fiter
|
||||
character(len=20) :: fmethd
|
||||
real(psb_spk_) :: feps,ferr
|
||||
|
||||
res = -1
|
||||
if (c_associated(cdh%item)) then
|
||||
call c_f_pointer(cdh%item,descp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
if (c_associated(xh%item)) then
|
||||
call c_f_pointer(xh%item,xp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
if (c_associated(bh%item)) then
|
||||
call c_f_pointer(bh%item,bp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
if (c_associated(ah%item)) then
|
||||
call c_f_pointer(ah%item,ap)
|
||||
else
|
||||
return
|
||||
end if
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
|
||||
call stringc2f(methd,fmethd)
|
||||
feps = eps
|
||||
fitmax = itmax
|
||||
fitrace = itrace
|
||||
first = irst
|
||||
fistop = istop
|
||||
|
||||
call psb_krylov(fmethd, ap, precp, bp, xp, feps, &
|
||||
& descp, info,&
|
||||
& itmax=fitmax,iter=fiter,itrace=fitrace,istop=fistop,&
|
||||
& irst=first, err=ferr)
|
||||
iter = fiter
|
||||
err = ferr
|
||||
res = info
|
||||
|
||||
end function psb_c_skrylov_opt
|
||||
|
||||
end module psb_skrylov_cbind_mod
|
@ -0,0 +1,106 @@
|
||||
module psb_zkrylov_cbind_mod
|
||||
|
||||
use psb_base_krylov_cbind_mod
|
||||
|
||||
contains
|
||||
|
||||
function psb_c_zkrylov(methd,&
|
||||
& ah,ph,bh,xh,cdh,options) bind(c) result(res)
|
||||
use psb_base_mod
|
||||
use psb_prec_mod
|
||||
use psb_krylov_mod
|
||||
use psb_objhandle_mod
|
||||
use psb_prec_cbind_mod
|
||||
use psb_base_string_cbind_mod
|
||||
implicit none
|
||||
integer(c_int) :: res
|
||||
type(psb_c_zspmat) :: ah
|
||||
type(psb_c_descriptor) :: cdh
|
||||
type(psb_c_zprec) :: ph
|
||||
type(psb_c_zvector) :: bh,xh
|
||||
character(c_char) :: methd(*)
|
||||
type(solveroptions) :: options
|
||||
|
||||
res= psb_c_zkrylov_opt(methd, ah, ph, bh, xh, options%eps,cdh, &
|
||||
& itmax=options%itmax, iter=options%iter,&
|
||||
& itrace=options%itrace, istop=options%istop,&
|
||||
& irst=options%irst, err=options%err)
|
||||
|
||||
end function psb_c_zkrylov
|
||||
|
||||
|
||||
function psb_c_zkrylov_opt(methd,&
|
||||
& ah,ph,bh,xh,eps,cdh,itmax,iter,err,itrace,irst,istop) bind(c) result(res)
|
||||
use psb_base_mod
|
||||
use psb_prec_mod
|
||||
use psb_krylov_mod
|
||||
use psb_objhandle_mod
|
||||
use psb_prec_cbind_mod
|
||||
use psb_base_string_cbind_mod
|
||||
implicit none
|
||||
integer(c_int) :: res
|
||||
type(psb_c_zspmat) :: ah
|
||||
type(psb_c_descriptor) :: cdh
|
||||
type(psb_c_zprec) :: ph
|
||||
type(psb_c_zvector) :: bh,xh
|
||||
integer(c_int), value :: itmax,itrace,irst,istop
|
||||
real(c_double), value :: eps
|
||||
integer(c_int) :: iter
|
||||
real(c_double) :: err
|
||||
character(c_char) :: methd(*)
|
||||
type(solveroptions) :: options
|
||||
type(psb_desc_type), pointer :: descp
|
||||
type(psb_zspmat_type), pointer :: ap
|
||||
type(psb_zprec_type), pointer :: precp
|
||||
type(psb_z_vect_type), pointer :: xp, bp
|
||||
|
||||
integer :: info,fitmax,fitrace,first,fistop,fiter
|
||||
character(len=20) :: fmethd
|
||||
real(psb_dpk_) :: feps,ferr
|
||||
|
||||
res = -1
|
||||
if (c_associated(cdh%item)) then
|
||||
call c_f_pointer(cdh%item,descp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
if (c_associated(xh%item)) then
|
||||
call c_f_pointer(xh%item,xp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
if (c_associated(bh%item)) then
|
||||
call c_f_pointer(bh%item,bp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
if (c_associated(ah%item)) then
|
||||
call c_f_pointer(ah%item,ap)
|
||||
else
|
||||
return
|
||||
end if
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
|
||||
call stringc2f(methd,fmethd)
|
||||
feps = eps
|
||||
fitmax = itmax
|
||||
fitrace = itrace
|
||||
first = irst
|
||||
fistop = istop
|
||||
|
||||
call psb_krylov(fmethd, ap, precp, bp, xp, feps, &
|
||||
& descp, info,&
|
||||
& itmax=fitmax,iter=fiter,itrace=fitrace,istop=fistop,&
|
||||
& irst=first, err=ferr)
|
||||
iter = fiter
|
||||
err = ferr
|
||||
res = info
|
||||
|
||||
end function psb_c_zkrylov_opt
|
||||
|
||||
end module psb_zkrylov_cbind_mod
|
@ -0,0 +1,12 @@
|
||||
#include <stdlib.h>
|
||||
#include "psb_c_cprec.h"
|
||||
|
||||
psb_c_cprec* psb_c_new_cprec()
|
||||
{
|
||||
psb_c_cprec* temp;
|
||||
|
||||
temp=(psb_c_cprec *) malloc(sizeof(psb_c_cprec));
|
||||
temp->cprec=NULL;
|
||||
return(temp);
|
||||
}
|
||||
|
@ -0,0 +1,24 @@
|
||||
#ifndef PSB_C_CPREC_
|
||||
#define PSB_C_CPREC_
|
||||
#include "psb_base_cbind.h"
|
||||
/* Object handle related routines */
|
||||
/* Note: psb_get_XXX_handle returns: <= 0 unsuccessful */
|
||||
/* >0 valid handle */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct PSB_C_CPREC {
|
||||
void *cprec;
|
||||
} psb_c_cprec;
|
||||
|
||||
psb_c_cprec* psb_c_new_cprec();
|
||||
|
||||
psb_i_t psb_c_cprecinit(psb_c_cprec *ph, const char *ptype);
|
||||
psb_i_t psb_c_cprecbld(psb_c_cspmat *ah, psb_c_descriptor *cdh, psb_c_cprec *ph);
|
||||
psb_i_t psb_c_cprecfree(psb_c_cprec *ph);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -0,0 +1,12 @@
|
||||
#include <stdlib.h>
|
||||
#include "psb_c_sprec.h"
|
||||
|
||||
psb_c_sprec* psb_c_new_sprec()
|
||||
{
|
||||
psb_c_sprec* temp;
|
||||
|
||||
temp=(psb_c_sprec *) malloc(sizeof(psb_c_sprec));
|
||||
temp->sprec=NULL;
|
||||
return(temp);
|
||||
}
|
||||
|
@ -0,0 +1,24 @@
|
||||
#ifndef PSB_C_SPREC_
|
||||
#define PSB_C_SPREC_
|
||||
#include "psb_base_cbind.h"
|
||||
/* Object handle related routines */
|
||||
/* Note: psb_get_XXX_handle returns: <= 0 unsuccessful */
|
||||
/* >0 valid handle */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct PSB_C_SPREC {
|
||||
void *sprec;
|
||||
} psb_c_sprec;
|
||||
|
||||
psb_c_sprec* psb_c_new_sprec();
|
||||
|
||||
psb_i_t psb_c_sprecinit(psb_c_sprec *ph, const char *ptype);
|
||||
psb_i_t psb_c_sprecbld(psb_c_sspmat *ah, psb_c_descriptor *cdh, psb_c_sprec *ph);
|
||||
psb_i_t psb_c_sprecfree(psb_c_sprec *ph);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -0,0 +1,12 @@
|
||||
#include <stdlib.h>
|
||||
#include "psb_c_zprec.h"
|
||||
|
||||
psb_c_zprec* psb_c_new_zprec()
|
||||
{
|
||||
psb_c_zprec* temp;
|
||||
|
||||
temp=(psb_c_zprec *) malloc(sizeof(psb_c_zprec));
|
||||
temp->zprec=NULL;
|
||||
return(temp);
|
||||
}
|
||||
|
@ -0,0 +1,24 @@
|
||||
#ifndef PSB_C_ZPREC_
|
||||
#define PSB_C_ZPREC_
|
||||
#include "psb_base_cbind.h"
|
||||
/* Object handle related routines */
|
||||
/* Note: psb_get_XXX_handle returns: <= 0 unsuccessful */
|
||||
/* >0 valid handle */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct PSB_C_ZPREC {
|
||||
void *zprec;
|
||||
} psb_c_zprec;
|
||||
|
||||
psb_c_zprec* psb_c_new_zprec();
|
||||
|
||||
psb_i_t psb_c_zprecinit(psb_c_zprec *ph, const char *ptype);
|
||||
psb_i_t psb_c_zprecbld(psb_c_zspmat *ah, psb_c_descriptor *cdh, psb_c_zprec *ph);
|
||||
psb_i_t psb_c_zprecfree(psb_c_zprec *ph);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,6 +1,9 @@
|
||||
#ifndef PSB_PREC_CBIND_
|
||||
#define PSB_PREC_CBIND_
|
||||
|
||||
#include "psb_c_sprec.h"
|
||||
#include "psb_c_dprec.h"
|
||||
#include "psb_c_cprec.h"
|
||||
#include "psb_c_zprec.h"
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue