#include <qoi_factory.h>
Definition at line 39 of file qoi_factory.h.
 
      
        
          | GRINS::QoIFactory::QoIFactory  | 
          ( | 
           | ) | 
           | 
        
      
 
 
  
  
      
        
          | GRINS::QoIFactory::~QoIFactory  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
 
  
  
      
        
          | void GRINS::QoIFactory::add_qoi  | 
          ( | 
          const GetPot &  | 
          input,  | 
         
        
           | 
           | 
          const std::string &  | 
          qoi_name,  | 
         
        
           | 
           | 
          SharedPtr< CompositeQoI > &  | 
          qois  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protectedvirtual   | 
  
 
 
  
  
      
        
          | SharedPtr< CompositeQoI > GRINS::QoIFactory::build  | 
          ( | 
          const GetPot &  | 
          input | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
Definition at line 50 of file qoi_factory.C.
References add_qoi(), check_qoi_physics_consistency(), echo_qoi_list(), and GRINS::StringUtilities::split_string().
   52     std::string qoi_list = input(
"QoI/enabled_qois", 
"none" );
 
   54     std::vector<std::string> qoi_names;
 
   56     if( qoi_list != std::string(
"none") )
 
   61     SharedPtr<CompositeQoI> qois( 
new CompositeQoI );
 
   63     if( !qoi_names.empty() )
 
   65         for( std::vector<std::string>::const_iterator name = qoi_names.begin();
 
   66              name != qoi_names.end(); ++name )
 
   68             this->
add_qoi( input, *name, qois );
 
   73         if( input( 
"screen-options/echo_qoi", 
false ) )
 
virtual void check_qoi_physics_consistency(const GetPot &input, const std::string &qoi_name)
 
void split_string(const std::string &input, const std::string &delimiter, std::vector< std::string > &results)
 
virtual void echo_qoi_list(SharedPtr< CompositeQoI > &qois)
 
virtual void add_qoi(const GetPot &input, const std::string &qoi_name, SharedPtr< CompositeQoI > &qois)
 
 
 
 
  
  
      
        
          | void GRINS::QoIFactory::check_qoi_physics_consistency  | 
          ( | 
          const GetPot &  | 
          input,  | 
         
        
           | 
           | 
          const std::string &  | 
          qoi_name  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protectedvirtual   | 
  
 
Definition at line 124 of file qoi_factory.C.
References GRINS::avg_nusselt, consistency_helper(), GRINS::PhysicsNaming::heat_transfer(), and GRINS::PhysicsNaming::low_mach_navier_stokes().
Referenced by build().
  127     int num_physics =  input.vector_variable_size(
"Physics/enabled_physics");
 
  130     libmesh_assert(num_physics > 0);
 
  132     std::set<std::string> requested_physics;
 
  133     std::set<std::string> required_physics;
 
  136     for( 
int i = 0; i < num_physics; i++ )
 
  138         requested_physics.insert( input(
"Physics/enabled_physics", 
"NULL", i ) );
 
static PhysicsName heat_transfer()
 
static PhysicsName low_mach_navier_stokes()
 
const std::string avg_nusselt
 
void consistency_helper(const std::set< std::string > &requested_physics, const std::set< std::string > &required_physics, const std::string &qoi_name)
 
 
 
 
  
  
      
        
          | void GRINS::QoIFactory::consistency_error_msg  | 
          ( | 
          const std::string &  | 
          qoi_name,  | 
         
        
           | 
           | 
          const std::set< std::string > &  | 
          required_physics  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
Definition at line 188 of file qoi_factory.C.
Referenced by consistency_helper().
  191     libMesh::err << 
"================================================================" << std::endl
 
  192                  << 
"QoI " << qoi_name << std::endl
 
  193                  << 
"requires one of the following physics which were not found:" <<std::endl;
 
  195     for( std::set<std::string>::const_iterator name = required_physics.begin();
 
  196          name != required_physics.end();
 
  199         libMesh::err << *name << std::endl;
 
  202     libMesh::err << 
"================================================================" << std::endl;
 
 
 
 
  
  
      
        
          | void GRINS::QoIFactory::consistency_helper  | 
          ( | 
          const std::set< std::string > &  | 
          requested_physics,  | 
         
        
           | 
           | 
          const std::set< std::string > &  | 
          required_physics,  | 
         
        
           | 
           | 
          const std::string &  | 
          qoi_name  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
Definition at line 169 of file qoi_factory.C.
References consistency_error_msg().
Referenced by check_qoi_physics_consistency().
  173     bool physics_found = 
false;
 
  174     for( std::set<std::string>::const_iterator name = required_physics.begin();
 
  175          name != required_physics.end();
 
  178         if( requested_physics.find( (*name) ) != requested_physics.end() )
 
  179           physics_found = 
true;
 
void consistency_error_msg(const std::string &qoi_name, const std::set< std::string > &required_physics)
 
 
 
 
  
  
      
        
          | void GRINS::QoIFactory::echo_qoi_list  | 
          ( | 
          SharedPtr< CompositeQoI > &  | 
          qois | ) | 
           | 
         
       
   | 
  
protectedvirtual   | 
  
 
- Todo:
 - Generalize to multiple QoI case when CompositeQoI is implemented in libMesh 
 
Definition at line 153 of file qoi_factory.C.
Referenced by build().
  156     std::cout << 
"==========================================================" << std::endl
 
  157               << 
"List of Enabled QoIs:" << std::endl;
 
  159     for( 
unsigned int q = 0; q < qois->n_qois(); q++ )
 
  161         std::cout << qois->get_qoi(q).name() << std::endl;      
 
  164     std::cout <<  
"==========================================================" << std::endl;
 
 
 
 
The documentation for this class was generated from the following files: