www.mooseframework.org
FileMesh.h
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 #ifndef FILEMESH_H
16 #define FILEMESH_H
17 
18 #include "MooseMesh.h"
19 
20 // forward declaration
21 class FileMesh;
22 
23 template <>
25 
26 class FileMesh : public MooseMesh
27 {
28 public:
30  FileMesh(const FileMesh & other_mesh);
31  virtual ~FileMesh(); // empty dtor required for unique_ptr with forward declarations
32 
33  virtual MooseMesh & clone() const override;
34 
35  virtual void buildMesh() override;
36 
37  void read(const std::string & file_name);
38  virtual ExodusII_IO * exReader() const override { return _exreader.get(); }
39 
40  // Get/Set Filename (for meshes read from a file)
41  void setFileName(const std::string & file_name) { _file_name = file_name; }
42  const std::string & getFileName() const { return _file_name; }
43 
44 protected:
46  std::string _file_name;
48  std::unique_ptr<ExodusII_IO> _exreader;
49 };
50 
51 #endif // FILEMESH_H
virtual void buildMesh() override
Must be overridden by child classes.
Definition: FileMesh.C:55
std::string _file_name
the file_name from whence this mesh came
Definition: FileMesh.h:46
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual ~FileMesh()
Definition: FileMesh.C:46
virtual ExodusII_IO * exReader() const override
Not implemented – always returns NULL.
Definition: FileMesh.h:38
void setFileName(const std::string &file_name)
Definition: FileMesh.h:41
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
FileMesh(const InputParameters &parameters)
Definition: FileMesh.C:35
InputParameters validParams< FileMesh >()
Definition: FileMesh.C:27
void read(const std::string &file_name)
Definition: FileMesh.C:141
virtual MooseMesh & clone() const override
Clone method.
Definition: FileMesh.C:49
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
std::unique_ptr< ExodusII_IO > _exreader
Auxiliary object for restart.
Definition: FileMesh.h:48
const std::string & getFileName() const
Definition: FileMesh.h:42