Ejemplo n.º 1
0
        public void AssignSurfaceLoads(NodalLoadsToSubdomainsDistributor distributeNodalLoads)
        {
            var globalNodalLoads = new Table <INode, IDofType, double>();

            foreach (var surfaceLoadElement in SurfaceLoads)
            {
                var surfaceLoadTable = surfaceLoadElement.CalculateSurfaceLoad();
                foreach ((INode node, IDofType dof, double load)tuple in surfaceLoadTable)
                {
                    if (globalNodalLoads.Contains(tuple.node, tuple.dof))
                    {
                        globalNodalLoads[tuple.node, tuple.dof] += tuple.load;
                    }
                    else
                    {
                        globalNodalLoads.TryAdd(tuple.node, tuple.dof, tuple.load);
                    }
                }
            }

            Dictionary <int, SparseVector> subdomainNodalLoads = distributeNodalLoads(globalNodalLoads);

            foreach (var idSubdomainLoads in subdomainNodalLoads)
            {
                SubdomainsDictionary[idSubdomainLoads.Key].Forces.AddIntoThis(idSubdomainLoads.Value);
            }
        }
Ejemplo n.º 2
0
        public Dictionary <int, IVector> BuildGlobalStabilizingBodyLoads(NodalLoadsToSubdomainsDistributor distributeNodalLoads)
        {
            var globalNodalLoads = new Table <INode, IDofType, double>();

            foreach (var loadElement in BodyLoads)
            {
                var loadTable = loadElement.CalculateStabilizingBodyLoad();
                foreach ((INode node, IDofType dof, double load)tuple in loadTable)
                {
                    if (globalNodalLoads.Contains(tuple.node, tuple.dof))
                    {
                        globalNodalLoads[tuple.node, tuple.dof] += tuple.load;
                    }
                    else
                    {
                        globalNodalLoads.TryAdd(tuple.node, tuple.dof, tuple.load);
                    }
                }
            }
            var a = distributeNodalLoads(globalNodalLoads);

            Dictionary <int, IVector> subdomainNodalLoads = new Dictionary <int, IVector>();

            foreach (var keyValuePair in a)
            {
                subdomainNodalLoads.Add(keyValuePair.Key, keyValuePair.Value);
            }

            return(subdomainNodalLoads);
        }
Ejemplo n.º 3
0
 public void AssignLoads(NodalLoadsToSubdomainsDistributor distributeNodalLoads)
 {
     foreach (XSubdomain subdomain in Subdomains.Values)
     {
         subdomain.Forces.Clear();
     }
     AssignNodalLoads(distributeNodalLoads);
 }
Ejemplo n.º 4
0
 public void AssignLoads(NodalLoadsToSubdomainsDistributor distributeNodalLoads)
 {
     foreach (Subdomain subdomain in SubdomainsDictionary.Values)
     {
         subdomain.Forces.Clear();
     }
     AssignNodalLoads(distributeNodalLoads);
     AssignElementMassLoads();
     AssignMassAccelerationLoads();
 }
Ejemplo n.º 5
0
        public void AssignNodalLoads(NodalLoadsToSubdomainsDistributor distributeNodalLoads)
        {
            var globalNodalLoads = new Table <INode, IDofType, double>();

            foreach (NodalLoad load in NodalLoads)
            {
                globalNodalLoads.TryAdd(load.Node, load.DofType, load.Value);
            }

            Dictionary <int, SparseVector> subdomainNodalLoads = distributeNodalLoads(globalNodalLoads);

            foreach (var idSubdomainLoads in subdomainNodalLoads)
            {
                Subdomains[idSubdomainLoads.Key].Forces.AddIntoThis(idSubdomainLoads.Value);
            }
        }
Ejemplo n.º 6
0
        public void AssignTimeDependentNodalLoads(int timeStep, NodalLoadsToSubdomainsDistributor distributeNodalLoads)
        {
            var globalNodalLoads = new Table <INode, IDofType, double>();

            foreach (ITimeDependentNodalLoad load in TimeDependentNodalLoads)
            {
                globalNodalLoads.TryAdd(load.Node, load.DOF, load.GetLoadAmount(timeStep));
            }

            Dictionary <int, SparseVector> subdomainNodalLoads = distributeNodalLoads(globalNodalLoads);

            foreach (var idSubdomainLoads in subdomainNodalLoads)
            {
                SubdomainsDictionary[idSubdomainLoads.Key].Forces.AddIntoThis(idSubdomainLoads.Value);
            }
        }
Ejemplo n.º 7
0
 public void AssignTimeDependentNodalLoads(int timeStep, NodalLoadsToSubdomainsDistributor distributeNodalLoads)
 {
     throw new NotImplementedException();
 }