libMesh
Public Member Functions | Public Attributes | List of all members
libMesh::VectorizedEvalInput Struct Reference

Define a struct for the input to the "vectorized evaluate" functions below. More...

#include <rb_parametrized_function.h>

Public Member Functions

 VectorizedEvalInput ()=default
 
 VectorizedEvalInput (const VectorizedEvalInput &)=default
 
VectorizedEvalInputoperator= (const VectorizedEvalInput &)=default
 
 VectorizedEvalInput (VectorizedEvalInput &&)=default
 
VectorizedEvalInputoperator= (VectorizedEvalInput &&)=default
 
virtual ~VectorizedEvalInput ()=default
 
void clear ()
 Clear all the members. More...
 

Public Attributes

std::vector< Pointall_xyz
 The members that define the inputs to the vectorized evaluate functions. More...
 
std::vector< dof_id_typeelem_ids
 
std::vector< unsigned intqps
 
std::vector< subdomain_id_typesbd_ids
 
std::vector< std::vector< Point > > all_xyz_perturb
 
std::vector< std::vector< Real > > phi_i_qp
 
std::vector< unsigned intside_indices
 
std::vector< boundary_id_typeboundary_ids
 
std::vector< dof_id_typenode_ids
 
std::vector< ElemTypeelem_types
 
std::map< dof_id_type, unsigned intelem_id_to_local_index
 The following containers are indexed by element id to avoid duplicated data. More...
 
std::vector< std::vector< Real > > JxW_all_qp
 
std::vector< std::vector< std::vector< Real > > > phi_i_all_qp
 
std::vector< Pointdxyzdxi_elem_center
 
std::vector< Pointdxyzdeta_elem_center
 
std::vector< Orderqrule_orders
 
std::unordered_map< std::string, std::set< dof_id_type > > rb_property_map
 Generic map that can be used to store any list of ids (elements, nodes, elemsets, subdomains...) corresponding to a property (string) that can be used to apply a specific treatment to a group of entities. More...
 

Detailed Description

Define a struct for the input to the "vectorized evaluate" functions below.

This encapsulates the arguments into a class to prevent having many function arguments, and also makes it easier to make API changes in the future because we can change these structs without changing the function arguments.

Definition at line 51 of file rb_parametrized_function.h.

Constructor & Destructor Documentation

◆ VectorizedEvalInput() [1/3]

libMesh::VectorizedEvalInput::VectorizedEvalInput ( )
default

◆ VectorizedEvalInput() [2/3]

libMesh::VectorizedEvalInput::VectorizedEvalInput ( const VectorizedEvalInput )
default

◆ VectorizedEvalInput() [3/3]

libMesh::VectorizedEvalInput::VectorizedEvalInput ( VectorizedEvalInput &&  )
default

◆ ~VectorizedEvalInput()

virtual libMesh::VectorizedEvalInput::~VectorizedEvalInput ( )
virtualdefault

Member Function Documentation

◆ clear()

void libMesh::VectorizedEvalInput::clear ( )

Clear all the members.

Definition at line 36 of file rb_parametrized_function.C.

References all_xyz, all_xyz_perturb, boundary_ids, dxyzdeta_elem_center, dxyzdxi_elem_center, elem_id_to_local_index, elem_ids, elem_types, JxW_all_qp, node_ids, phi_i_all_qp, phi_i_qp, qps, qrule_orders, rb_property_map, sbd_ids, and side_indices.

Referenced by libMesh::RBEIMEvaluation::clear(), and libMesh::RBEIMEvaluation::resize_data_structures().

