static void collectGridData(
            const Space<BasisFunctionType>& space,
            shared_ptr<Fiber::RawGridGeometry<CoordinateType> >& rawGeometry,
            shared_ptr<GeometryFactory>& geometryFactory) {
        typedef Fiber::RawGridGeometry<CoordinateType> RawGridGeometry;

        rawGeometry = boost::make_shared<RawGridGeometry>(space.gridDimension(),
                                                          space.worldDimension());
        const GridView& view = space.gridView();
        view.getRawElementData(
                    rawGeometry->vertices(), rawGeometry->elementCornerIndices(),
                    rawGeometry->auxData(), rawGeometry->domainIndices());
        geometryFactory = space.elementGeometryFactory();
    }
Esempio n. 2
0
void SpaceHelper<BasisFunctionType>::
    getNormalsAtGlobalDofInterpolationPoints_defaultImplementation(
        const Space<BasisFunctionType> &space,
        arma::Mat<CoordinateType> &normals) {
  std::vector<Point3D<CoordinateType>> vNormals;
  space.getGlobalDofNormals(vNormals);

  const size_t pointCount = vNormals.size();
  const size_t worldDim = space.worldDimension();
  normals.set_size(worldDim, pointCount);
  for (size_t p = 0; p < pointCount; ++p) {
    normals(0, p) = acc(vNormals, p).x;
    if (worldDim > 1)
      normals(1, p) = acc(vNormals, p).y;
    if (worldDim > 2)
      normals(2, p) = acc(vNormals, p).z;
  }
}