65int main(
int argc,
char* argv[]) {
67 bool verbose1 =
false;
74 MPI_Init(&argc, &argv);
83 Teuchos::ParameterList paramlist;
84 paramlist.set(
"absolute_threshold", 44.0);
85 paramlist.set(
"level_fill", 2);
86 paramlist.set(
"LEVEL_OVERLAP", 2);
87 paramlist.set(
"relative_threshold", 1.e-2);
88 paramlist.set(
"fill_tolerance", 2.0);
89 paramlist.set(
"use_reciprocal",
false);
90 paramlist.set(
"level_overlap", 2);
91 paramlist.set(
"overlap_mode",
Add);
95 if (params.double_params[Ifpack::absolute_threshold] != 44.0) {
97 cerr <<
"SetParameters test failed to correctly set absolute_threshold."<<endl;
103 int my_pid = Comm.
MyPID();
104 int num_procs = Comm.
NumProc();
105 int global_n = num_procs*local_n;
109 int first_global_row = my_pid*local_n;
111 for(i=0; i<local_n; ++i) {
112 int row = first_global_row + i;
113 graph.InsertGlobalIndices(row, 1, &row);
116 graph.FillComplete();
127 for(i=0; i<local_n; ++i) {
128 int row = first_global_row + i;
133 Ifpack_CrsIct crsict(A, 1.0, 1);
135 ilukgraph.SetParameters(paramlist);
137 int levelfill = ilukgraph.LevelFill();
138 if (levelfill != 2) {
139 cerr <<
"SetParameters test failed to correctly set level_fill."
144 int leveloverlap = ilukgraph.LevelOverlap();
145 if (leveloverlap != 2) {
146 cerr <<
"SetParameters test failed to correctly set level_overlap."
151 crsriluk.SetParameters(paramlist);
153 double athresh = crsriluk.GetAbsoluteThreshold();
154 if (athresh != 44.0) {
155 cerr <<
"SetParameters test failed to correctly set absolute_threshold."
161 if (overlapmode !=
Add) {
162 cerr <<
"SetParameters test failed to correctly set overlapmode."
167 crsict.SetParameters(paramlist);
169 double rthresh = crsict.GetRelativeThreshold();
170 if (rthresh != 1.e-2) {
171 cerr <<
"SetParameters test failed to correctly set relative_threshold."
176 overlapmode = crsict.GetOverlapMode();
177 if (overlapmode !=
Add) {
178 cerr <<
"SetParameters test failed to correctly set overlapmode."
184 overlapgraph.SetParameters(paramlist);
186 int overlaplevel = overlapgraph.OverlapLevel();
187 if (overlaplevel != 2) {
188 cerr <<
"SetParameters test failed to correctly set overlaplevel."
194 if (verbose1==
true) {
195 cout <<
"********* Test passed **********" << endl;
int main(int argc, char *argv[])