void setQuadrature(const MeshEntity& e, const std::map<vertex<dimension>, double> weights) { assert(e.getDimension() <= dimension); // We only have one cell per cell, so if we have quadrature for MeshEntity(dimension, k) // for k>0, something is wrong assert(e.getDimension() < dimension || e.getIndex() == 0); quadratureMap[e] = qpoints_t(weights.begin(), weights.end()); }
const_iterator end(const MeshEntity& e) const { assert(e.getDimension() <= dimension); assert(e.getDimension() < dimension || e.getIndex() == 0); const typename std::map<MeshEntity, qpoints_t>::const_iterator qIter = quadratureMap.find(e); assert(qIter != quadratureMap.end()); return qIter->second.end(); }
const value_type operator()(const MeshEntity& entity) const { assert(entity.getDimension() == dimension); const typename std::map<MeshEntity, value_type>::const_iterator entityIter(relations.find(entity)); if (entityIter != relations.end()) { return entityIter->second; } else { return defaultValue; } }
void setValue(const MeshEntity& entity, const value_type value) { assert(entity.getDimension() == dimension); relations[entity] = value; }