36 #ifndef ABSTRACTCONDUCTIVITYMODIFIER_HPP_
37 #define ABSTRACTCONDUCTIVITYMODIFIER_HPP_
46 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
51 std::vector<std::pair<unsigned, c_matrix<double,SPACE_DIM,SPACE_DIM> > >
mCache;
66 const c_matrix<double,SPACE_DIM,SPACE_DIM>& rOriginalConductivity,
70 if (
mCache.size() <= domainIndex )
73 mCache.resize(domainIndex+1, std::pair<
unsigned, c_matrix<double,SPACE_DIM,SPACE_DIM> >
77 if (
mCache[domainIndex].first != elementIndex)
79 mCache[domainIndex].first = elementIndex;
83 return mCache[domainIndex].second;
98 const c_matrix<double,SPACE_DIM,SPACE_DIM>& rOriginalConductivity,
99 unsigned domainIndex)=0;
virtual ~AbstractConductivityModifier()
virtual c_matrix< double, SPACE_DIM, SPACE_DIM > & rCalculateModifiedConductivityTensor(unsigned elementIndex, const c_matrix< double, SPACE_DIM, SPACE_DIM > &rOriginalConductivity, unsigned domainIndex)=0
std::vector< std::pair< unsigned, c_matrix< double, SPACE_DIM, SPACE_DIM > > > mCache
const unsigned UNSIGNED_UNSET
c_matrix< double, SPACE_DIM, SPACE_DIM > & rGetModifiedConductivityTensor(unsigned elementIndex, const c_matrix< double, SPACE_DIM, SPACE_DIM > &rOriginalConductivity, unsigned domainIndex)