private static XContinuumElement2D CreateMaterialInterfaceElement()
        {
            XNode[] nodes = new XNode[]
            {
                new XNode(0, 20.0, 0.0),
                new XNode(1, 40.0, 0.0),
                new XNode(2, 40.0, 20.0),
                new XNode(3, 20.0, 20.0),
            };

            var                 point1         = new CartesianPoint(30.0, 0.0);
            var                 point2         = new CartesianPoint(30.0, 20.0);
            PolyLine2D          discontinuity  = new PolyLine2D(point1, point2);
            MaterialInterface2D enrichmentItem = new MaterialInterface2D(discontinuity);

            double E1       = 2E6;
            double E2       = 0.5 * E1;
            double v        = 0.3;
            var    material = BiElasticMaterial2D.CreateMaterialForPlainStrain(E1, v, E2, v, enrichmentItem);

            var integrationStrategy = new RectangularSubgridIntegration2D <XContinuumElement2D>(
                2, GaussLegendre2D.GetQuadratureWithOrder(2, 2));

            //var integrationStrategy = new IntegrationForCrackPropagation2D(GaussLegendre2D.Order2x2,
            //    new RectangularSubgridIntegration2D<XContinuumElement2D>(2, GaussLegendre2D.Order2x2));
            var factory = new XContinuumElement2DFactory(integrationStrategy, integrationStrategy, material);
            var element = factory.CreateElement(0, CellType.Quad4, nodes);

            //discontinuity.ElementIntersections.Add(element, new CartesianPoint2D[] { point1, point2 });

            //OBSOLETE: Elements access their enrichments from nodes now.
            //enrichmentItem.EnrichElement(element);
            enrichmentItem.EnrichNode(nodes[0]);
            enrichmentItem.EnrichNode(nodes[1]);
            enrichmentItem.EnrichNode(nodes[2]);
            enrichmentItem.EnrichNode(nodes[3]);

            return(element);
        }