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{
31{
35 std::unordered_set<std::size_t> bulk_element_ids;
36
39 std::vector<std::size_t> inner_nodes;
43 std::vector<std::size_t> outer_nodes;
44
47 std::vector<std::vector<std::size_t>> outer_nodes_elements;
48};
49
50namespace detail
51{
52struct Ball
53{
54 Eigen::Vector3d center;
55 double radius;
56};
57} // namespace detail
58
79{
82 bool isInTimeSupportInterval(double const t) const;
83
91 bool isDeactivated(MeshLib::Element const& element,
92 double const time) const;
93
95
98 std::optional<std::pair<Eigen::Vector3d, Eigen::Vector3d>> line_segment;
99
101 // problems.
102 std::optional<detail::Ball> ball;
103
105
109
110 PROCESSLIB_EXPORT static const std::string zero_parameter_name;
111};
112} // namespace ProcessLib
#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
bool isInTimeSupportInterval(double const t) const
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