https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Attributes | List of all members
OutputDataWarehouse Class Reference

A helper warehouse for storing OutputData objects for the various output types. More...

#include <AdvancedOutputUtils.h>

Inheritance diagram for OutputDataWarehouse:
[legend]

Public Member Functions

 OutputDataWarehouse ()
 Populate the OutputData structures for all output types that are 'variable' based.
 
bool hasShowList ()
 False when the show lists for all variables is empty.
 
void setHasShowList (bool value)
 Set the show list bool.
 
void reset ()
 Clear existing lists for re-initialization.
 
OutputDataoperator[] (const std::string &name)
 A map accessor that errors if the key is not found.
 
bool contains (const std::string &name) const
 A method for testing of a key exists.
 
std::map< std::string, OutputData >::iterator begin ()
 Provide iterator and find access to the underlying map data.
 
std::map< std::string, OutputData >::const_iterator begin () const
 
std::map< std::string, OutputData >::iterator end ()
 
std::map< std::string, OutputData >::const_iterator end () const
 
std::map< std::string, OutputData >::iterator find (const std::string &name)
 
const std::map< std::string, OutputData >::const_iterator find (const std::string &name) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Attributes

std::map< std::string, OutputData_map
 Data storage.
 

Private Attributes

bool _has_show_list
 

Detailed Description

A helper warehouse for storing OutputData objects for the various output types.

To keep syntax consistent and to provide the error checking for accessing invalid map keys the OutputMapWrapper is used for accessing the OutputData classes as well.

See also
OutputOnWarehouse OutputMapWrapper OutputData

Definition at line 146 of file AdvancedOutputUtils.h.

Constructor & Destructor Documentation

◆ OutputDataWarehouse()

OutputDataWarehouse::OutputDataWarehouse ( )

Populate the OutputData structures for all output types that are 'variable' based.

Definition at line 61 of file AdvancedOutputUtils.C.

62{
63 _map["nodal"] = OutputData();
64 _map["elemental"] = OutputData();
65 _map["scalars"] = OutputData();
66 _map["postprocessors"] = OutputData();
67 _map["vector_postprocessors"] = OutputData();
68 _map["reporters"] = OutputData();
69}
In newer versions of Clang calling operator[] on a map with a component that has a default constructo...
std::map< std::string, OutputData > _map
Data storage.
A structure for storing the various lists that contain the names of the items to be exported.

Member Function Documentation

◆ begin() [1/2]

std::map< std::string, OutputData >::iterator OutputMapWrapper< OutputData >::begin ( )
inlineinherited

Provide iterator and find access to the underlying map data.

Definition at line 84 of file AdvancedOutputUtils.h.

84{ return _map.begin(); }

◆ begin() [2/2]

std::map< std::string, OutputData >::const_iterator OutputMapWrapper< OutputData >::begin ( ) const
inlineinherited

Definition at line 90 of file AdvancedOutputUtils.h.

90{ return _map.begin(); }

◆ contains()

bool OutputMapWrapper< OutputData >::contains ( const std::string &  name) const
inlineinherited

A method for testing of a key exists.

Definition at line 101 of file AdvancedOutputUtils.h.

101{ return find(name) != end(); }
std::map< std::string, OutputData >::iterator end()
std::map< std::string, OutputData >::iterator find(const std::string &name)

◆ end() [1/2]

std::map< std::string, OutputData >::iterator OutputMapWrapper< OutputData >::end ( )
inlineinherited

Definition at line 85 of file AdvancedOutputUtils.h.

85{ return _map.end(); }

◆ end() [2/2]

std::map< std::string, OutputData >::const_iterator OutputMapWrapper< OutputData >::end ( ) const
inlineinherited

Definition at line 91 of file AdvancedOutputUtils.h.

91{ return _map.end(); }

◆ find() [1/2]

std::map< std::string, OutputData >::iterator OutputMapWrapper< OutputData >::find ( const std::string &  name)
inlineinherited

Definition at line 86 of file AdvancedOutputUtils.h.

87 {
88 return _map.find(name);
89 }

◆ find() [2/2]

const std::map< std::string, OutputData >::const_iterator OutputMapWrapper< OutputData >::find ( const std::string &  name) const
inlineinherited

Definition at line 92 of file AdvancedOutputUtils.h.

93 {
94 return _map.find(name);
95 }

◆ hasShowList()

bool OutputDataWarehouse::hasShowList ( )
inline

False when the show lists for all variables is empty.

When false everything should output.

See also
AdvancedOutput::initOutputList

Definition at line 162 of file AdvancedOutputUtils.h.

162{ return _has_show_list; }

Referenced by AdvancedOutput::initOutputList().

◆ operator[]()

OutputData & OutputMapWrapper< OutputData >::operator[] ( const std::string &  name)
inlineinherited

A map accessor that errors if the key is not found.

Definition at line 71 of file AdvancedOutputUtils.h.

72 {
73 // Locate the map entry, error if it is not found
74 typename std::map<std::string, T>::iterator iter = _map.find(name);
75 if (iter == _map.end())
76 mooseError("Unknown map key ", name);
77 return iter->second;
78 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311

◆ reset()

void OutputDataWarehouse::reset ( )

Clear existing lists for re-initialization.

Definition at line 72 of file AdvancedOutputUtils.C.

73{
74 for (auto map_pair : _map)
75 map_pair.second.reset();
76}
void reset()
Clear existing lists for re-initialization.

Referenced by AdvancedOutput::init().

◆ setHasShowList()

void OutputDataWarehouse::setHasShowList ( bool  value)
inline

Set the show list bool.

This is set to true when the user supplies a show list.

See also
AdvancedOutput::initShowHideLists

Definition at line 170 of file AdvancedOutputUtils.h.

Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

Referenced by AdvancedOutput::initShowHideLists().

◆ validParams()

static InputParameters OutputDataWarehouse::validParams ( )
static

Member Data Documentation

◆ _has_show_list

bool OutputDataWarehouse::_has_show_list
private

Definition at line 179 of file AdvancedOutputUtils.h.

Referenced by hasShowList(), and setHasShowList().

◆ _map

std::map<std::string, OutputData > OutputMapWrapper< OutputData >::_map
protectedinherited

Data storage.

Definition at line 105 of file AdvancedOutputUtils.h.


The documentation for this class was generated from the following files: