DefaultLocalAssemblerForIntegralOperatorsOnSurfacesManager( bool cacheSingularIntegrals) { // Create a Bempp grid shared_ptr<Grid> grid = createGrid(); // These important thing is that the domain and dualToRange spaces are // different piecewiseConstantSpace = std::auto_ptr<PiecewiseConstantSpace>( new PiecewiseConstantSpace(grid)); piecewiseLinearSpace = std::auto_ptr<PiecewiseLinearSpace>( new PiecewiseLinearSpace(grid)); op = std::auto_ptr<Operator>(new Operator( make_shared_from_ref(*piecewiseConstantSpace), make_shared_from_ref(*piecewiseLinearSpace), make_shared_from_ref(*piecewiseLinearSpace), "SLP")); // Construct local assembler Fiber::AccuracyOptions options; options.doubleRegular.setRelativeQuadratureOrder(1); quadStrategy = std::auto_ptr<QuadratureStrategy>(new QuadratureStrategy); AssemblyOptions assemblyOptions; assemblyOptions.setVerbosityLevel(VerbosityLevel::LOW); assemblyOptions.enableSingularIntegralCaching(cacheSingularIntegrals); assembler = op->makeAssembler(*quadStrategy, assemblyOptions); }
DefaultLocalAssemblerForIntegralOperatorsOnSurfacesManager( bool cacheSingularIntegrals) { // Create a Bempp grid shared_ptr<Grid> grid = createGrid(); // Create context Fiber::AccuracyOptions options; options.doubleRegular.setRelativeQuadratureOrder(1); quadStrategy.reset(new QuadratureStrategy); AssemblyOptions assemblyOptions; assemblyOptions.setVerbosityLevel(VerbosityLevel::LOW); assemblyOptions.enableSingularIntegralCaching(cacheSingularIntegrals); Context<BFT, RT> context(quadStrategy, assemblyOptions); // These important thing is that the domain and dualToRange spaces are // different piecewiseConstantSpace.reset(new PiecewiseConstantSpace(grid)); piecewiseLinearSpace.reset(new PiecewiseLinearSpace(grid)); bop = laplace3dSingleLayerBoundaryOperator<BFT, RT>( make_shared_from_ref(context), piecewiseConstantSpace, piecewiseLinearSpace, piecewiseLinearSpace, "SLP"); const Operator& op = static_cast<const Operator&>(*bop.abstractOperator()); // This would be more elegant than the above, but it doesn't // work on Mac because of a problem with RTTI across // shared-library boundaries. // op = boost::dynamic_pointer_cast<const Operator>(bop.abstractOperator()); // Construct local assembler assembler = op.makeAssembler(*quadStrategy, assemblyOptions); }