65int main(
int argc,
char* argv[]) {
71 bool verbose1 =
false;
78 MPI_Init(&argc, &argv);
87 Teuchos::ParameterList paramlist;
88 paramlist.set(
"absolute_threshold", 44.0);
89 paramlist.set(
"level_fill", 2);
90 paramlist.set(
"LEVEL_OVERLAP", 2);
91 paramlist.set(
"relative_threshold", 1.e-2);
92 paramlist.set(
"fill_tolerance", 2.0);
93 paramlist.set(
"use_reciprocal",
false);
94 paramlist.set(
"level_overlap", 2);
95 paramlist.set(
"overlap_mode",
Add);
99 if (params.double_params[Ifpack::absolute_threshold] != 44.0) {
101 cerr <<
"SetParameters test failed to correctly set absolute_threshold."<<endl;
107 int my_pid = Comm.
MyPID();
108 int num_procs = Comm.
NumProc();
109 int global_n = num_procs*local_n;
113 int first_global_row = my_pid*local_n;
115 for(i=0; i<local_n; ++i) {
116 int row = first_global_row + i;
117 graph.InsertGlobalIndices(row, 1, &row);
120 graph.FillComplete();
131 for(i=0; i<local_n; ++i) {
132 int row = first_global_row + i;
137 Ifpack_CrsIct crsict(A, 1.0, 1);
139 ilukgraph.SetParameters(paramlist);
141 int levelfill = ilukgraph.LevelFill();
142 if (levelfill != 2) {
143 cerr <<
"SetParameters test failed to correctly set level_fill."
148 int leveloverlap = ilukgraph.LevelOverlap();
149 if (leveloverlap != 2) {
150 cerr <<
"SetParameters test failed to correctly set level_overlap."
155 crsriluk.SetParameters(paramlist);
157 double athresh = crsriluk.GetAbsoluteThreshold();
158 if (athresh != 44.0) {
159 cerr <<
"SetParameters test failed to correctly set absolute_threshold."
165 if (overlapmode !=
Add) {
166 cerr <<
"SetParameters test failed to correctly set overlapmode."
171 crsict.SetParameters(paramlist);
173 double rthresh = crsict.GetRelativeThreshold();
174 if (rthresh != 1.e-2) {
175 cerr <<
"SetParameters test failed to correctly set relative_threshold."
180 overlapmode = crsict.GetOverlapMode();
181 if (overlapmode !=
Add) {
182 cerr <<
"SetParameters test failed to correctly set overlapmode."
188 overlapgraph.SetParameters(paramlist);
190 int overlaplevel = overlapgraph.OverlapLevel();
191 if (overlaplevel != 2) {
192 cerr <<
"SetParameters test failed to correctly set overlaplevel."
198 if (verbose1==
true) {
199 cout <<
"********* Test passed **********" << endl;
int main(int argc, char *argv[])