DUNE PDELab (git)

subdomainbasis.hh
1
2#ifndef DUNE_PDELAB_BACKEND_ISTL_GENEO_SUBDOMAINBASIS_HH
3#define DUNE_PDELAB_BACKEND_ISTL_GENEO_SUBDOMAINBASIS_HH
4
5namespace Dune {
6 namespace PDELab {
11 template <class X>
13
14 public:
16
17 typedef X VectorType;
18
23 SubdomainBasis(X& basis_function) {
24 this->local_basis.resize(1);
25 this->local_basis[0] = std::make_shared<X>(basis_function);
26 }
27
31 std::shared_ptr<X> get_basis_vector(int i) {
32 return local_basis[i];
33 }
34
38 int basis_size() {
39 return local_basis.size();
40 }
41
42 protected:
43 std::vector<std::shared_ptr<X> > local_basis;
44
45 };
46 }
47}
48
49
50
51#endif //DUNE_PDELAB_BACKEND_ISTL_GENEO_SUBDOMAINBASIS_HH
This represents a general per-subdomain basis.
Definition: subdomainbasis.hh:12
int basis_size()
Size of the local basis.
Definition: subdomainbasis.hh:38
SubdomainBasis(X &basis_function)
Constructor creating a basis with only one basis function per subdomain.
Definition: subdomainbasis.hh:23
std::shared_ptr< X > get_basis_vector(int i)
Returns basis vector i.
Definition: subdomainbasis.hh:31
Dune namespace.
Definition: alignedallocator.hh:13
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 13, 23:29, 2024)