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 "SurfaceMeshGeneratorBase.h" 13 : 14 : /** 15 : * This class will re-orient surface elements based on user-specified settings 16 : */ 17 : class OrientSurfaceMeshGenerator : public SurfaceMeshGeneratorBase 18 : { 19 : public: 20 : static InputParameters validParams(); 21 : 22 : OrientSurfaceMeshGenerator(const InputParameters & parameters); 23 : 24 : std::unique_ptr<MeshBase> generate() override; 25 : 26 : protected: 27 : // The flipping of normals is an option of the base class 28 40 : void actOnElem(Elem * const /*elem*/, 29 : const Point & /*normal*/, 30 : const subdomain_id_type & /*sub_id*/, 31 : MeshBase & /*mesh*/) override 32 : { 33 40 : _num_flipped++; 34 40 : } 35 : 36 : private: 37 : /// Keeps track of the number of element orientation flips, for output purposes 38 : unsigned int _num_flipped; 39 : };