Permalink
Browse files

adding C++ code

  • Loading branch information...
Tim Warburton Tim Warburton
Tim Warburton authored and Tim Warburton committed Dec 24, 2015
1 parent 42b078b commit e9a25c5c99f2861d8d142b13be196f96dbb61b45
Showing 453 changed files with 120,836 additions and 0 deletions.
View
@@ -0,0 +1,20 @@
All files are in the trunk directory and its sub-directories.
You may well have to customize the system.mk file to reflect the
compilers and lapack/blas libraries available on your system. The
default system.mk file works ok using the gnu compilers under OS X.
To build and run an example application:
cd trunk
make Maxwell2D
./bin/Maxwell2D
The defaults used for this simulation are described in:
trunk/Src/Examples2D/Maxwell2D/Maxwell2D_Driver.cpp
The main function is in:
trunk/Src/Examples2D/Maxwell2D/Maxwell2D_main.cpp
For other examples see options in Makefile.
@@ -0,0 +1,162 @@
include ../system.mk
INCLUDES = -I.
.SUFFIXES: .f
OBJS = \
dasum.o \
daxpy.o \
dbdsqr.o \
dcabs1.o \
dcopy.o \
ddot.o \
dgebak.o \
dgebal.o \
dgebd2.o \
dgebrd.o \
dgecon.o \
dgeev.o \
dgehd2.o \
dgehrd.o \
dgelq2.o \
dgelqf.o \
dgelss.o \
dgemm.o \
dgemv.o \
dgeqr2.o \
dgeqrf.o \
dger.o \
dgesv.o \
dgesvd.o \
dgetf2.o \
dgetrf.o \
dgetrs.o \
dhseqr.o \
dlabad.o \
dlabrd.o \
dlacon.o \
dlacpy.o \
dladiv.o \
dlae2.o \
dlaev2.o \
dlahqr.o \
dlahrd.o \
dlaln2.o \
dlamch.o \
dlange.o \
dlanhs.o \
dlanst.o \
dlansy.o \
dlanv2.o \
dlapy2.o \
dlarf.o \
dlarfb.o \
dlarfg.o \
dlarft.o \
dlarfx.o \
dlartg.o \
dlas2.o \
dlascl.o \
dlaset.o \
dlasq1.o \
dlasq2.o \
dlasq3.o \
dlasq4.o \
dlasq5.o \
dlasq6.o \
dlasr.o \
dlasrt.o \
dlassq.o \
dlasv2.o \
dlaswp.o \
dlatrd.o \
dlatrs.o \
dnrm2.o \
dorg2l.o \
dorg2r.o \
dorgbr.o \
dorghr.o \
dorgl2.o \
dorglq.o \
dorgql.o \
dorgqr.o \
dorgtr.o \
dorm2r.o \
dormbr.o \
dorml2.o \
dormlq.o \
dormqr.o \
dpbtf2.o \
dpbtrf.o \
dpbtrs.o \
dposv.o \
dpotf2.o \
dpotrf.o \
dpotrs.o \
drot.o \
drscl.o \
dscal.o \
dsteqr.o \
dsterf.o \
dstev.o \
dswap.o \
dsyev.o \
dsymv.o \
dsyr.o \
dsyr2.o \
dsyr2k.o \
dsyrfs.o \
dsyrk.o \
dsytd2.o \
dsytrd.o \
dtbsv.o \
dtrevc.o \
dtrmm.o \
dtrmv.o \
dtrsm.o \
dtrsv.o \
dzasum.o \
dzsum1.o \
idamax.o \
ieeeck.o \
ilaenv.o \
izamax.o \
izmax1.o \
lsame.o \
xerbla.o \
zaxpy.o \
zcopy.o \
zdotc.o \
zdotu.o \
zdrscl.o \
zdscal.o \
zgecon.o \
zgemm.o \
zgeru.o \
zgetf2.o \
zgetrf.o \
zlacon.o \
zladiv.o \
zlaswp.o \
zlatrs.o \
zscal.o \
zswap.o \
ztrsm.o \
ztrsv.o
FCFLAGS = $(FCOPTIONS) $(OPTFLAGS)
.f.o:
$(FC) $(FCFLAGS) -c $*.f
libBlasLapack.a: $(OBJS)
$(AR) $@ $(OBJS)
$(RANLIB) $@
$(CP) $@ ../../Libraries
clean:
rm -f $(OBJS)
realclean: clean
rm -rf libBlasLapack.a $(COMPILERTEMPFILES) ../../Libraries/libBlasLapack.a
@@ -0,0 +1,43 @@
double precision function dasum(n,dx,incx)
c
c takes the sum of the absolute values.
c jack dongarra, linpack, 3/11/78.
c modified 3/93 to return if incx .le. 0.
c modified 12/3/93, array(1) declarations changed to array(*)
c
double precision dx(*),dtemp
integer i,incx,m,mp1,n,nincx
c
dasum = 0.0d0
dtemp = 0.0d0
if( n.le.0 .or. incx.le.0 )return
if(incx.eq.1)go to 20
c
c code for increment not equal to 1
c
nincx = n*incx
do 10 i = 1,nincx,incx
dtemp = dtemp + dabs(dx(i))
10 continue
dasum = dtemp
return
c
c code for increment equal to 1
c
c
c clean-up loop
c
20 m = mod(n,6)
if( m .eq. 0 ) go to 40
do 30 i = 1,m
dtemp = dtemp + dabs(dx(i))
30 continue
if( n .lt. 6 ) go to 60
40 mp1 = m + 1
do 50 i = mp1,n,6
dtemp = dtemp + dabs(dx(i)) + dabs(dx(i + 1)) + dabs(dx(i + 2))
* + dabs(dx(i + 3)) + dabs(dx(i + 4)) + dabs(dx(i + 5))
50 continue
60 dasum = dtemp
return
end
@@ -0,0 +1,48 @@
subroutine daxpy(n,da,dx,incx,dy,incy)
c
c constant times a vector plus a vector.
c uses unrolled loops for increments equal to one.
c jack dongarra, linpack, 3/11/78.
c modified 12/3/93, array(1) declarations changed to array(*)
c
double precision dx(*),dy(*),da
integer i,incx,incy,ix,iy,m,mp1,n
c
if(n.le.0)return
if (da .eq. 0.0d0) return
if(incx.eq.1.and.incy.eq.1)go to 20
c
c code for unequal increments or equal increments
c not equal to 1
c
ix = 1
iy = 1
if(incx.lt.0)ix = (-n+1)*incx + 1
if(incy.lt.0)iy = (-n+1)*incy + 1
do 10 i = 1,n
dy(iy) = dy(iy) + da*dx(ix)
ix = ix + incx
iy = iy + incy
10 continue
return
c
c code for both increments equal to 1
c
c
c clean-up loop
c
20 m = mod(n,4)
if( m .eq. 0 ) go to 40
do 30 i = 1,m
dy(i) = dy(i) + da*dx(i)
30 continue
if( n .lt. 4 ) return
40 mp1 = m + 1
do 50 i = mp1,n,4
dy(i) = dy(i) + da*dx(i)
dy(i + 1) = dy(i + 1) + da*dx(i + 1)
dy(i + 2) = dy(i + 2) + da*dx(i + 2)
dy(i + 3) = dy(i + 3) + da*dx(i + 3)
50 continue
return
end
Oops, something went wrong.

0 comments on commit e9a25c5

Please sign in to comment.