MyraMath
preconditions


Source: tests/multifrontal/symbolic/preconditions.cpp

1 // ========================================================================= //
2 // This file is part of MyraMath, copyright (c) 2014-2019 by Ryan A Chilton //
3 // and distributed by MyraCore, LLC. See LICENSE.txt for license terms. //
4 // ========================================================================= //
5 
11 // Containers.
15 
16 // Algorithms.
18 #include <myramath/multifrontal/symbolic/detail/preconditions.h>
19 
20 // Reporting.
21 #include <tests/myratest.h>
22 
23 using namespace myra;
24 
25 ADD_TEST("preconditions","[symbolic]")
26  {
27  // Make a satisfactory Pattern, a 2D laplacian.
28  int I = 10;
29  int J = 10;
30  Natural2D N(I,J);
31  Pattern P0 = stencil2(I,J);
32  REQUIRE( preconditions(P0) );
33 
34  // .. make it asymmetric, preconditions should fail
35  PatternBuilder B2(P0);
36  B2.insert( N(8,3), N(5,6) );
37  Pattern P2 = B2.make_Pattern();
38  REQUIRE( !preconditions(P2) );
39 
40  }
41 
Convenience type for building Pattern&#39;s, uses coordinate/couplet format. Note that PatternBuilder may...
Definition: syntax.dox:1
Range/Iterator types associated with Pattern.
Holds the nonzero pattern of a sparse matrix.
Definition: Pattern.h:55
Like Pattern, but easier to populate via insert()/erase() methods.
Definition: PatternBuilder.h:51
Container class for a sparse nonzero pattern, used in reordering/symbolic analysis.
A helper class that generates a natural ordering on a 2D structured grid of size IxJ.
Definition: laplacian2.h:43
Helper routines for reordering/filling 2D structured grids. Used by many unit tests.


Results: [PASS]


Go back to Summary of /test programs.