xref: /phasta/svLS/svLS_API.h (revision 712d3df0b59ebebaaeaea358162c8d2c043c6e08)
1*1e99f302SBen Matthews !     This software is Copyright (c) 2012-2015 The Regents of the
2*1e99f302SBen Matthews !     University of California. All Rights Reserved.
3*1e99f302SBen Matthews !
4*1e99f302SBen Matthews !     Permission to copy and modify this software and its documentation
5*1e99f302SBen Matthews !     for educational, research and non-profit purposes, without fee,
6*1e99f302SBen Matthews !     and without a written agreement is hereby granted, provided that
7*1e99f302SBen Matthews !     the above copyright notice, this paragraph and the following three
8*1e99f302SBen Matthews !     paragraphs appear in all copies.
9*1e99f302SBen Matthews !
10*1e99f302SBen Matthews !     Permission to make commercial use of this software may be obtained
11*1e99f302SBen Matthews !     by contacting:
12*1e99f302SBen Matthews !     Technology Transfer Office
13*1e99f302SBen Matthews !     9500 Gilman Drive, Mail Code 0910
14*1e99f302SBen Matthews !     University of California
15*1e99f302SBen Matthews !     La Jolla, CA 92093-0910
16*1e99f302SBen Matthews !     (858) 534-5815
17*1e99f302SBen Matthews !     invent@ucsd.edu
18*1e99f302SBen Matthews !
19*1e99f302SBen Matthews !     This software program and documentation are copyrighted by The
20*1e99f302SBen Matthews !     Regents of the University of California. The software program and
21*1e99f302SBen Matthews !     documentation are supplied "as is", without any accompanying
22*1e99f302SBen Matthews !     services from The Regents. The Regents does not warrant that the
23*1e99f302SBen Matthews !     operation of the program will be uninterrupted or error-free. The
24*1e99f302SBen Matthews !     end-user understands that the program was developed for research
25*1e99f302SBen Matthews !     purposes and is advised not to rely exclusively on the program for
26*1e99f302SBen Matthews !     any reason.
27*1e99f302SBen Matthews !
28*1e99f302SBen Matthews !     IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY
29*1e99f302SBen Matthews !     PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
30*1e99f302SBen Matthews !     DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS
31*1e99f302SBen Matthews !     SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
32*1e99f302SBen Matthews !     CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33*1e99f302SBen Matthews !     THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
34*1e99f302SBen Matthews !     WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
35*1e99f302SBen Matthews !     OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
36*1e99f302SBen Matthews !     SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE
37*1e99f302SBen Matthews !     UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE
38*1e99f302SBen Matthews !     MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
39*1e99f302SBen Matthews 
40*1e99f302SBen Matthews       INTERFACE
41*1e99f302SBen Matthews          SUBROUTINE svLS_COMMU_CREATE(commu, commi)
42*1e99f302SBen Matthews             INCLUDE "svLS_STD.h"
43*1e99f302SBen Matthews             TYPE(svLS_commuType), INTENT(INOUT) :: commu
44*1e99f302SBen Matthews             INTEGER, INTENT(IN) :: commi
45*1e99f302SBen Matthews          END SUBROUTINE svLS_COMMU_CREATE
46*1e99f302SBen Matthews          SUBROUTINE svLS_COMMU_FREE(commu)
47*1e99f302SBen Matthews             INCLUDE "svLS_STD.h"
48*1e99f302SBen Matthews             TYPE(svLS_commuType), INTENT(INOUT) :: commu
49*1e99f302SBen Matthews          END SUBROUTINE svLS_COMMU_FREE
50*1e99f302SBen Matthews 
51*1e99f302SBen Matthews          SUBROUTINE svLS_LHS_CREATE(lhs, commu, gnNo, nNo, nnz,
52*1e99f302SBen Matthews      2      gNodes, rowPtr, colPtr, nFaces)
53*1e99f302SBen Matthews             INCLUDE "svLS_STD.h"
54*1e99f302SBen Matthews             TYPE(svLS_lhsType), INTENT(INOUT) :: lhs
55*1e99f302SBen Matthews             TYPE(svLS_commuType), INTENT(IN) :: commu
56*1e99f302SBen Matthews             INTEGER, INTENT(IN) :: gnNo, nNo, nnz
57*1e99f302SBen Matthews             INTEGER, INTENT(IN) :: gNodes(nNo), rowPtr(nNo+1),
58*1e99f302SBen Matthews      2         colPtr(nnz)
59*1e99f302SBen Matthews             INTEGER, INTENT(IN) :: nFaces
60*1e99f302SBen Matthews          END SUBROUTINE svLS_LHS_CREATE
61*1e99f302SBen Matthews          SUBROUTINE svLS_LHS_FREE(lhs)
62*1e99f302SBen Matthews             INCLUDE "svLS_STD.h"
63*1e99f302SBen Matthews             TYPE(svLS_lhsType), INTENT(INOUT) :: lhs
64*1e99f302SBen Matthews          END SUBROUTINE svLS_LHS_FREE
65*1e99f302SBen Matthews 
66*1e99f302SBen Matthews          SUBROUTINE svLS_LS_CREATE(ls, LS_type, relTol, absTol, maxItr,
67*1e99f302SBen Matthews      2      dimKry, relTolIn, absTolIn, maxItrIn)
68*1e99f302SBen Matthews             INCLUDE "svLS_STD.h"
69*1e99f302SBen Matthews             TYPE(svLS_lsType), INTENT(INOUT) :: ls
70*1e99f302SBen Matthews             INTEGER, INTENT(IN) :: LS_type
71*1e99f302SBen Matthews             REAL*8, INTENT(IN), OPTIONAL :: relTol, absTol, relTolIn(2),
72*1e99f302SBen Matthews      2         absTolIn(2)
73*1e99f302SBen Matthews             INTEGER, INTENT(IN), OPTIONAL :: maxItr, dimKry, maxItrIn(2)
74*1e99f302SBen Matthews          END SUBROUTINE svLS_LS_CREATE
75*1e99f302SBen Matthews          SUBROUTINE svLS_LS_FREE(ls)
76*1e99f302SBen Matthews             INCLUDE "svLS_STD.h"
77*1e99f302SBen Matthews             TYPE(svLS_lsType), INTENT(INOUT) :: ls
78*1e99f302SBen Matthews          END SUBROUTINE svLS_LS_FREE
79*1e99f302SBen Matthews 
80*1e99f302SBen Matthews          SUBROUTINE svLS_BC_CREATE(lhs, faIn, nNo, dof, BC_type,
81*1e99f302SBen Matthews      2         gNodes, Val)
82*1e99f302SBen Matthews             INCLUDE "svLS_STD.h"
83*1e99f302SBen Matthews             TYPE(svLS_lhsType), INTENT(INOUT) :: lhs
84*1e99f302SBen Matthews             INTEGER, INTENT(IN) :: faIn, nNo, dof
85*1e99f302SBen Matthews             INTEGER, INTENT(IN) :: BC_type
86*1e99f302SBen Matthews             INTEGER, INTENT(IN) :: gNodes(nNo)
87*1e99f302SBen Matthews             REAL*8, INTENT(IN), OPTIONAL :: Val(dof,nNo)
88*1e99f302SBen Matthews          END SUBROUTINE svLS_BC_CREATE
89*1e99f302SBen Matthews          SUBROUTINE svLS_BC_FREE(lhs, faIn)
90*1e99f302SBen Matthews             INCLUDE "svLS_STD.h"
91*1e99f302SBen Matthews             TYPE(svLS_lhsType), INTENT(INOUT) :: lhs
92*1e99f302SBen Matthews             INTEGER, INTENT(IN) :: faIn
93*1e99f302SBen Matthews          END SUBROUTINE svLS_BC_FREE
94*1e99f302SBen Matthews 
95*1e99f302SBen Matthews          SUBROUTINE svLS_SOLVE (lhs, ls, dof, Ri, Val, incL, res)
96*1e99f302SBen Matthews             INCLUDE "svLS_STD.h"
97*1e99f302SBen Matthews             TYPE(svLS_lhsType), INTENT(INOUT) :: lhs
98*1e99f302SBen Matthews             TYPE(svLS_lsType), INTENT(INOUT) :: ls
99*1e99f302SBen Matthews             INTEGER, INTENT(IN) :: dof
100*1e99f302SBen Matthews             REAL*8, INTENT(INOUT) :: Ri(dof,lhs%nNo)
101*1e99f302SBen Matthews             REAL*8, INTENT(IN) :: Val(dof*dof,lhs%nnz)
102*1e99f302SBen Matthews             INTEGER, INTENT(IN), OPTIONAL :: incL(lhs%nFaces)
103*1e99f302SBen Matthews             REAL*8, INTENT(IN), OPTIONAL :: res(lhs%nFaces)
104*1e99f302SBen Matthews          END SUBROUTINE svLS_SOLVE
105*1e99f302SBen Matthews       END INTERFACE
106*1e99f302SBen Matthews 
107*1e99f302SBen Matthews 
108*1e99f302SBen Matthews 
109*1e99f302SBen Matthews 
110*1e99f302SBen Matthews 
111