OGS
DeactivatedSubdomain.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <Eigen/Core>
7#include <memory>
8#include <optional>
9#include <string>
10#include <unordered_set>
11#include <vector>
12
14#include "MeshLib/Mesh.h"
15#include "processlib_export.h"
16
17namespace MeshLib
18{
19class Element;
20} // namespace MeshLib
21
22namespace ParameterLib
23{
24template <typename T>
25struct Parameter;
26}
27
28namespace ProcessLib
29{
38 MathLib::PiecewiseLinearInterpolation const& deactivation_curve,
39 double const t);
40
42{
46 std::unordered_set<std::size_t> bulk_element_ids;
47
50 std::vector<std::size_t> inner_nodes;
54 std::vector<std::size_t> outer_nodes;
55
58 std::vector<std::vector<std::size_t>> outer_nodes_elements;
59};
60
61namespace detail
62{
63struct Ball
64{
65 Eigen::Vector3d center;
66 double radius;
67};
68} // namespace detail
90{
98 bool isDeactivated(MeshLib::Element const& element,
99 double const time) const;
100
102
105 std::optional<std::pair<Eigen::Vector3d, Eigen::Vector3d>> line_segment;
106
108 // problems.
109 std::optional<detail::Ball> ball;
110
112
116
117 PROCESSLIB_EXPORT static const std::string zero_parameter_name;
118};
119} // namespace ProcessLib
bool isTimeInSupportInterval(MathLib::PiecewiseLinearInterpolation const &deactivation_curve, double const t)
#define PROCESSLIB_EXPORT
std::vector< std::vector< std::size_t > > outer_nodes_elements
std::unordered_set< std::size_t > bulk_element_ids
bool isDeactivated(MeshLib::Element const &element, double const time) const
static PROCESSLIB_EXPORT const std::string zero_parameter_name
MathLib::PiecewiseLinearInterpolation time_interval
ParameterLib::Parameter< double > const * boundary_value_parameter
DeactivatedSubdomainMesh deactivated_subdomain_mesh
std::optional< detail::Ball > ball
The shape of the deactivated domain is a ball, which is a disk for 2D.
std::optional< std::pair< Eigen::Vector3d, Eigen::Vector3d > > line_segment