Beispiel #1
0
        /// <summary>
        /// Firstorder Reinit of <paramref name="Phi"/> on <paramref name="ReinitField"/> field.
        /// The order in which each cell is initialized is determined by fast marching.
        /// Locally, each cell is initialized by the localSolver specified in the constructor.
        /// </summary>
        /// <param name="Phi">Field to reinitialize</param>
        /// <param name="Accepted">Start values</param>
        /// <param name="ReinitField">Specific Domain, e.g. whole domain or nearField</param>
        public void Reinit(SinglePhaseField Phi, CellMask Accepted, CellMask ReinitField)
        {
            //Build Marcher
            IFastMarchingQueue <IMarchingNode> Heap = new MarchingHeap(this.gridDat.Cells.NoOfCells);
            Fastmarcher Solver = new Fastmarcher(Heap);

            //Initialize Graph for Marching and build initial accepted nodes
            MarchingCell.Initialize(localSolver, Phi, gridDat, ReinitField);
            MarchingCell[] AcceptedCells = MarchingCell.BuildInitialAcceptedCells(Accepted);

            //Solve
            Solver.march(AcceptedCells);
        }
        public void LocalSolve(int jCell, BitArray AcceptedMask, SinglePhaseField Phi)
        {
            //Reset
            ResetNodeGraphValues();

            //Build Fast Marcher
            IFastMarchingQueue <IMarchingNode> Heap = new MarchingHeap(resolution * resolution);
            Fastmarcher marcher = new Fastmarcher(Heap);

            //Fill NodeGraph with information, i.e. x and y coordinates
            FillInNodeGraph(jCell);

            //Find Accepted Nodes on Cell Edges and Set them
            Node[] Accepted = SetupAccepted(jCell, AcceptedMask, Phi);

            //Solve
            marcher.march(Accepted);

            //Project solution to DGSpace
            MapToDGSpace(jCell, Phi);
        }