www.mooseframework.org
BlockDeleter.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #include "BlockDeleter.h"
16 #include "MooseMesh.h"
17 
18 template <>
21 {
23  params.addClassDescription(
24  "Mesh modifier which removes elements with the specified subdomain ID");
25  params.addRequiredParam<SubdomainID>("block_id", "The block to be deleted");
26  return params;
27 }
28 
30  : ElementDeleterBase(parameters), _block_id(getParam<SubdomainID>("block_id"))
31 {
32 }
33 
34 bool
35 BlockDeleter::shouldDelete(const Elem * elem)
36 {
37  return elem->subdomain_id() == _block_id;
38 }
InputParameters validParams< BlockDeleter >()
Definition: BlockDeleter.C:20
subdomain_id_type SubdomainID
Definition: MooseTypes.h:77
const SubdomainID _block_id
Defines the block to be removed.
Definition: BlockDeleter.h:35
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
virtual bool shouldDelete(const Elem *elem) override
Method that returns a Boolean indicating whether an element should be removed from the mesh...
Definition: BlockDeleter.C:35
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
BlockDeleter(const InputParameters &parameters)
Definition: BlockDeleter.C:29
This class deletes elements from the mesh data structure after it has been generated or read but befo...
InputParameters validParams< ElementDeleterBase >()