DOLFIN
DOLFIN C++ interface
SparsityPatternBuilder.h
1 // Copyright (C) 2007 Garth N. Wells
2 //
3 // This file is part of DOLFIN.
4 //
5 // DOLFIN is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // DOLFIN is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
17 //
18 // Modified by Ola Skavhaug 2007.
19 // Modified by Anders Logg 2008-2013
20 //
21 // First added: 2007-05-24
22 // Last changed: 2014-04-25
23 
24 #ifndef __SPARSITY_PATTERN_BUILDER_H
25 #define __SPARSITY_PATTERN_BUILDER_H
26 
27 #include <utility>
28 #include <vector>
29 #include "dolfin/common/types.h"
30 
31 namespace dolfin
32 {
33 
34  class GenericDofMap;
35  class Mesh;
36  class MultiMeshForm;
37  class SparsityPattern;
38 
41 
43  {
44  public:
45 
47  static void build(SparsityPattern& sparsity_pattern,
48  const Mesh& mesh,
49  const std::vector<const GenericDofMap*> dofmaps,
50  bool cells,
51  bool interior_facets,
52  bool exterior_facets,
53  bool vertices,
54  bool diagonal,
55  bool init=true,
56  bool finalize=true);
57 
59  static void
61  const MultiMeshForm& form);
62 
63  private:
64 
65  // Build sparsity pattern for interface part of multimesh form
66  static void _build_multimesh_sparsity_pattern_interface
67  (SparsityPattern& sparsity_pattern,
68  const MultiMeshForm& form,
69  std::size_t part);
70 
71  };
72 
73 }
74 
75 #endif
static void build(SparsityPattern &sparsity_pattern, const Mesh &mesh, const std::vector< const GenericDofMap *> dofmaps, bool cells, bool interior_facets, bool exterior_facets, bool vertices, bool diagonal, bool init=true, bool finalize=true)
Build sparsity pattern for assembly of given form.
Definition: SparsityPatternBuilder.cpp:43
Definition: SparsityPattern.h:45
Definition: adapt.h:29
static void build_multimesh_sparsity_pattern(SparsityPattern &sparsity_pattern, const MultiMeshForm &form)
Build sparsity pattern for assembly of given multimesh form.
Definition: SparsityPatternBuilder.cpp:271
Definition: SparsityPatternBuilder.h:42
void init(int argc, char *argv[])
Definition: init.cpp:27
Definition: Mesh.h:82
Definition: MultiMeshForm.h:40