IBAMR  IBAMR version 0.19.
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
IBAMR::IBInstrumentPanel Class Reference

Class IBInstrumentPanel provides support for flow meters and pressure gauges.

#include <ibamr/IBInstrumentPanel.h>

Inheritance diagram for IBAMR::IBInstrumentPanel:
Inheritance graph
[legend]

Classes

struct  IndexFortranOrder
 Data structures employed to manage mappings between cell indices and web patch data (i.e., patch centroids and area-weighted normals) and meter centroid data. More...
 
struct  WebCentroid
 
struct  WebPatch
 

Public Member Functions

 IBInstrumentPanel (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db)
 Constructor. More...
 
virtual ~IBInstrumentPanel ()
 Destructor. More...
 
const std::vector< std::string > & getInstrumentNames () const
 
const doublegetInstrumentDataReadTime () const
 
const std::vector< double > & getFlowValues () const
 
const std::vector< double > & getMeanPressureValues () const
 
const std::vector< double > & getPointwisePressureValues () const
 
bool isInstrumented () const
 
void initializeHierarchyIndependentData (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, IBTK::LDataManager *l_data_manager)
 Initialize hierarchy-independent data. More...
 
void initializeHierarchyDependentData (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, IBTK::LDataManager *l_data_manager, int timestep_num, double data_time)
 Initialize hierarchy- and configuration-dependent data. More...
 
void readInstrumentData (int U_data_idx, int P_data_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, IBTK::LDataManager *l_data_manager, int timestep_num, double data_time)
 Compute the flow rates and pressures in the various distributed internal flow meters and pressure gauges. More...
 
void setPlotDirectory (const std::string &plot_directory_name)
 Set the directory where plot data is to be written. More...
 
void writePlotData (int timestep_num, double simulation_time)
 Write the plot data to disk. More...
 

Private Types

using WebPatchMap = std::multimap< SAMRAI::hier::Index< NDIM >, WebPatch, IndexFortranOrder >
 
using WebCentroidMap = std::multimap< SAMRAI::hier::Index< NDIM >, WebCentroid, IndexFortranOrder >
 

Private Member Functions

 IBInstrumentPanel ()=delete
 Default constructor. More...
 
 IBInstrumentPanel (const IBInstrumentPanel &from)=delete
 Copy constructor. More...
 
IBInstrumentPaneloperator= (const IBInstrumentPanel &that)=delete
 Assignment operator. More...
 
void getFromInput (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > db)
 
void outputLogData (std::ostream &os)
 

Private Attributes

std::string d_object_name
 
bool d_initialized = false
 Instrumentation data. More...
 
unsigned int d_num_meters = 0
 
std::vector< intd_num_perimeter_nodes
 
std::vector< IBTK::Vectord_X_centroid
 
std::vector< boost::multi_array< IBTK::Vector, 1 > > d_X_perimeter
 
std::vector< boost::multi_array< IBTK::Vector, 2 > > d_X_web
 
std::vector< boost::multi_array< IBTK::Vector, 2 > > d_dA_web
 
int d_instrument_read_timestep_num = -1
 
double d_instrument_read_time = std::numeric_limits<double>::quiet_NaN()
 
int d_max_instrument_name_len = -1
 
std::vector< std::string > d_instrument_names
 
std::vector< doubled_flow_values
 
std::vector< doubled_mean_pres_values
 
std::vector< doubled_point_pres_values
 
std::vector< WebPatchMapd_web_patch_map
 
std::vector< WebCentroidMapd_web_centroid_map
 
std::string d_plot_directory_name
 
bool d_output_log_file = false
 
std::string d_log_file_name
 
std::ofstream d_log_file_stream
 
double d_flow_conv = 1.0
 
double d_pres_conv = 1.0
 
std::string d_flow_units
 
std::string d_pres_units
 

Member Typedef Documentation

◆ WebPatchMap

◆ WebCentroidMap

Constructor & Destructor Documentation

◆ IBInstrumentPanel() [1/3]

IBAMR::IBInstrumentPanel::IBInstrumentPanel ( std::string  object_name,
SAMRAI::tbox::Pointer< SAMRAI::tbox::Database input_db 
)

◆ ~IBInstrumentPanel()

virtual IBAMR::IBInstrumentPanel::~IBInstrumentPanel ( )
virtual

◆ IBInstrumentPanel() [2/3]

IBAMR::IBInstrumentPanel::IBInstrumentPanel ( )
privatedelete
Note
This constructor is not implemented and should not be used.

◆ IBInstrumentPanel() [3/3]

IBAMR::IBInstrumentPanel::IBInstrumentPanel ( const IBInstrumentPanel from)
privatedelete
Note
This constructor is not implemented and should not be used.
Parameters
fromThe value to copy to this object.

Member Function Documentation

◆ getInstrumentNames()

const std::vector<std::string>& IBAMR::IBInstrumentPanel::getInstrumentNames ( ) const
Returns
A const reference to the vector of instrument names.

◆ getInstrumentDataReadTime()

const double& IBAMR::IBInstrumentPanel::getInstrumentDataReadTime ( ) const
Returns
A const reference to the most recent time that the flow meter and pressure gauge values were set.
Note
This value is not initialized until the first call is made to readInstrumentData().

◆ getFlowValues()

const std::vector<double>& IBAMR::IBInstrumentPanel::getFlowValues ( ) const
Returns
A const reference to the vector of flow meter values.
Note
This vector is not initialized until the first call is made to readInstrumentData().

◆ getMeanPressureValues()

