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 : // MOOSE includes 13 : #include "MoosePartitioner.h" 14 : 15 : /** 16 : * Partitions a mesh based on the partitioning of the other mesh 17 : */ 18 : class CopyMeshPartitioner : public MoosePartitioner 19 : { 20 : public: 21 : CopyMeshPartitioner(const InputParameters & params); 22 168 : virtual ~CopyMeshPartitioner() {} 23 : 24 : static InputParameters validParams(); 25 : 26 : virtual std::unique_ptr<Partitioner> clone() const override; 27 : 28 : protected: 29 : virtual void _do_partition(MeshBase & mesh, const unsigned int n) override; 30 : 31 : /// A pointer to the mesh to copy the partitioning from 32 : const MooseMesh * _base_mesh; 33 : };