DOLFIN
DOLFIN C++ interface
Loading...
Searching...
No Matches
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// Modified by Cecile Daversin-Catty 2018
21//
22// First added: 2007-05-24
23// Last changed: 2018-08-24
24
25#ifndef __SPARSITY_PATTERN_BUILDER_H
26#define __SPARSITY_PATTERN_BUILDER_H
27
28#include <utility>
29#include <vector>
30#include "dolfin/common/types.h"
31
32namespace dolfin
33{
34
35 class GenericDofMap;
36 class Mesh;
37 class MultiMeshForm;
38 class SparsityPattern;
39
42
44 {
45 public:
46
48 static void build(SparsityPattern& sparsity_pattern,
49 const Mesh& mesh,
50 const std::vector<const GenericDofMap*> dofmaps,
51 bool cells,
52 bool interior_facets,
53 bool exterior_facets,
54 bool vertices,
55 bool diagonal,
56 bool init=true,
57 bool finalize=true);
58
64 static void build_mixed(SparsityPattern& sparsity_pattern,
65 const Mesh& mesh,
66 std::vector<std::size_t> mesh_ids,
67 const std::vector<const GenericDofMap*> dofmaps,
68 bool cells,
69 bool interior_facets,
70 bool exterior_facets,
71 bool vertices,
72 bool diagonal,
73 bool init=true,
74 bool finalize=true);
75
77 static void
79 const MultiMeshForm& form);
80
81 private:
82
83 // Build sparsity pattern for interface part of multimesh form
84 static void _build_multimesh_sparsity_pattern_interface
85 (SparsityPattern& sparsity_pattern,
86 const MultiMeshForm& form,
87 std::size_t part);
88
89 };
90
91}
92
93#endif
Definition Mesh.h:84
Definition MultiMeshForm.h:41
Definition SparsityPatternBuilder.h:44
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:44
static void build_mixed(SparsityPattern &sparsity_pattern, const Mesh &mesh, std::vector< std::size_t > mesh_ids, const std::vector< const GenericDofMap * > dofmaps, bool cells, bool interior_facets, bool exterior_facets, bool vertices, bool diagonal, bool init=true, bool finalize=true)
Definition SparsityPatternBuilder.cpp:64
static void build_multimesh_sparsity_pattern(SparsityPattern &sparsity_pattern, const MultiMeshForm &form)
Build sparsity pattern for assembly of given multimesh form.
Definition SparsityPatternBuilder.cpp:339
Definition SparsityPattern.h:46
Definition adapt.h:30
void init(int argc, char *argv[])
Definition init.cpp:27