private void InitializeCrack()
        {
            IPropagator propagator;

            if (!writePropagation)
            {
                propagator = new FixedPropagator(propagationPath, null);
            }
            else
            {
                propagator = new Propagator(mesh, jIntegralRadiusOverElementSize,
                                            new HomogeneousMaterialAuxiliaryStates(globalHomogeneousMaterial),
                                            new HomogeneousSIFCalculator(globalHomogeneousMaterial),
                                            new MaximumCircumferentialTensileStressCriterion(), new ConstantIncrement2D(growthLength));
            }

            var crackMouth   = new CartesianPoint(webLeft, crackHeight);
            var crackTip     = new CartesianPoint(webLeft + crackLength, crackHeight);
            var initialCrack = new PolyLine2D(crackMouth, crackTip);
            var lsmCrack     = new TrackingExteriorCrackLSM(propagator, 0.0, new RelativeAreaResolver(heavisideTol));

            lsmCrack.Mesh = mesh;

            // Create enrichments
            lsmCrack.CrackBodyEnrichment = new CrackBodyEnrichment2D(lsmCrack);
            lsmCrack.CrackTipEnrichments = new CrackTipEnrichments2D(lsmCrack, CrackTipPosition.Single);
            if (lsmPlotDirectory != null)
            {
                lsmCrack.EnrichmentLogger = new EnrichmentLogger(Model, lsmCrack, lsmPlotDirectory);
                lsmCrack.LevelSetLogger   = new LevelSetLogger(Model, lsmCrack, lsmPlotDirectory);
                lsmCrack.LevelSetComparer = new PreviousLevelSetComparer(lsmCrack, lsmPlotDirectory);
            }

            // Mesh geometry interaction
            lsmCrack.InitializeGeometry(initialCrack);
            this.crack = lsmCrack;
        }
        private void InitializeCrack()
        {
            // Left crack
            // Propagator
            IPropagator leftPropagator;

            if (!writePropagation)
            {
                leftPropagator = new FixedPropagator(leftPropagationPath, null);
            }
            else
            {
                leftPropagator = new Propagator(Mesh, jIntegralRadiusOverElementSize,
                                                new HomogeneousMaterialAuxiliaryStates(globalHomogeneousMaterial),
                                                new HomogeneousSIFCalculator(globalHomogeneousMaterial),
                                                new MaximumCircumferentialTensileStressCriterion(), new ConstantIncrement2D(growthLength));
            }

            var initialLeftCrack = new PolyLine2D(new CartesianPoint(leftCrackMouthX, leftCrackMouthY),
                                                  new CartesianPoint(leftCrackTipX, leftCrackTipY));

            LeftCrack      = new TrackingExteriorCrackLSM(leftPropagator, tipEnrichmentRadius, new RelativeAreaResolver(heavisideTol));
            LeftCrack.Mesh = Mesh;

            // Create enrichments
            LeftCrack.CrackBodyEnrichment = new CrackBodyEnrichment2D(LeftCrack);
            LeftCrack.CrackTipEnrichments = new CrackTipEnrichments2D(LeftCrack, CrackTipPosition.Single);
            if (leftLsmPlotDirectory != null)
            {
                LeftCrack.EnrichmentLogger = new EnrichmentLogger(Model, LeftCrack, leftLsmPlotDirectory);
                LeftCrack.LevelSetLogger   = new LevelSetLogger(Model, LeftCrack, leftLsmPlotDirectory);
                LeftCrack.LevelSetComparer = new PreviousLevelSetComparer(LeftCrack, leftLsmPlotDirectory);
            }

            // Mesh geometry interaction
            LeftCrack.InitializeGeometry(initialLeftCrack);

            // Right crack
            // Propagator
            IPropagator rightPropagator;

            if (!writePropagation)
            {
                rightPropagator = new FixedPropagator(rightPropagationPath, null);
            }
            else
            {
                rightPropagator = new Propagator(Mesh, jIntegralRadiusOverElementSize,
                                                 new HomogeneousMaterialAuxiliaryStates(globalHomogeneousMaterial),
                                                 new HomogeneousSIFCalculator(globalHomogeneousMaterial),
                                                 new MaximumCircumferentialTensileStressCriterion(), new ConstantIncrement2D(growthLength));
            }

            var initialRightCrack = new PolyLine2D(new CartesianPoint(rightCrackMouthX, rightCrackMouthY),
                                                   new CartesianPoint(rightCrackTipX, rightCrackTipY));

            RightCrack      = new TrackingExteriorCrackLSM(rightPropagator, tipEnrichmentRadius, new RelativeAreaResolver(heavisideTol));
            RightCrack.Mesh = Mesh;

            // Create enrichments
            RightCrack.CrackBodyEnrichment = new CrackBodyEnrichment2D(RightCrack);
            RightCrack.CrackTipEnrichments = new CrackTipEnrichments2D(RightCrack, CrackTipPosition.Single);
            if (rightLsmPlotDirectory != null)
            {
                RightCrack.EnrichmentLogger = new EnrichmentLogger(Model, RightCrack, rightLsmPlotDirectory);
                RightCrack.LevelSetLogger   = new LevelSetLogger(Model, RightCrack, rightLsmPlotDirectory);
                RightCrack.LevelSetComparer = new PreviousLevelSetComparer(RightCrack, rightLsmPlotDirectory);
            }

            // Mesh geometry interaction
            RightCrack.InitializeGeometry(initialRightCrack);

            // Container for both cracks
            Crack = new MultipleCracksDisjoint(new TrackingExteriorCrackLSM[] { LeftCrack, RightCrack });
            //Crack = new MultipleCracksDisjoint(new TrackingExteriorCrackLSM[] { leftCrack });
        }