version 3.11-dev
Loading...
Searching...
No Matches
pointsourcecontext.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3//
4// SPDX-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
13
14#ifndef DUMUX_MULTIDOMAIN_EMBEDDED_POINTSOURCECONTEXT_HH
15#define DUMUX_MULTIDOMAIN_EMBEDDED_POINTSOURCECONTEXT_HH
16
17#include <cstddef>
18#include <utility>
19
21
23
34template<class GlobalPosition>
36: public Experimental::PointSourceContext<GlobalPosition>
37{
39public:
40 using Scalar = typename GlobalPosition::value_type;
41
42 PointSourceContext() = default;
43
45 std::size_t elementIndex, std::size_t embeddings)
46 : ParentType(std::move(position), embeddings)
47 , id_(id), weight_(weight), elementIndex_(elementIndex)
48 {}
49
51 std::size_t id() const
52 { return id_; }
53
55 Scalar weight() const
56 { return weight_; }
57
59 std::size_t elementIndex() const
60 { return elementIndex_; }
61
62private:
63 std::size_t id_ = 0;
64 Scalar weight_ = 0.0;
65 std::size_t elementIndex_ = 0;
66};
67
68} // end namespace Dumux::EmbeddedCoupling
69
70#endif
Scalar weight() const
The quadrature weight times the integration element.
Definition pointsourcecontext.hh:55
std::size_t id() const
The identifier of the point source.
Definition pointsourcecontext.hh:51
typename GlobalPosition::value_type Scalar
Definition pointsourcecontext.hh:40
PointSourceContext(GlobalPosition position, std::size_t id, Scalar weight, std::size_t elementIndex, std::size_t embeddings)
Definition pointsourcecontext.hh:44
std::size_t elementIndex() const
The index of the element containing the point.
Definition pointsourcecontext.hh:59
Identifies a point source by its position in space. The embeddings value is set during map constructi...
Definition pointsources.hh:76
const GlobalPosition & position() const
Definition pointsources.hh:87
std::size_t embeddings() const
Definition pointsources.hh:90
GlobalPosition GlobalPosition
Definition pointsources.hh:78
Definition circlepoints.hh:24
Point source types and helpers for handling point sources.