Example #1
0
        public IGlobalFreeDofOrdering OrderFreeDofs(IStructuralAsymmetricModel model)
        {
            var subdomain = model.Subdomains.First();

            (int numSubdomainFreeRowDofs, DofTable subdomainFreeRowDofs) = _rowOrderingStrategy.OrderSubdomainDofs(subdomain);
            ISubdomainFreeDofOrdering subdomainRowOrdering = new SubdomainFreeRowDofOrderingGeneral(numSubdomainFreeRowDofs, subdomainFreeRowDofs);

            return(new GlobalFreeDofOrderingSingle((ISubdomain)subdomain, subdomainRowOrdering));
        }
Example #2
0
        protected SingleSubdomainRectangularSolverBase(IStructuralAsymmetricModel model, IAsymmetricDofOrderer dofRowOrderer,
                                                       IDofOrderer dofColOrderer, IGlobalMatrixRectangularAssembler <TMatrix> assembler, string name)
        {
            if (model.Subdomains.Count != 1)
            {
                throw new InvalidSolverException(
                          $"{name} can be used if there is only 1 subdomain");
            }
            this.model    = model;
            subdomain     = model.Subdomains[0];
            linearSystem  = new SingleSubdomainSystem <TMatrix>(subdomain);
            LinearSystems = new Dictionary <int, ILinearSystem>()
            {
                { subdomain.ID, linearSystem }
            };
            linearSystem.MatrixObservers.Add(this);

            this.dofRowOrderer = dofRowOrderer;
            this.dofColOrderer = dofColOrderer;
            this.assembler     = assembler;
            this.Logger        = new SolverLogger(name);
        }
 public (int numGlobalFreeDofs, DofTable globalFreeDofs) OrderGlobalDofs(IStructuralAsymmetricModel model)
 => OrderFreeDofsOfElementSet(model.Elements, model.Constraints);
Example #4
0
 public GmresSolver(IStructuralAsymmetricModel model, AsymmetricDofOrderer dofRowOrderer, IDofOrderer dofColOrderer)
     : base(model, dofRowOrderer, dofColOrderer, new CsrRectangularAssembler(true), "GmresSolver")
 {
     this.gmresAlgorithm = new GmresAlgorithm.Builder().Build();
 }