https://mooseframework.inl.gov
FileMeshComponent.h
Go to the documentation of this file.
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 "GeometricalComponent.h"
13 
18 {
19 public:
21 
23 
29  bool hasBoundary(const BoundaryName & boundary_name) const;
30 
39  const std::vector<std::tuple<dof_id_type, unsigned short int>> &
40  getBoundaryInfo(const BoundaryName & boundary_name) const;
41 
42 protected:
43  virtual void setupMesh() override;
44 
49  std::vector<std::string> buildMesh();
50 
52  const FileName & _file_name;
54  const bool _file_is_readable;
55 
57  const Point & _position;
58 
60  std::vector<BoundaryName> _boundary_names;
61 
63  std::map<BoundaryName, std::vector<std::tuple<dof_id_type, unsigned short int>>> _boundary_info;
64 };
std::vector< BoundaryName > _boundary_names
Boundary names for this component.
bool hasBoundary(const BoundaryName &boundary_name) const
Returns true if this component has the supplied boundary.
Loads a mesh from an ExodusII file without adding physics.
const bool _file_is_readable
Is the file readable?
const Point & _position
Translation vector for the file mesh.
const FileName & _file_name
The name of the ExodusII file to load the mesh from.
FileMeshComponent(const InputParameters &parameters)
Intermediate class for components that have mesh.
std::map< BoundaryName, std::vector< std::tuple< dof_id_type, unsigned short int > > > _boundary_info
Map of boundary name to list of tuples of element and side IDs for that boundary. ...
const std::vector< std::tuple< dof_id_type, unsigned short int > > & getBoundaryInfo(const BoundaryName &boundary_name) const
Gets boundary info associated with the component boundary.
const InputParameters & parameters() const
virtual void setupMesh() override
Performs mesh setup such as creating mesh or naming mesh sets.
static InputParameters validParams()
std::vector< std::string > buildMesh()
Loads the ExodusII file into the global mesh and returns the subdomain names (before prepending compo...