37 {
38  all_xyz.clear();
39  elem_ids.clear();
40  qps.clear();
41  sbd_ids.clear();
42  all_xyz_perturb.clear();
43  phi_i_qp.clear();
44  side_indices.clear();
45  boundary_ids.clear();
46  node_ids.clear();
47  elem_types.clear();
48 
49  elem_id_to_local_index.clear();
50  JxW_all_qp.clear();
51  phi_i_all_qp.clear();
52  dxyzdxi_elem_center.clear();
53  dxyzdeta_elem_center.clear();
54  qrule_orders.clear();
55 
56  rb_property_map.clear();
57 }
std::vector< ElemType > elem_types
std::vector< Point > dxyzdeta_elem_center
std::vector< std::vector< Real > > JxW_all_qp
std::vector< unsigned int > qps
std::vector< std::vector< Real > > phi_i_qp
std::map< dof_id_type, unsigned int > elem_id_to_local_index
The following containers are indexed by element id to avoid duplicated data.
std::vector< dof_id_type > elem_ids
std::vector< subdomain_id_type > sbd_ids
std::vector< unsigned int > side_indices
std::unordered_map< std::string, std::set< dof_id_type > > rb_property_map
Generic map that can be used to store any list of ids (elements, nodes, elemsets, subdomains...
std::vector< Point > all_xyz
The members that define the inputs to the vectorized evaluate functions.
std::vector< std::vector< std::vector< Real > > > phi_i_all_qp
std::vector< Point > dxyzdxi_elem_center
std::vector< boundary_id_type > boundary_ids
std::vector< std::vector< Point > > all_xyz_perturb
std::vector< dof_id_type > node_ids

◆ operator=() [1/2]

VectorizedEvalInput& libMesh::VectorizedEvalInput::operator= ( const VectorizedEvalInput )
default

◆ operator=() [2/2]

VectorizedEvalInput& libMesh::VectorizedEvalInput::operator= ( VectorizedEvalInput &&  )
default

Member Data Documentation

◆ all_xyz

std::vector<Point> libMesh::VectorizedEvalInput::all_xyz

The members that define the inputs to the vectorized evaluate functions.

Note that some of these members may be unused, for example when we call the "interior" vectorized evaluate function, we do not use node_ids.

Some data below is the same for all points within an element, e.g. when we store data at multiple qps per element the sbd_ids, elem_ids, JxW_all_qp, phi_i_all_qp will store the same data repeated n_qp times per element. A possible optimization for this would be to store this data based on element indices rather than qp indices, and store an index per qp to index into the element-based data vector. This optimization hasn't been implemented at this stage, but it could be added at some point later.

Definition at line 78 of file rb_parametrized_function.h.

Referenced by libMesh::RBEIMEvaluation::add_interpolation_data(), libMesh::RBEIMEvaluation::add_interpolation_points_xyz(), libMesh::RBEIMEvaluation::add_node_interpolation_data(), libMesh::RBEIMEvaluation::add_side_interpolation_data(), clear(), libMesh::RBEIMEvaluation::get_interpolation_points_xyz(), libMesh::RBEIMEvaluation::get_n_interpolation_points(), libMesh::RBParametrizedFunction::node_vectorized_evaluate(), libMesh::RBParametrizedFunction::preevaluate_parametrized_function_on_mesh(), libMesh::RBParametrizedFunction::preevaluate_parametrized_function_on_mesh_nodes(), libMesh::RBParametrizedFunction::preevaluate_parametrized_function_on_mesh_sides(), libMesh::RBEIMEvaluation::resize_data_structures(), libMesh::RBParametrizedFunction::side_vectorized_evaluate(), and libMesh::RBParametrizedFunction::vectorized_evaluate().

◆ all_xyz_perturb

std::vector<std::vector<Point> > libMesh::VectorizedEvalInput::all_xyz_perturb

◆ boundary_ids

std::vector<boundary_id_type> libMesh::VectorizedEvalInput::boundary_ids

◆ dxyzdeta_elem_center

std::vector<Point> libMesh::VectorizedEvalInput::dxyzdeta_elem_center

◆ dxyzdxi_elem_center

std::vector<Point> libMesh::VectorizedEvalInput::dxyzdxi_elem_center

◆ elem_id_to_local_index

std::map<dof_id_type, unsigned int> libMesh::VectorizedEvalInput::elem_id_to_local_index

The following containers are indexed by element id to avoid duplicated data.

The elements have a local indexing as elem_ids might not always be contiguous.

Definition at line 92 of file rb_parametrized_function.h.

Referenced by libMesh::RBEIMEvaluation::add_elem_id_local_index_map_entry(), libMesh::RBEIMEvaluation::add_interpolation_data(), clear(), libMesh::RBEIMEvaluation::get_elem_id_to_local_index_map(), libMesh::RBEIMEvaluation::get_n_elems(), and libMesh::RBParametrizedFunction::preevaluate_parametrized_function_on_mesh().

◆ elem_ids

std::vector<dof_id_type> libMesh::VectorizedEvalInput::elem_ids

◆ elem_types

std::vector<ElemType> libMesh::VectorizedEvalInput::elem_types

◆ JxW_all_qp

std::vector<std::vector<Real> > libMesh::VectorizedEvalInput::JxW_all_qp

◆ node_ids

std::vector<dof_id_type> libMesh::VectorizedEvalInput::node_ids

◆ phi_i_all_qp

std::vector<std::vector<std::vector<Real> > > libMesh::VectorizedEvalInput::phi_i_all_qp

◆ phi_i_qp

std::vector<std::vector<Real> > libMesh::VectorizedEvalInput::phi_i_qp

◆ qps

std::vector<unsigned int> libMesh::VectorizedEvalInput::qps

◆ qrule_orders

std::vector<Order> libMesh::VectorizedEvalInput::qrule_orders

◆ rb_property_map

std::unordered_map<std::string, std::set<dof_id_type> > libMesh::VectorizedEvalInput::rb_property_map

Generic map that can be used to store any list of ids (elements, nodes, elemsets, subdomains...) corresponding to a property (string) that can be used to apply a specific treatment to a group of entities.

Definition at line 104 of file rb_parametrized_function.h.

Referenced by libMesh::RBEIMEvaluation::add_interpolation_data(), libMesh::RBEIMEvaluation::add_rb_property_map_entry(), clear(), libMesh::RBEIMEvaluation::get_n_properties(), libMesh::RBEIMEvaluation::get_rb_property_map(), and libMesh::RBEIMEvaluation::initialize_rb_property_map().

◆ sbd_ids

std::vector<subdomain_id_type> libMesh::VectorizedEvalInput::sbd_ids

◆ side_indices

std::vector<unsigned int> libMesh::VectorizedEvalInput::side_indices

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