added README_changes.txt
[wrffire.git] / wrfv2_fire / chem / KPP / kpp / kpp-2.1 / src.org / debug.c
blob703c4e069d11b17e7e2cee92791a6799160668cc
1 /******************************************************************************
3 KPP - The Kinetic PreProcessor
4 Builds simulation code for chemical kinetic systems
6 Copyright (C) 1995-1996 Valeriu Damian and Adrian Sandu
7 Copyright (C) 1997-2005 Adrian Sandu
9 KPP is free software; you can redistribute it and/or modify it under the
10 terms of the GNU General Public License as published by the Free Software
11 Foundation (http://www.gnu.org/copyleft/gpl.html); either version 2 of the
12 License, or (at your option) any later version.
14 KPP is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 details.
19 You should have received a copy of the GNU General Public License along
20 with this program; if not, consult http://www.gnu.org/copyleft/gpl.html or
21 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA.
24 Adrian Sandu
25 Computer Science Department
26 Virginia Polytechnic Institute and State University
27 Blacksburg, VA 24060
28 E-mail: sandu@cs.vt.edu
30 ******************************************************************************/
33 #include "gdata.h"
34 #include "scan.h"
36 void WriteAtoms()
38 int i;
40 printf("\nATM -----------------------------------------------" );
42 for( i = 0; i < SpeciesNr; i++ ) {
43 switch( AtomTable[i].check ) {
44 case NO_CHECK:
45 printf( "\n(%3d) %6s, NO -- ------ ", i, AtomTable[i].name );
46 break;
47 case DO_CHECK:
48 printf( "\n(%3d) %6s, -- DO ------", i, AtomTable[i].name );
49 break;
50 case CANCEL_CHECK:
51 printf( "\n(%3d) %6s, -- -- CANCEL", i, AtomTable[i].name );
52 break;
53 default:
54 printf( "\n(%3d) %6s, -- -- ------ UNKNOWN [%d]", i,
55 AtomTable[i].name, AtomTable[i].check );
56 break;
61 void WriteSpecies()
63 int i;
64 int j;
65 char *type;
66 char *lookat;
68 printf("\nSPC -----------------------------------------------" );
70 for( i = 0; i < SpeciesNr; i++ ) {
72 switch( SpeciesTable[i].type ) {
73 case VAR_SPC: type = "V - -"; break;
74 case RAD_SPC: type = "- R -"; break;
75 case FIX_SPC: type = "- - F"; break;
76 default: type = "? ? ?"; break;
79 switch( SpeciesTable[i].lookat ) {
80 case 0: lookat = "----"; break;
81 case 1: lookat = "LOOK"; break;
82 default: lookat = "????"; break;
85 printf( "\n(%3d) %-10s, type %s,%s {",
86 i, SpeciesTable[i].name, type, lookat );
87 for( j = 0; j < SpeciesTable[i].nratoms; j++ )
88 printf( " %d%s", SpeciesTable[i].atoms[j].nr,
89 AtomTable[ SpeciesTable[i].atoms[j].code ].name );
90 printf("}");
94 void WriteMatrices()
96 int i, j;
98 printf("\nMAT ------------------ cc -------------------------" );
99 for( i = 0; i < SpcNr; i++ ) {
100 printf("\n %-6s (%d)[%d] ", SpeciesTable[ Code[i] ].name,
101 SpeciesTable[ Code[i] ].type, Code[i] );
102 for( j = 0; j < EqnNr; j++ ) {
103 printf( "%5.1f ", Stoich_Left[i][j] );
107 printf("\nMAT ------------------ cd -------------------------" );
108 for( i = 0; i < SpcNr; i++ ) {
109 printf("\n %-6s (%d)[%d] ", SpeciesTable[ Code[i] ].name,
110 SpeciesTable[ Code[i] ].type, Code[i] );
111 for( j = 0; j < EqnNr; j++ ) {
112 printf( "%5.1f ", Stoich_Right[i][j] );
116 printf("\nMAT ------------------ cf -------------------------" );
117 for( i = 0; i < SpcNr; i++ ) {
118 printf("\n %-6s (%d)[%d] <r%d> ", SpeciesTable[ Code[i] ].name,
119 SpeciesTable[ Code[i] ].type, Code[i], Reactive[i] );
120 for( j = 0; j < EqnNr; j++ ) {
121 printf( "%5.1f ", Stoich[i][j] );
126 void WriteOptions()
128 printf("\n### Options -------------------------------------------\n");
129 if( useAggregate ) printf("FUNCTION - AGGREGATE\n");
130 else printf("FUNCTION - SPLIT\n");
131 switch ( useJacobian ) {
132 case JAC_OFF: printf("JACOBIAN - OFF\n"); break;
133 case JAC_FULL: printf("JACOBIAN - FULL\n"); break;
134 case JAC_LU_ROW: printf("JACOBIAN - SPARSE W/ ACCOUNT FOR LU DECOMPOSITION FILL-IN\n"); break;
135 case JAC_ROW: printf("JACOBIAN - SPARSE\n"); break;
137 if( useDouble ) printf("DOUBLE - ON\n");
138 else printf("DOUBLE - OFF\n");
139 if( useReorder ) printf("REORDER - ON\n");
140 else printf("REORDER - OFF\n");
141 if( useMex ) printf("MEX - ON\n");
142 else printf("MEX - OFF\n");
143 if( useDummyindex) printf("DUMMYINDEX - ON\n");
144 else printf("DUMMYINDEX - OFF\n");
145 if( useEqntags) printf("EQNTAGS - ON\n");
146 else printf("EQNTAGS - OFF\n");