MyraMath
multifrontal_partialsolve_Left_Lower


Source: tests/multifrontal/detail/multifrontal_partialsolve_Left_Lower.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.
17 
18 // Algorithms.
21 
22 // JobGraph under test.
25 #include <myramath/multifrontal/detail/partialsolvel.h>
26 
27 // Reporting.
28 #include <tests/myratest.h>
29 
30 using namespace myra;
31 typedef multifrontal::Options Options;
32 
33 ADD_TEST("multifrontal_partialsolve_Left_Lower","[multifrontal][jobgraph]")
34  {
35  // Construct AssemblyTree of a 3D laplacian.
36  int I = 32;
37  int J = 32;
38  int K = 32;
39  int N = I*J*K;
40  Pattern A_pattern = stencil3(I,J,K);
41  Permutation perm = bisect3(I,J,K);
42  AssemblyTree atree(A_pattern,perm);
43  // Construct SchurTree for K=0 plane.
44  Natural3D n(I,J,K);
45  PatternBuilder B_builder(N,1);
46  for (int i = 0; i < I; ++i)
47  for (int j = 0; j < J; ++j)
48  B_builder.insert(n(i,j,0),0);
49  Pattern B_pattern = B_builder.make_Pattern();
50  SchurTree stree(atree,B_pattern,Options::create());
51  // Presume three right hand sides, blocksize 1.
52  std::vector<int> blocking(3,1);
53  std::vector<int> striding = cumsum(blocking);
54  // Verify the JobGraph.
55  typedef ::multifrontal::detail::partialsolvel::JobGraphBase1 Graph;
56  Graph graph(&stree,blocking,striding);
57  REQUIRE( verify(graph) );
58  // Save .dot file to disk?
59  graphviz(graph,"graph2.dot");
60  }
Options pack for routines in /multifrontal.
Definition: Options.h:24
Given a JobGraph G, verifies it has valid topology.
Represents a Permutation matrix, used to reorder rows/columns/etc of various numeric containers...
Definition: Permutation.h:34
Symbolic analysis data structure for all multifrontal solvers.
Definition: AssemblyTree.h:38
A helper class that generates a natural ordering on a 3D structured grid of size IxJxK.
Definition: laplacian3.h:28
std::vector< T > cumsum(const std::vector< T > &v)
Returns cumulative sum. For example, cumsum({4,8,9,13}) = {0,4,12,21,34}.
Definition: cumsum.h:19
Convenience type for building Pattern&#39;s, uses coordinate/couplet format. Note that PatternBuilder may...
Symbolic analysis data structure for multifrontal schur complement.
Definition: SchurTree.h:42
Definition: syntax.dox:1
Describes data layout and job dependencies for symmetric-pattern multifrontal solvers.
Helper routines for reordering/filling 3D structured grids. Used by many unit tests.
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.
Returns cumulative sum of a std::vector<T>. Reversible by diff()
Given a JobGraph, produces a .dot file for visualization with graphviz.
Tabulates data layout and dependencies for multifrontal schur complement.


Results: [PASS]


Go back to Summary of /test programs.