9 #ifndef _fei_set_dof_mappings_hpp_
10 #define _fei_set_dof_mappings_hpp_
12 #include <fei_macros.hpp>
14 #include <fei_DofMapper.hpp>
18 template<
class LocalOrdinal,
class GlobalOrdinal,
class DofOrder>
19 void set_dof_mappings(GlobalOrdinal first_index,
22 typedef typename fei::DofMapper<LocalOrdinal,GlobalOrdinal,DofOrder>::DofMap DofMap;
23 typedef typename fei::DofMapper<LocalOrdinal,GlobalOrdinal,DofOrder>::IdxMap IdxMap;
25 typename DofMap::iterator
26 d_iter = dof_mapper.begin_dof(), d_end = dof_mapper.end_dof();
28 IdxMap& idxmap = dof_mapper.get_idx_dof_map();
30 GlobalOrdinal index = first_index;
31 for(; d_iter != d_end; ++d_iter) {
32 LocalOrdinal fieldsize = dof_mapper.getFieldSize(d_iter->first.field());
33 d_iter->second = index;
34 idxmap.insert(std::make_pair(index, &(d_iter->first)));
37 dof_mapper.set_maps_are_valid(
true);