FEI  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fei_defs.h
1 /*
2 // @HEADER
3 // ************************************************************************
4 // FEI: Finite Element Interface to Linear Solvers
5 // Copyright (2005) Sandia Corporation.
6 //
7 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the
8 // U.S. Government retains certain rights in this software.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Alan Williams (william@sandia.gov)
38 //
39 // ************************************************************************
40 // @HEADER
41 */
42 
43 #ifndef _fei_defs_h_
44 #define _fei_defs_h_
45 
46 /*
47  In this file we set some #defines to use as parameters to
48  some fei functions, and also some error-code returns.
49  We also provide the typedef for 'GlobalID' which appears in
50  many FEI function prototypes. Note that the default case is
51  for GlobalID to simply be an int.
52  This file is included by both C and C++ versions of the fei.
53 */
54 
55 #ifdef EIGHT_BYTE_GLOBAL_ID
56  typedef long long GlobalID;
57  #define GlobalID_MAX LLONG_MAX
58  #define GlobalID_MIN LLONG_MIN
59 #else
60  typedef int GlobalID;
61 #endif
62 
63 
64 /* solveType (used in 'setSolveType'): */
65 #define FEI_SINGLE_SYSTEM 0
66 #define FEI_EIGEN_SOLVE 1
67 #define FEI_AGGREGATE_SUM 2
68 #define FEI_AGGREGATE_PRODUCT 3
69 
70 /* IDType (used in coefficient-access functions) */
71 #define FEI_NODE 0
72 #define FEI_ELEMENT 1
73 #define FEI_ONLY_NODES 2
74 #define FEI_ONLY_ELEMENTS 3
75 
76 /* elemFormat (used in 'sumInElem' and 'sumInElemMatrix'): */
77 #define FEI_DENSE_ROW 0
78 #define FEI_UPPER_SYMM_ROW 1
79 #define FEI_LOWER_SYMM_ROW 2
80 #define FEI_DENSE_COL 3
81 #define FEI_UPPER_SYMM_COL 4
82 #define FEI_LOWER_SYMM_COL 5
83 #define FEI_DIAGONAL 6
84 #define FEI_BLOCK_DIAGONAL_ROW 7
85 #define FEI_BLOCK_DIAGONAL_COL 8
86 
87 
88 /* interleaveStrategy (used in initElemBlock): */
89 #define FEI_NODE_MAJOR 0
90 #define FEI_FIELD_MAJOR 1
91 
92 
93 /* timingMode (used in cumulative_MPI_Wtimes): */
94 #define FEI_LOCAL_TIMES 0
95 #define FEI_MAX_TIMES 1
96 #define FEI_MIN_TIMES 2
97 
98 /* FEI function return values */
99 #define FEI_SUCCESS 0
100 #define FEI_FATAL_ERROR -1
101 #define FEI_ID_NOT_FOUND -2
102 
103 #endif
104