DUNE PDELab (2.8)

pattern.hh
1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=8 sw=2 sts=2:
3#ifndef DUNE_PDELAB_LOCALOPERATOR_PATTERN_HH
4#define DUNE_PDELAB_LOCALOPERATOR_PATTERN_HH
5
8
9namespace Dune {
10 namespace PDELab {
11
14 {
15 public:
16
17 // define sparsity pattern of operator representation
18 template<typename LFSU, typename LFSV, typename LocalPattern>
19 void pattern_volume (const LFSU& lfsu, const LFSV& lfsv,
20 LocalPattern& pattern) const
21 {
22 for (size_t i=0; i<lfsv.size(); ++i)
23 for (size_t j=0; j<lfsu.size(); ++j)
24 pattern.addLink(lfsv,i,lfsu,j);
25 }
26 };
27
30 {
31 public:
32
33 // define sparsity pattern connecting self and neighbor dofs
34 template<typename LFSU, typename LFSV, typename LocalPattern>
35 void pattern_skeleton (const LFSU& lfsu_s, const LFSV& lfsv_s, const LFSU& lfsu_n, const LFSV& lfsv_n,
36 LocalPattern& pattern_sn,
37 LocalPattern& pattern_ns) const
38 {
39 for (unsigned int i=0; i<lfsv_s.size(); ++i)
40 for (unsigned int j=0; j<lfsu_n.size(); ++j)
41 pattern_sn.addLink(lfsv_s,i,lfsu_n,j);
42
43 for (unsigned int i=0; i<lfsv_n.size(); ++i)
44 for (unsigned int j=0; j<lfsu_s.size(); ++j)
45 pattern_ns.addLink(lfsv_n,i,lfsu_s,j);
46 }
47 };
48
51 {
52 public:
53
54 // define sparsity pattern connecting dofs on boundary elements
55 template<typename LFSU, typename LFSV, typename LocalPattern>
56 void pattern_boundary(const LFSU& lfsu_s, const LFSV& lfsv_s,
57 LocalPattern& pattern_ss) const
58 {
59 for (unsigned int i=0; i<lfsv_s.size(); ++i)
60 for (unsigned int j=0; j<lfsu_s.size(); ++j)
61 pattern_ss.addLink(lfsv_s,i,lfsu_s,j);
62 }
63 };
64
66 } // namespace PDELab
67} // namespace Dune
68
69#endif // DUNE_PDELAB_LOCALOPERATOR_PATTERN_HH
sparsity pattern generator
Definition: pattern.hh:51
sparsity pattern generator
Definition: pattern.hh:30
sparsity pattern generator
Definition: pattern.hh:14
A few common exception classes.
Implements a vector constructed from a given type representing a field and a compile-time given size.
Dune namespace.
Definition: alignedallocator.hh:11
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 22, 23:30, 2024)