Returns data pointer to the newly created local assembler data.
  104    {
  105        auto const type_idx = std::type_index(typeid(mesh_item));
  106        auto const it = 
_builder.find(type_idx);
 
  107 
  109        {
  111                "You are trying to build a local assembler for an unknown mesh "
  112                "element type ({:s})."
  113                " Maybe you have disabled this mesh element type in your build "
  114                "configuration, or a mesh element order does not match shape "
  115                "function order given in the project file.",
  116                type_idx.name());
  117        }
  118 
  121        bool const isPressureDeactivated = (varIDs.front() != 0);
  122        std::vector<int> involved_varIDs;  
  123        involved_varIDs.reserve(varIDs.size() + 1);
  124        if (isPressureDeactivated)
  125        {
  126            involved_varIDs.push_back(0);  
  127        }
  128        involved_varIDs.insert(involved_varIDs.end(), varIDs.begin(),
  129                               varIDs.end());
  130 
  131        std::vector<unsigned> dofIndex_to_localIndex;
  132 
  133        
  134        dofIndex_to_localIndex.resize(n_local_dof);
  135        std::vector<unsigned> vec_n_element_nodes;
  136        
  137        vec_n_element_nodes.push_back(
  138            mesh_item.getNumberOfBaseNodes());  
  139        auto const max_varID = *std::max_element(varIDs.begin(), varIDs.end());
  140        for (int i = 1; i < max_varID + 1; i++)
  141        {
  142            vec_n_element_nodes.push_back(
  143                mesh_item.getNumberOfNodes());  
  144        }
  145 
  146        unsigned local_id = 0;
  147        unsigned dof_id = 0;
  148        for (unsigned i = 0; i < involved_varIDs.size(); i++)
  149        {
  150            auto const var_id = involved_varIDs[i];
  151            auto const n_var_comp =
  153            auto const n_var_element_nodes = vec_n_element_nodes[i];
  154            for (int var_comp_id = 0; var_comp_id < n_var_comp; var_comp_id++)
  155            {
  158                for (unsigned k = 0; k < n_var_element_nodes; k++)
  159                {
  163                    auto global_index =
  166                        dof_id < n_local_dof)
  167                    {
  168                        dofIndex_to_localIndex[dof_id++] = local_id;
  169                    }
  170                    local_id++;
  171                }
  172            }
  173        }
  174 
  175        return it->second(mesh_item, involved_varIDs.size(), n_local_dof,
  176                          dofIndex_to_localIndex,
  177                          std::forward<ConstructorArgs>(args)...);
  178    }
std::size_t getMeshID() const
return this mesh ID
std::size_t getNumberOfElementDOF(std::size_t const mesh_item_id) const
GlobalIndexType getGlobalIndex(MeshLib::Location const &l, int const variable_id, int const component_id) const
int getNumberOfVariableComponents(int variable_id) const
MeshLib::MeshSubset const & getMeshSubset(int const variable_id, int const component_id) const
std::vector< int > getElementVariableIDs(std::size_t const mesh_item_id) const
static constexpr NUMLIB_EXPORT GlobalIndexType const nop
std::size_t getNodeIndex(Element const &element, unsigned const idx)