void evaluateShapeFunctionDerivativesWithDune( const arma::Mat<CoordinateType> &local, LocalDofIndex localDofIndex, _4dArray<ValueType> &result, const DuneBasis &basis = DuneBasis()) { typedef typename DuneBasis::Traits Traits; assert(local.n_rows == Traits::dimDomain); assert(localDofIndex == ALL_DOFS || (localDofIndex >= 0 && localDofIndex < basis.size())); const int functionCount = localDofIndex == ALL_DOFS ? basis.size() : 1; const int pointCount = local.n_cols; typename Traits::DomainType point; std::vector<typename Traits::JacobianType> jacobians; result.set_size(Traits::dimRange, Traits::dimDomain, functionCount, pointCount); for (int pointIndex = 0; pointIndex < pointCount; ++pointIndex) { for (int dim = 0; dim < Traits::dimDomain; ++dim) point[dim] = local(dim, pointIndex); basis.evaluateJacobian(point, jacobians); if (localDofIndex == ALL_DOFS) for (int functionIndex = 0; functionIndex < functionCount; ++functionIndex) for (int dimD = 0; dimD < Traits::dimDomain; ++dimD) for (int dimR = 0; dimR < Traits::dimRange; ++dimR) result(dimR, dimD, functionIndex, pointIndex) = jacobians[functionIndex][dimR][dimD]; else for (int dimD = 0; dimD < Traits::dimDomain; ++dimD) for (int dimR = 0; dimR < Traits::dimRange; ++dimR) result(dimR, dimD, 0, pointIndex) = jacobians[localDofIndex][dimR][dimD]; } }
virtual int size() const { return m_duneBasis.size(); }
virtual int size() const { DuneBasis basis; return basis.size(); }