DUNE PDELab (2.8)

variablefactories.hh
1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=8 sw=2 sts=2:
3
4#ifndef DUNE_PDELAB_LOCALOPERATOR_VARIABLEFACTORIES_HH
5#define DUNE_PDELAB_LOCALOPERATOR_VARIABLEFACTORIES_HH
6
7#include <vector>
8
9namespace Dune {
10 namespace PDELab {
11
13 template<typename LFS>
14 std::vector<typename LFS::Traits::FiniteElementType::Traits::LocalBasisType::Traits::RangeType>
15 makeValueContainer (const LFS& lfs)
16 {
17 return std::vector<typename LFS::Traits::FiniteElementType::Traits::LocalBasisType::Traits::RangeType>(lfs.size());
18 }
19
21 template<typename LFS>
22 std::vector<typename LFS::Traits::FiniteElementType::Traits::LocalBasisType::Traits::JacobianType>
23 makeJacobianContainer (const LFS& lfs)
24 {
25 return std::vector<typename LFS::Traits::FiniteElementType::Traits::LocalBasisType::Traits::JacobianType>(lfs.size());
26 }
27
29 template<typename LFS>
30 typename LFS::Traits::FiniteElementType::Traits::LocalBasisType::Traits::RangeFieldType
31 makeZeroBasisFieldValue (const LFS& lfs)
32 {
33 typename LFS::Traits::FiniteElementType::Traits::LocalBasisType::Traits::RangeFieldType x(0.0);
34 return x;
35 }
36
38 template<typename LFS>
39 typename LFS::Traits::FiniteElementType::Traits::LocalBasisType::Traits::RangeType
40 makeZeroBasisValue (const LFS& lfs)
41 {
42 typename LFS::Traits::FiniteElementType::Traits::LocalBasisType::Traits::RangeType x(0.0);
43 return x;
44 }
45
47 template<typename LFS>
48 typename LFS::Traits::FiniteElementType::Traits::LocalBasisType::Traits::JacobianType
49 makeZeroJacobianValue (const LFS& lfs)
50 {
51 typename LFS::Traits::FiniteElementType::Traits::LocalBasisType::Traits::JacobianType x(0.0);
52 return x;
53 }
54 }
55}
56
57#endif // DUNE_PDELAB_LOCALOPERATOR_VARIABLEFACTORIES_HH
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)