LCOV - code coverage report
Current view: top level - src/actions - PartitionerAction.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 11 12 91.7 %
Date: 2025-07-17 01:28:37 Functions: 3 3 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             : // MOOSE includes
      11             : #include "PartitionerAction.h"
      12             : #include "MoosePartitioner.h"
      13             : #include "FEProblem.h"
      14             : #include "MooseEnum.h"
      15             : #include "MooseMesh.h"
      16             : 
      17             : registerMooseAction("MooseApp", PartitionerAction, "add_partitioner");
      18             : 
      19             : InputParameters
      20        1711 : PartitionerAction::validParams()
      21             : {
      22        1711 :   InputParameters params = MooseObjectAction::validParams();
      23        1711 :   params.addClassDescription("Add a Partitioner object to the simulation.");
      24        1711 :   return params;
      25           0 : }
      26             : 
      27        1507 : PartitionerAction::PartitionerAction(const InputParameters & params) : MooseObjectAction(params) {}
      28             : 
      29             : void
      30        1507 : PartitionerAction::act()
      31             : {
      32        1507 :   _mesh->setIsCustomPartitionerRequested(true);
      33        1507 :   _moose_object_pars.set<MooseMesh *>("mesh") = _mesh.get();
      34             :   std::shared_ptr<MoosePartitioner> mp =
      35        1507 :       _factory.create<MoosePartitioner>(_type, _name, _moose_object_pars);
      36        1496 :   _mesh->setCustomPartitioner(mp.get());
      37        1496 : }

Generated by: LCOV version 1.14