const std::vector<double>& IBAMR::IBInstrumentPanel::getMeanPressureValues ( ) const
Returns
A const reference to the vector of mean pressure values.
Note
This vector is not initialized until the first call is made to readInstrumentData().

◆ getPointwisePressureValues()

const std::vector<double>& IBAMR::IBInstrumentPanel::getPointwisePressureValues ( ) const
Returns
A const reference to the vector of pointwise pressure values.
Note
This vector is not initialized until the first call is made to readInstrumentData().

◆ isInstrumented()

bool IBAMR::IBInstrumentPanel::isInstrumented ( ) const
Returns
A boolean indicating whether there are any instruments embedded within the model data.
Note
This method returns false and prints a warning message prior to the first call to initializeHierarchyIndependentData().

◆ initializeHierarchyIndependentData()

void IBAMR::IBInstrumentPanel::initializeHierarchyIndependentData ( SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
IBTK::LDataManager l_data_manager 
)

The data initialized by this method is assumed not to change during the course of a simulation.

◆ initializeHierarchyDependentData()

void IBAMR::IBInstrumentPanel::initializeHierarchyDependentData ( SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
IBTK::LDataManager l_data_manager,
int  timestep_num,
double  data_time 
)

◆ readInstrumentData()

void IBAMR::IBInstrumentPanel::readInstrumentData ( int  U_data_idx,
int  P_data_idx,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
IBTK::LDataManager l_data_manager,
int  timestep_num,
double  data_time 
)

◆ setPlotDirectory()

void IBAMR::IBInstrumentPanel::setPlotDirectory ( const std::string &  plot_directory_name)
Note
By default, visualization data is placed into the directory "viz_inst2d" for two-dimensional simulations and "viz_inst3d" for three-dimensional simulations.

◆ writePlotData()

void IBAMR::IBInstrumentPanel::writePlotData ( int  timestep_num,
double  simulation_time 
)

◆ operator=()

IBInstrumentPanel& IBAMR::IBInstrumentPanel::operator= ( const IBInstrumentPanel that)
privatedelete
Note
This operator is not implemented and should not be used.
Parameters
thatThe value to assign to this object.
Returns
A reference to this object.

◆ getFromInput()

void IBAMR::IBInstrumentPanel::getFromInput ( SAMRAI::tbox::Pointer< SAMRAI::tbox::Database db)
private

Read input values, indicated above, from given database.

When assertion checking is active, the database pointer must be non-null.

◆ outputLogData()

void IBAMR::IBInstrumentPanel::outputLogData ( std::ostream &  os)
private

Output log data to the provided output stream.

Member Data Documentation

◆ d_object_name

std::string IBAMR::IBInstrumentPanel::d_object_name
private

◆ d_initialized

bool IBAMR::IBInstrumentPanel::d_initialized = false
private

◆ d_num_meters

unsigned int IBAMR::IBInstrumentPanel::d_num_meters = 0
private

◆ d_num_perimeter_nodes

std::vector<int> IBAMR::IBInstrumentPanel::d_num_perimeter_nodes
private

◆ d_X_centroid

std::vector<IBTK::Vector> IBAMR::IBInstrumentPanel::d_X_centroid
private

◆ d_X_perimeter

std::vector<boost::multi_array<IBTK::Vector, 1> > IBAMR::IBInstrumentPanel::d_X_perimeter
private

◆ d_X_web

std::vector<boost::multi_array<IBTK::Vector, 2> > IBAMR::IBInstrumentPanel::d_X_web
private

◆ d_dA_web

std::vector<boost::multi_array<IBTK::Vector, 2> > IBAMR::IBInstrumentPanel::d_dA_web
private

◆ d_instrument_read_timestep_num

int IBAMR::IBInstrumentPanel::d_instrument_read_timestep_num = -1
private

◆ d_instrument_read_time

double IBAMR::IBInstrumentPanel::d_instrument_read_time = std::numeric_limits<double>::quiet_NaN()
private

◆ d_max_instrument_name_len

int IBAMR::IBInstrumentPanel::d_max_instrument_name_len = -1
private

◆ d_instrument_names

std::vector<std::string> IBAMR::IBInstrumentPanel::d_instrument_names
private

◆ d_flow_values

std::vector<double> IBAMR::IBInstrumentPanel::d_flow_values
private

◆ d_mean_pres_values

std::vector<double> IBAMR::IBInstrumentPanel::d_mean_pres_values
private

◆ d_point_pres_values

std::vector<double> IBAMR::IBInstrumentPanel::d_point_pres_values
private

◆ d_web_patch_map

std::vector<WebPatchMap> IBAMR::IBInstrumentPanel::d_web_patch_map
private

◆ d_web_centroid_map

std::vector<WebCentroidMap> IBAMR::IBInstrumentPanel::d_web_centroid_map
private

◆ d_plot_directory_name

std::string IBAMR::IBInstrumentPanel::d_plot_directory_name
private

◆ d_output_log_file

bool IBAMR::IBInstrumentPanel::d_output_log_file = false
private

The log file name and optional flow rate and pressure conversion factors.

◆ d_log_file_name

std::string IBAMR::IBInstrumentPanel::d_log_file_name
private

◆ d_log_file_stream

std::ofstream IBAMR::IBInstrumentPanel::d_log_file_stream
private

◆ d_flow_conv

double IBAMR::IBInstrumentPanel::d_flow_conv = 1.0
private

◆ d_pres_conv

double IBAMR::IBInstrumentPanel::d_pres_conv = 1.0
private

◆ d_flow_units

std::string IBAMR::IBInstrumentPanel::d_flow_units
private

◆ d_pres_units

std::string IBAMR::IBInstrumentPanel::d_pres_units
private

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