Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #pragma once 11 : 12 : #include "MooseEnum.h" 13 : 14 : // Forward declarations 15 : namespace libMesh 16 : { 17 : class Elem; 18 : } 19 : 20 : // libMesh includes 21 : #include "libmesh/libmesh_common.h" // not possible to forward declare typedef Real. 22 : 23 : // C++ includes 24 : #include <utility> 25 : 26 : // Using statements 27 : using libMesh::Elem; 28 : using libMesh::Real; 29 : 30 : enum class MortarSegmentTriangulationMode : unsigned char 31 : { 32 : Delaunay, 33 : Centroid, 34 : EarClipping, 35 : Vertex 36 : }; 37 : 38 585740 : CreateMooseEnumClass(Mortar3DQuadraturePointMapping, 39 : NORMAL_PROJECTION = 0, 40 : REFERENCE_INTERPOLATION = 1); 41 : 42 : /** 43 : * Holds xi^(1), xi^(2), and other data for a given mortar segment. 44 : */ 45 : struct MortarSegmentInfo 46 : { 47 : /** 48 : * Constructor. The invalid_xi value means that the values have 49 : * not been set. Valid values are in [-1,1]. xi1 values should 50 : * always be valid for any segment, but one or both xi2 values 51 : * can be uninitialized when the surfaces are not in contact. 52 : */ 53 : MortarSegmentInfo(); 54 : 55 : /** 56 : * Construct a MortarSegmentInfo object with the given xi values. 57 : */ 58 : MortarSegmentInfo(Real x1a, Real x1b, Real x2a, Real x2b); 59 : 60 : // MortarSegmentInfo(const MortarSegmentInfo &) = default; 61 : 62 : /** 63 : * Prints xi values and secondary/primary Elem ids. 64 : */ 65 : void print() const; 66 : 67 : /** 68 : * Returns true if the current segment is valid, false 69 : * otherwise. The segment can be "invalid" for a host of different 70 : * reasons, see the list below. 71 : */ 72 : bool isValid() const; 73 : 74 : Real xi1_a, xi1_b; 75 : Real xi2_a, xi2_b; 76 : const Elem * secondary_elem; 77 : const Elem * primary_elem; 78 : 79 : // A magic number to let us determine when xi values have not been 80 : // initialized yet. 81 : static const Real invalid_xi; 82 : };