www.mooseframework.org
GeometryBase.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "GeneralUserObject.h"
13 
19 {
20 public:
22 
24 
25  virtual void initialize() final;
26  virtual void execute() final;
27  virtual void finalize() final;
28 
29  virtual void meshChanged() final;
30 
31 protected:
37  virtual void snapNode(Node & node) = 0;
38 
41 
43  const std::vector<BoundaryID> _boundary_ids;
44 
46  const std::vector<SubdomainID> _subdomain_ids;
47 };
GeometryBase(const InputParameters &parameters)
Definition: GeometryBase.C:27
virtual void initialize() final
Called before execute() is ever called so that data can be cleared.
Definition: GeometryBase.C:36
virtual void execute() final
Execute method.
Definition: GeometryBase.C:41
const std::vector< BoundaryID > _boundary_ids
List of boundaries (or node sets) that will be snapped to a geometry.
Definition: GeometryBase.h:43
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
static InputParameters validParams()
Definition: GeometryBase.C:15
const std::vector< SubdomainID > _subdomain_ids
List of blocks (likely lower D blocks) that will be snapped to a geometry.
Definition: GeometryBase.h:46
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
virtual void finalize() final
Finalize.
Definition: GeometryBase.C:46
virtual void meshChanged() final
Called on this object when the mesh changes.
Definition: GeometryBase.C:51
MooseMesh & _mesh
Reference to the current simulation mesh.
Definition: GeometryBase.h:40
const InputParameters & parameters() const
Get the parameters of the object.
Base class for userobjects that snap nodes to a defined geometry when adaptivity happens.
Definition: GeometryBase.h:18
virtual void snapNode(Node &node)=0
Override this method in derived classes to implement a specific geometry.