예제 #1
0
        public void Reorder(IReorderingAlgorithm reorderingAlgorithm, ISubdomain subdomain)
        {
            var pattern = SparsityPatternSymmetric.CreateEmpty(NumFreeDofs);

            foreach (var element in subdomain.Elements)
            {
                (int[] elementDofIndices, int[] subdomainDofIndices) = MapFreeDofsElementToSubdomain(element);

                //TODO: ISubdomainFreeDofOrdering could perhaps return whether the subdomainDofIndices are sorted or not.
                pattern.ConnectIndices(subdomainDofIndices, false);
            }
            (int[] permutation, bool oldToNew) = reorderingAlgorithm.FindPermutation(pattern);
            FreeDofs.Reorder(permutation, oldToNew);
        }
예제 #2
0
 //TODO: Use the reordering classes of project Solvers.
 //TODO: If the natural ordering is best, then there is no need to modify the stored dof data.
 //      Find a better way to handle it, perhaps by checking if IReorderingAlgorithm produced a better ordering.
 public Factory(IReorderingAlgorithm reordering = null)
 {
     this.reordering = reordering;
 }
예제 #3
0
 public SkylineFetiDPSubdomainMatrixManager(ISubdomain subdomain, IReorderingAlgorithm reordering)
 {
     this.linearSystem = new SingleSubdomainSystem <SkylineMatrix>(subdomain);
     this.reordering   = reordering;
 }
 public SkylineFetiDPCoarseProblemSolver(IReadOnlyList <ISubdomain> subdomains, IReorderingAlgorithm reordering)
 {
     this.subdomains = subdomains;
     this.reordering = reordering;
 }
예제 #5
0
 private AmdReordering(IReorderingAlgorithm amd)
 {
     this.amd = amd;
 }