FEI Package Browser (Single Doxygen Collection)
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
base
fei_set_dof_mappings.hpp
Go to the documentation of this file.
1
/*--------------------------------------------------------------------*/
2
/* Copyright 2009 Sandia Corporation. */
3
/* Under the terms of Contract DE-AC04-94AL85000, there is a */
4
/* non-exclusive license for use of this work by or on behalf */
5
/* of the U.S. Government. Export of this program may require */
6
/* a license from the United States Government. */
7
/*--------------------------------------------------------------------*/
8
9
#ifndef _fei_set_dof_mappings_hpp_
10
#define _fei_set_dof_mappings_hpp_
11
12
#include <
fei_macros.hpp
>
13
14
#include <
fei_DofMapper.hpp
>
15
16
namespace
fei
{
17
18
template
<
class
LocalOrdinal,
class
GlobalOrdinal,
class
DofOrder>
19
void
set_dof_mappings
(GlobalOrdinal first_index,
20
fei::DofMapper<LocalOrdinal,GlobalOrdinal,DofOrder>
& dof_mapper)
21
{
22
typedef
typename
fei::DofMapper<LocalOrdinal,GlobalOrdinal,DofOrder>::DofMap
DofMap;
23
typedef
typename
fei::DofMapper<LocalOrdinal,GlobalOrdinal,DofOrder>::IdxMap
IdxMap;
24
25
typename
DofMap::iterator
26
d_iter = dof_mapper.
begin_dof
(), d_end = dof_mapper.
end_dof
();
27
28
IdxMap& idxmap = dof_mapper.
get_idx_dof_map
();
29
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)));
35
index += fieldsize;
36
}
37
dof_mapper.
set_maps_are_valid
(
true
);
38
}
39
40
}
//namespace fei
41
42
#endif
43
fei::DofMapper
Definition
fei_DofMapper.hpp:42
fei::DofMapper::end_dof
DofMap::const_iterator end_dof() const
Definition
fei_DofMapper.hpp:79
fei::DofMapper::set_maps_are_valid
void set_maps_are_valid(bool flag)
Definition
fei_DofMapper.hpp:72
fei::DofMapper::getFieldSize
LocalOrdinal getFieldSize(LocalOrdinal field) const
Definition
fei_DofMapper.hpp:137
fei::DofMapper::DofMap
std::map< Dof< LocalOrdinal, GlobalOrdinal >, GlobalOrdinal, DofOrder > DofMap
Definition
fei_DofMapper.hpp:74
fei::DofMapper::get_idx_dof_map
const IdxMap & get_idx_dof_map() const
Definition
fei_DofMapper.hpp:105
fei::DofMapper::IdxMap
std::map< GlobalOrdinal, const Dof< LocalOrdinal, GlobalOrdinal > * > IdxMap
Definition
fei_DofMapper.hpp:88
fei::DofMapper::begin_dof
DofMap::const_iterator begin_dof() const
Definition
fei_DofMapper.hpp:76
fei_DofMapper.hpp
fei_macros.hpp
fei
Definition
fei_ArrayUtils.hpp:16
fei::set_dof_mappings
void set_dof_mappings(GlobalOrdinal first_index, fei::DofMapper< LocalOrdinal, GlobalOrdinal, DofOrder > &dof_mapper)
Definition
fei_set_dof_mappings.hpp:19
Generated by
1.17.0