Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #include "AlbPUMI_QPData.hpp"
00008
00009 template<typename DataType, unsigned Dim, class traits>
00010 AlbPUMI::QPData<DataType, Dim, traits>::QPData(const std::string& name_,
00011 const std::vector<int>& dim, const bool output_) :
00012 name(name_),
00013 output(output_),
00014 dims(dim),
00015 nfield_dofs(1),
00016 beginning_index(0)
00017 {
00018
00019 for(std::size_t i = 1; i < dims.size(); i++)
00020
00021 nfield_dofs *= dims[i];
00022
00023 }
00024
00025 template<typename DataType, unsigned Dim, class traits>
00026 void
00027 AlbPUMI::QPData<DataType, Dim, traits>::reAllocateBuffer(const std::size_t nelems){
00028
00029 std::size_t total_size = nelems * nfield_dofs;
00030
00031 buffer.resize(total_size);
00032
00033 beginning_index = 0;
00034
00035 return;
00036
00037 }
00038
00039 template<typename DataType, unsigned Dim, class traits>
00040 Albany::MDArray
00041 AlbPUMI::QPData<DataType, Dim, traits>::getMDA(const std::size_t nelems){
00042
00043 unsigned total_size = nelems * nfield_dofs;
00044
00045 field_type the_array = traits_type::buildArray(&buffer[beginning_index], nelems, dims);
00046
00047 beginning_index += total_size;
00048
00049 return the_array;
00050
00051 }