public override IFetiPreconditioner CreatePreconditioner(IStructuralModel model, IStiffnessDistribution stiffnessDistribution, IDofSeparator dofSeparator, ILagrangeMultipliersEnumerator lagrangeEnumerator, Dictionary <int, IFetiSubdomainMatrixManager> matrixManagers) { IReadOnlyList <ISubdomain> subdomains = model.Subdomains; int[] subdomainIDs = dofSeparator.BoundaryDofIndices.Keys.ToArray(); Dictionary <int, IMappingMatrix> boundaryBooleans = CalcBoundaryPreconditioningBooleanMatrices( stiffnessDistribution, dofSeparator, lagrangeEnumerator); foreach (int s in subdomainIDs) { if (!subdomains[s].StiffnessModified) { continue; } Debug.WriteLine($"{typeof(DiagonalDirichletPreconditioner).Name}.{this.GetType().Name}:" + $" Extracting boundary/internal submatrices of subdomain {s} for preconditioning"); IFetiSubdomainMatrixManager matrixManager = matrixManagers[s]; int[] boundaryDofs = dofSeparator.BoundaryDofIndices[s]; int[] internalDofs = dofSeparator.InternalDofIndices[s]; matrixManager.ExtractKbb(boundaryDofs); matrixManager.ExtractKbiKib(boundaryDofs, internalDofs); matrixManager.ExtractAndInvertKiiDiagonal(internalDofs); } return(new DiagonalDirichletPreconditioner(subdomainIDs, matrixManagers, boundaryBooleans)); }
public HomogeneousStiffnessDistribution(IStructuralModel model, IDofSeparator dofSeparator) { this.subdomains = model.Subdomains; this.dofSeparator = dofSeparator; this.inverseBoundaryDofMultiplicities = new Dictionary <int, double[]>(); }
protected LagrangeMultipliersEnumeratorBase(ICrosspointStrategy crosspointStrategy, IDofSeparator dofSeparator) { this.crosspointStrategy = crosspointStrategy; this.dofSeparator = dofSeparator; }
protected Dictionary <int, IMappingMatrix> CalcBoundaryPreconditioningBooleanMatrices(IStiffnessDistribution stiffnessDistribution, IDofSeparator dofSeparator, ILagrangeMultipliersEnumerator lagrangeEnumerator) { int numContinuityEquations = lagrangeEnumerator.NumLagrangeMultipliers; var matricesBb = new Dictionary <int, SignedBooleanMatrixColMajor>(); foreach (int s in dofSeparator.BoundaryDofIndices.Keys) { SignedBooleanMatrixColMajor B = lagrangeEnumerator.BooleanMatrices[s]; SignedBooleanMatrixColMajor Bb = B.GetColumns(dofSeparator.BoundaryDofIndices[s], false); matricesBb[s] = Bb; } Dictionary <int, IMappingMatrix> matricesBpb = stiffnessDistribution.CalcBoundaryPreconditioningSignedBooleanMatrices( lagrangeEnumerator, matricesBb); return(matricesBpb); }
public abstract IFetiPreconditioner CreatePreconditioner(IModel model, IStiffnessDistribution stiffnessDistribution, IDofSeparator dofSeparator, ILagrangeMultipliersEnumerator lagrangeEnumerator, Dictionary <int, IFetiSubdomainMatrixManager> matrixManagers);
public HeterogeneousStiffnessDistribution(IStructuralModel model, IDofSeparator dofSeparator) { this.subdomains = model.Subdomains; this.dofSeparator = dofSeparator; inverseDbMatrices = new Dictionary <int, DiagonalMatrix>(); }