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); } }
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); }
public void AssignLoads(NodalLoadsToSubdomainsDistributor distributeNodalLoads) { foreach (XSubdomain subdomain in Subdomains.Values) { subdomain.Forces.Clear(); } AssignNodalLoads(distributeNodalLoads); }
public void AssignLoads(NodalLoadsToSubdomainsDistributor distributeNodalLoads) { foreach (Subdomain subdomain in SubdomainsDictionary.Values) { subdomain.Forces.Clear(); } AssignNodalLoads(distributeNodalLoads); AssignElementMassLoads(); AssignMassAccelerationLoads(); }
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); } }
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); } }
public void AssignTimeDependentNodalLoads(int timeStep, NodalLoadsToSubdomainsDistributor distributeNodalLoads) { throw new NotImplementedException(); }