https://mooseframework.inl.gov
ReadExodusMeshVars.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 #include "libmesh/fe_type.h"
12 #include "libmesh/replicated_mesh.h"
13 #include "libmesh/equation_systems.h"
14 #include "libmesh/exodusII_io.h"
15 #include "MooseTypes.h"
16 
17 namespace libMesh
18 {
19 class System;
20 class DofMap;
21 }
22 
31 {
32 public:
33  ReadExodusMeshVars(const libMesh::FEType & param_type,
34  const std::string & exodus_mesh,
35  const std::string var_name);
42  std::vector<Real> getParameterValues(const unsigned int timestep) const;
43 
44 private:
47  std::unique_ptr<libMesh::EquationSystems> _eq;
49  std::unique_ptr<libMesh::ExodusII_IO> _exodusII_io;
50 
52  const std::string _var_name;
53 };
std::vector< Real > getParameterValues(const unsigned int timestep) const
Initializes parameter data and sets bounds in the main optmiization application getParameterValues is...
libMesh::ReplicatedMesh _mesh
Utility function to read a single variable off an Exodus mesh for optimization problem This class wil...
ReadExodusMeshVars(const libMesh::FEType &param_type, const std::string &exodus_mesh, const std::string var_name)
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
const std::string _var_name
variable name read from Exodus mesh
libMesh::System * _sys
std::unique_ptr< libMesh::EquationSystems > _eq
std::unique_ptr< libMesh::ExodusII_IO > _exodusII_io
libMesh::Parallel::Communicator _communicator