LCOV - code coverage report
Current view: top level - src/utils - MeshAlignment2D2D.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 19 19 100.0 %
Date: 2025-07-30 13:02:48 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          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             : #include "MeshAlignment2D2D.h"
      11             : 
      12          58 : MeshAlignment2D2D::MeshAlignment2D2D(const MooseMesh & mesh) : MeshAlignmentOneToMany(mesh) {}
      13             : 
      14             : void
      15          58 : MeshAlignment2D2D::initialize(
      16             :     const std::vector<std::vector<std::tuple<dof_id_type, unsigned short int>>> & boundary_infos,
      17             :     const Point & axis_point,
      18             :     const RealVectorValue & axis_direction)
      19             : {
      20             :   const auto n_boundaries = boundary_infos.size();
      21          58 :   if (n_boundaries > 1)
      22             :   {
      23          58 :     extractFromBoundaryInfo(boundary_infos[0],
      24          58 :                             _primary_elem_ids,
      25          58 :                             _primary_side_ids,
      26          58 :                             _primary_elem_points,
      27          58 :                             _primary_node_ids,
      28          58 :                             _primary_node_points);
      29             : 
      30         152 :     for (unsigned int i = 1; i < n_boundaries; ++i)
      31             :     {
      32             :       std::vector<dof_id_type> elem_ids;
      33             :       std::vector<unsigned short int> side_ids;
      34             :       std::vector<dof_id_type> node_ids;
      35             :       std::vector<Point> elem_points;
      36             :       std::vector<Point> node_points;
      37          94 :       extractFromBoundaryInfo(
      38             :           boundary_infos[i], elem_ids, side_ids, elem_points, node_ids, node_points);
      39          94 :       _secondary_elem_ids.insert(_secondary_elem_ids.end(), elem_ids.begin(), elem_ids.end());
      40          94 :       _secondary_side_ids.insert(_secondary_side_ids.end(), side_ids.begin(), side_ids.end());
      41          94 :       _secondary_node_ids.insert(_secondary_node_ids.end(), node_ids.begin(), node_ids.end());
      42          94 :       _secondary_elem_points.insert(
      43             :           _secondary_elem_points.end(), elem_points.begin(), elem_points.end());
      44          94 :       _secondary_node_points.insert(
      45             :           _secondary_node_points.end(), node_points.begin(), node_points.end());
      46             :     }
      47             : 
      48          58 :     buildMapping();
      49          58 :     checkAlignment(axis_point, axis_direction);
      50             :   }
      51          58 : }

Generated by: LCOV version 1.14