OGS
ProcessLib::DeactivatedSubdomain Struct Reference

Detailed Description

Time-dependent subdomain deactivation.

Subdomain deactivation is space and time-dependent. The spatial extent of deactivated elements is defined through an intersection between a half-space and a set of material ids. The half-space is defined by a line segment that separates through its normal plane and position on the line segment an active and an inactive part.

The subdomain can be deactivated at once using a time interval. For fine-grained control, a time curve can be specified. It maps the current time to the position given as distance (in length units) between the start and the end points on the line segment. Elements, which center points lie left of this position are deactivated.

The deactivated elements are excluded from the assembly, pre and post call, secondary variables computation and the like. To keep the size of the global linear equation system artificial Dirichlet boundary conditions are applied on the interior of the deactivated subdomain. The nodes on the border between the active and inactive elements are not affected.

Definition at line 79 of file DeactivatedSubdomain.h.

#include <DeactivatedSubdomain.h>

Collaboration diagram for ProcessLib::DeactivatedSubdomain:
[legend]

Public Member Functions

bool isInTimeSupportInterval (double const t) const
 
bool isDeactivated (MeshLib::Element const &element, double const time) const
 

Public Attributes

MathLib::PiecewiseLinearInterpolation time_interval
 
std::optional< std::pair< Eigen::Vector3d, Eigen::Vector3d > > line_segment
 
DeactivatedSubdomainMesh deactivated_subdomain_mesh
 
ParameterLib::Parameter< double > const * boundary_value_parameter
 

Static Public Attributes

static PROCESSLIB_EXPORT const std::string zero_parameter_name
 

Member Function Documentation

◆ isDeactivated()

bool ProcessLib::DeactivatedSubdomain::isDeactivated ( MeshLib::Element const & element,
double const time ) const
Returns
true if the element is in the deactivated part of the subdomain. If the line segment is available additionally the element's centre point is used to evaluate if the element is already, depending on time curve, active or inactive. For this the domain is split into two parts by a plane defined as a normal plane of the line segment and the position on the line segment, where the latter is defined by the time curve.

Definition at line 33 of file DeactivatedSubdomain.cpp.

35{
36 auto const& bulk_element_ids = deactivated_subdomain_mesh.bulk_element_ids;
37 if (!bulk_element_ids.contains(element.getID()))
38 {
39 return false;
40 }
41
42 if (!line_segment)
43 {
44 return true;
45 }
46
47 auto const& element_center = getCenterOfGravity(element);
48 // Line from a to b.
49 auto const& a = line_segment->first;
50 auto const& b = line_segment->second;
51 // Tangent vector t = (b - a)/|b - a|.
52 Eigen::Vector3d const t = (b - a).normalized();
53
54 // Position r on the line at given time.
55 auto const curve_position = time_interval.getValue(time);
56 Eigen::Vector3d const r = a + t * curve_position;
57
58 // Return true if p is "behind" the plane through r.
59 return (element_center.asEigenVector3d() - r).dot(t) <= 0;
60}
double getValue(double pnt_to_interpolate) const
Calculates the interpolation value.
MathLib::Point3d getCenterOfGravity(Element const &element)
Calculates the center of gravity for the mesh element.
Definition Element.cpp:124
std::unordered_set< std::size_t > bulk_element_ids
MathLib::PiecewiseLinearInterpolation time_interval
DeactivatedSubdomainMesh deactivated_subdomain_mesh
std::optional< std::pair< Eigen::Vector3d, Eigen::Vector3d > > line_segment

References ProcessLib::DeactivatedSubdomainMesh::bulk_element_ids, deactivated_subdomain_mesh, MeshLib::Element::getID(), MathLib::PiecewiseLinearInterpolation::getValue(), line_segment, and time_interval.

◆ isInTimeSupportInterval()

bool ProcessLib::DeactivatedSubdomain::isInTimeSupportInterval ( double const t) const
Returns
true if the given time is included in the subdomains time support interval.

Definition at line 27 of file DeactivatedSubdomain.cpp.

References MathLib::PiecewiseLinearInterpolation::getSupportMax(), MathLib::PiecewiseLinearInterpolation::getSupportMin(), and time_interval.

Member Data Documentation

◆ boundary_value_parameter

ParameterLib::Parameter<double> const* ProcessLib::DeactivatedSubdomain::boundary_value_parameter

A pararameter for the optional Dirichlet boundary condition applied on the surface of the deactivated subdomain/excavation.

Definition at line 105 of file DeactivatedSubdomain.h.

◆ deactivated_subdomain_mesh

DeactivatedSubdomainMesh ProcessLib::DeactivatedSubdomain::deactivated_subdomain_mesh

Definition at line 101 of file DeactivatedSubdomain.h.

Referenced by isDeactivated().

◆ line_segment

std::optional<std::pair<Eigen::Vector3d, Eigen::Vector3d> > ProcessLib::DeactivatedSubdomain::line_segment

Line segment along which excavation progresses. Represented by start and end points.

Definition at line 99 of file DeactivatedSubdomain.h.

Referenced by isDeactivated().

◆ time_interval

MathLib::PiecewiseLinearInterpolation ProcessLib::DeactivatedSubdomain::time_interval

Definition at line 95 of file DeactivatedSubdomain.h.

Referenced by isDeactivated(), and isInTimeSupportInterval().

◆ zero_parameter_name

const std::string ProcessLib::DeactivatedSubdomain::zero_parameter_name
static
Initial value:
=
"zero_for_element_deactivation_approach"

Definition at line 107 of file DeactivatedSubdomain.h.

Referenced by ProcessLib::ProcessVariable::createBoundaryConditionsForDeactivatedSubDomains(), and ProjectData::parseParameters().


The documentation for this struct was generated from the following files: