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

Class IBFEInstrumentPanel provides support for meters to measure flow and pressure.

#include <ibamr/IBFEInstrumentPanel.h>

Public Member Functions

 IBFEInstrumentPanel (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, int part)
 Constructor. More...
 
 ~IBFEInstrumentPanel ()=default
 Default destructor. More...
 
void initializeHierarchyIndependentData (IBAMR::IBFEMethod *ib_method_ops)
 Initialize hierarchy-independent data. More...
 
void readInstrumentData (int U_data_idx, int P_data_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, IBAMR::IBFEMethod *ib_method_ops, double data_time)
 Compute the flow rates and pressures in the various distributed internal flow meters and pressure gauges. More...
 
int getInstrumentDumpInterval () const
 
std::string getPlotDirectoryName () const
 
int getNumberOfMeterMeshes () const
 
libMesh::MeshBase & getMeterMesh (unsigned int meter_idx) const
 
libMesh::EquationSystems & getMeterMeshEquationSystems (unsigned int meter_idx) const
 
const std::string & getMeterMeshName (unsigned int meter_idx) const
 
libMesh::QuadratureType getMeterMeshQuadType (unsigned int meter_idx) const
 
libMesh::Order getMeterMeshQuadOrder (unsigned int meter_idx) const
 
const std::vector< double > & getMeterFlowRates () const
 
const std::vector< double > & getMeterMeanPressures () const
 
const std::vector< double > & getMeterCentroidPressures () const
 

Private Member Functions

 IBFEInstrumentPanel ()=delete
 Default constructor. More...
 
 IBFEInstrumentPanel (const IBFEInstrumentPanel &from)=delete
 Copy constructor. More...
 
IBFEInstrumentPaneloperator= (const IBFEInstrumentPanel &that)=delete
 Assignment operator. More...
 
void getFromInput (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > db)
 Get data from input file. More...
 
void resetMeterConfiguration (IBAMR::IBFEMethod *ib_method_ops, int meter_mesh_number)
 Initialize data that depend on the FE equation systems for the meter mesh. this includes computing the max radius of the mesh in the current configuration, and updating the mesh's system data. More...
 
void computeMeterQuadratureData (std::vector< std::map< int, std::vector< int > > > &meter_idx_map, std::vector< std::map< int, std::vector< IBTK::Vector > > > &meter_x_map, std::vector< std::map< int, std::vector< IBTK::Vector > > > &meter_u_corr_map, std::vector< std::map< int, std::vector< IBTK::Vector > > > &meter_normal_map, std::vector< std::map< int, std::vector< double > > > &meter_JxW_map, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, const IBFEMethod *ib_method_ops)
 Initialize mappings from Cartesian grid patches to meter quadrature points. More...
 
void outputData (double data_time)
 Write out data to file. More...
 
double getMeterRadius (int meter_idx)
 Get the maximum radius of the meter in its current configuration. More...
 

Private Attributes

unsigned int d_num_meters = 0
 The number of meters. More...
 
libMesh::QuadratureType d_quad_type = libMesh::QGRID
 Quadrature rule for computing surface integrals. More...
 
libMesh::Order d_default_quad_order = libMesh::FIFTH
 Default quadrature order for computing surface integrals. More...
 
bool d_use_adaptive_quadrature = true
 Flag tracking whether to use an adaptive quadrature order rule. More...
 
std::string d_u_interp_fcn = "PIECEWISE_LINEAR"
 Interpolation type for velocity data. More...
 
std::string d_p_interp_fcn = "PIECEWISE_LINEAR"
 Interpolation type for pressure data. More...
 
unsigned int d_part
 part ID where the meter mesh lives, i.e., its parent mesh. More...
 
bool d_initialized = false
 Flag tracking if meter meshes and other data are built and initialized. More...
 
std::vector< libMesh::Order > d_quad_order
 Actual quadrature order used for each meter mesh. More...
 
std::vector< unsigned intd_num_perim_nodes
 The number of nodes in the perimeter of the meter mesh. More...
 
std::vector< std::vector< std::array< libMesh::dof_id_type, NDIM > > > d_x_dof_idx
 Position and velocity DOF indices that link the meter mesh to the parent mesh data structures. More...
 
std::vector< std::vector< std::array< libMesh::dof_id_type, NDIM > > > d_u_dof_idx
 
std::vector< std::unique_ptr< libMesh::SerialMesh > > d_meter_meshes
 The meter meshes. More...
 
std::vector< std::unique_ptr< libMesh::EquationSystems > > d_meter_systems
 Equation systems for the meter meshes. More...
 
std::vector< std::string > d_meter_mesh_names
 Names for each meter mesh. More...
 
SAMRAI::tbox::Array< intd_perimeter_nodeset_ids
 Nodeset IDs on the structure mesh that specify the mesh nodes that form the perimeter of each meter mesh. More...
 
std::vector< doubled_meter_radii
 Meter radius data. More...
 
std::vector< doubled_flow_rate_values
 Flow rate data for each meter. More...
 
std::vector< doubled_mean_pressure_values
 Mean pressure data for each meter. More...
 
std::vector< doubled_centroid_pressure_values
 Centroid pressure data for each meter. More...
 
int d_instrument_dump_interval
 I/O settings. More...
 
std::string d_plot_directory_name
 
std::ofstream d_flux_stream
 
std::ofstream d_mean_pressure_stream
 
std::ofstream d_centroid_pressure_stream
 

Constructor & Destructor Documentation

◆ IBFEInstrumentPanel() [1/3]

IBAMR::IBFEInstrumentPanel::IBFEInstrumentPanel ( SAMRAI::tbox::Pointer< SAMRAI::tbox::Database input_db,
int  part 
)

◆ ~IBFEInstrumentPanel()

IBAMR::IBFEInstrumentPanel::~IBFEInstrumentPanel ( )
default

◆ IBFEInstrumentPanel() [2/3]

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

◆ IBFEInstrumentPanel() [3/3]

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

Member Function Documentation

◆ initializeHierarchyIndependentData()

void IBAMR::IBFEInstrumentPanel::initializeHierarchyIndependentData ( IBAMR::IBFEMethod ib_method_ops)

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

◆ readInstrumentData()

void IBAMR::IBFEInstrumentPanel::readInstrumentData ( int  U_data_idx,
int  P_data_idx,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
IBAMR::IBFEMethod ib_method_ops,
double  data_time 
)

◆ getInstrumentDumpInterval()

int IBAMR::IBFEInstrumentPanel::getInstrumentDumpInterval ( ) const
Returns
The instrument dump interval

◆ getPlotDirectoryName()

std::string IBAMR::IBFEInstrumentPanel::getPlotDirectoryName ( ) const
Returns
The name of the directory for output

◆ getNumberOfMeterMeshes()

int IBAMR::IBFEInstrumentPanel::getNumberOfMeterMeshes ( ) const
Returns
The number of meter meshes

◆ getMeterMesh()

libMesh::MeshBase& IBAMR::IBFEInstrumentPanel::getMeterMesh ( unsigned int  meter_idx) const
Returns
A reference to the specified meter mesh

◆ getMeterMeshEquationSystems()

libMesh::EquationSystems& IBAMR::IBFEInstrumentPanel::getMeterMeshEquationSystems ( unsigned int  meter_idx) const
Returns
A reference to the EquationSystems object for specified meter mesh

◆ getMeterMeshName()

const std::string& IBAMR::IBFEInstrumentPanel::getMeterMeshName ( unsigned int  meter_idx) const
Returns
The name for specified meter mesh

◆ getMeterMeshQuadType()

libMesh::QuadratureType IBAMR::IBFEInstrumentPanel::getMeterMeshQuadType ( unsigned int  meter_idx) const
Returns
The quadrature rule for the specified meter mesh.

◆ getMeterMeshQuadOrder()

libMesh::Order IBAMR::IBFEInstrumentPanel::getMeterMeshQuadOrder ( unsigned int  meter_idx) const
Returns
The quadrature order for the specified meter mesh

◆ getMeterFlowRates()

const std::vector<double>& IBAMR::IBFEInstrumentPanel::getMeterFlowRates ( ) const
Returns
The flow rates for each meter mesh.

◆ getMeterMeanPressures()

const std::vector<double>& IBAMR::IBFEInstrumentPanel::getMeterMeanPressures ( ) const
Returns
The mean pressures for each meter mesh.

◆ getMeterCentroidPressures()

const std::vector<double>& IBAMR::IBFEInstrumentPanel::getMeterCentroidPressures ( ) const
Returns
The centroid pressures for each meter mesh.

◆ operator=()

IBFEInstrumentPanel& IBAMR::IBFEInstrumentPanel::operator= ( const IBFEInstrumentPanel 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::IBFEInstrumentPanel::getFromInput ( SAMRAI::tbox::Pointer< SAMRAI::tbox::Database db)
private

◆ resetMeterConfiguration()

void IBAMR::IBFEInstrumentPanel::resetMeterConfiguration ( IBAMR::IBFEMethod ib_method_ops,
int  meter_mesh_number 
)
private

◆ computeMeterQuadratureData()

void IBAMR::IBFEInstrumentPanel::computeMeterQuadratureData ( std::vector< std::map< int, std::vector< int > > > &  meter_idx_map,
std::vector< std::map< int, std::vector< IBTK::Vector > > > &  meter_x_map,
std::vector< std::map< int, std::vector< IBTK::Vector > > > &  meter_u_corr_map,
std::vector< std::map< int, std::vector< IBTK::Vector > > > &  meter_normal_map,
std::vector< std::map< int, std::vector< double > > > &  meter_JxW_map,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
const IBFEMethod ib_method_ops 
)
private

◆ outputData()

void IBAMR::IBFEInstrumentPanel::outputData ( double  data_time)
private

◆ getMeterRadius()

double IBAMR::IBFEInstrumentPanel::getMeterRadius ( int  meter_idx)
private

Member Data Documentation

◆ d_num_meters

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

◆ d_quad_type

libMesh::QuadratureType IBAMR::IBFEInstrumentPanel::d_quad_type = libMesh::QGRID
private

◆ d_default_quad_order

libMesh::Order IBAMR::IBFEInstrumentPanel::d_default_quad_order = libMesh::FIFTH
private

◆ d_use_adaptive_quadrature

bool IBAMR::IBFEInstrumentPanel::d_use_adaptive_quadrature = true
private
Note
This only works with QGRID.

◆ d_u_interp_fcn

std::string IBAMR::IBFEInstrumentPanel::d_u_interp_fcn = "PIECEWISE_LINEAR"
private

◆ d_p_interp_fcn

std::string IBAMR::IBFEInstrumentPanel::d_p_interp_fcn = "PIECEWISE_LINEAR"
private

◆ d_part

unsigned int IBAMR::IBFEInstrumentPanel::d_part
private

◆ d_initialized

bool IBAMR::IBFEInstrumentPanel::d_initialized = false
private

◆ d_quad_order

std::vector<libMesh::Order> IBAMR::IBFEInstrumentPanel::d_quad_order
private

◆ d_num_perim_nodes

std::vector<unsigned int> IBAMR::IBFEInstrumentPanel::d_num_perim_nodes
private
Note
Each mesh also has an extra node at the centroid of the perimeter nodes.

◆ d_x_dof_idx

std::vector<std::vector<std::array<libMesh::dof_id_type, NDIM> > > IBAMR::IBFEInstrumentPanel::d_x_dof_idx
private

◆ d_u_dof_idx

std::vector<std::vector<std::array<libMesh::dof_id_type, NDIM> > > IBAMR::IBFEInstrumentPanel::d_u_dof_idx
private

◆ d_meter_meshes

std::vector<std::unique_ptr<libMesh::SerialMesh> > IBAMR::IBFEInstrumentPanel::d_meter_meshes
private

◆ d_meter_systems

std::vector<std::unique_ptr<libMesh::EquationSystems> > IBAMR::IBFEInstrumentPanel::d_meter_systems
private

◆ d_meter_mesh_names

std::vector<std::string> IBAMR::IBFEInstrumentPanel::d_meter_mesh_names
private

◆ d_perimeter_nodeset_ids

SAMRAI::tbox::Array<int> IBAMR::IBFEInstrumentPanel::d_perimeter_nodeset_ids
private

◆ d_meter_radii

std::vector<double> IBAMR::IBFEInstrumentPanel::d_meter_radii
private

◆ d_flow_rate_values

std::vector<double> IBAMR::IBFEInstrumentPanel::d_flow_rate_values
private

◆ d_mean_pressure_values

std::vector<double> IBAMR::IBFEInstrumentPanel::d_mean_pressure_values
private

◆ d_centroid_pressure_values

std::vector<double> IBAMR::IBFEInstrumentPanel::d_centroid_pressure_values
private

◆ d_instrument_dump_interval

int IBAMR::IBFEInstrumentPanel::d_instrument_dump_interval
private

◆ d_plot_directory_name

std::string IBAMR::IBFEInstrumentPanel::d_plot_directory_name
private

◆ d_flux_stream

std::ofstream IBAMR::IBFEInstrumentPanel::d_flux_stream
private

◆ d_mean_pressure_stream

std::ofstream IBAMR::IBFEInstrumentPanel::d_mean_pressure_stream
private

◆ d_centroid_pressure_stream

std::ofstream IBAMR::IBFEInstrumentPanel::d_centroid_pressure_stream
private

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