Go to the documentation of this file.
19 #ifndef LIBMESH_SPARSITY_PATTERN_H
20 #define LIBMESH_SPARSITY_PATTERN_H
23 #include "libmesh/elem_range.h"
24 #include "libmesh/threads_allocators.h"
25 #include "libmesh/parallel_object.h"
29 #include <unordered_set>
49 namespace SparsityPattern
51 typedef std::vector<dof_id_type, Threads::scalable_allocator<dof_id_type>>
Row;
52 class Graph :
public std::vector<Row> {};
65 template<
typename B
idirectionalIterator>
66 static void sort_row (
const BidirectionalIterator begin,
67 BidirectionalIterator middle,
68 const BidirectionalIterator
end);
102 void handle_vi_vj(
const std::vector<dof_id_type> & element_dofs_i,
103 const std::vector<dof_id_type> & element_dofs_j);
106 std::vector<dof_id_type> & dofs_vi,
118 const DofMap & dof_map_in,
120 const std::set<GhostingFunctor *> & coupling_functors_in,
121 const bool implicit_neighbor_dofs_in,
122 const bool need_full_sparsity_pattern_in);
133 #if defined(__GNUC__) && (__GNUC__ < 4) && !defined(__INTEL_COMPILER)
148 template<
typename B
idirectionalIterator>
151 BidirectionalIterator middle,
152 const BidirectionalIterator
end)
154 if ((begin == middle) || (middle ==
end))
return;
161 while (middle !=
end)
163 BidirectionalIterator
172 #if defined(__GNUC__) && (__GNUC__ < 4) && !defined(__INTEL_COMPILER)
178 if (a == begin)
break;
193 BidirectionalIterator
197 for (++first; first !=
end;
prev=first, ++first)
209 #endif // LIBMESH_SPARSITY_PATTERN_H
std::vector< dof_id_type, Threads::scalable_allocator< dof_id_type > > Row
void sorted_connected_dofs(const Elem *elem, std::vector< dof_id_type > &dofs_vi, unsigned int vi)
void _dummy_function(void)
Dummy function that does nothing but can be used to prohibit compiler optimization in some situations...
void handle_vi_vj(const std::vector< dof_id_type > &element_dofs_i, const std::vector< dof_id_type > &element_dofs_j)
SparsityPattern::NonlocalGraph nonlocal_pattern
The libMesh namespace provides an interface to certain functionality in the library.
IterBase * end
Also have a polymorphic pointer to the end object, this prevents iterating past the end.
Dummy "splitting object" used to distinguish splitting constructors from copy constructors.
std::unordered_set< dof_id_type > hashed_dof_sets
SparsityPattern::Graph sparsity_pattern
static void sort_row(const BidirectionalIterator begin, BidirectionalIterator middle, const BidirectionalIterator end)
Splices the two sorted ranges [begin,middle) and [middle,end) into one sorted range [begin,...
std::vector< dof_id_type > n_oz
This helper class can be called on multiple threads to compute the sparsity pattern (or graph) of the...
This is the MeshBase class.
const CouplingMatrix * dof_coupling
const std::set< GhostingFunctor * > & coupling_functors
void operator()(const ConstElemRange &range)
const bool need_full_sparsity_pattern
Real distance(const Point &p)
void swap(Iterator &lhs, Iterator &rhs)
swap, used to implement op=
std::vector< dof_id_type > n_nz
This class handles the numbering of degrees of freedom on a mesh.
Build(const MeshBase &mesh_in, const DofMap &dof_map_in, const CouplingMatrix *dof_coupling_in, const std::set< GhostingFunctor * > &coupling_functors_in, const bool implicit_neighbor_dofs_in, const bool need_full_sparsity_pattern_in)
The StoredRange class defines a contiguous, divisible set of objects.
This is the base class from which all geometric element types are derived.
This class defines a coupling matrix.
void join(const Build &other)
An object whose state is distributed along a set of processors.
const bool implicit_neighbor_dofs