public bool Equals(LinearTruss other) { if (other == null) { return(false); } return(base.Equals(other) && object.Equals(this.Material, other.Material) && object.Equals(this.CrossSection, other.CrossSection)); }
/// <summary> /// /// </summary> /// <param name="node1"></param> /// <param name="node2"></param> /// <param name="material"></param> /// <param name="crossSection"></param> /// <returns></returns> public LinearTruss CreateLinearTruss(IFiniteElementNode node1, IFiniteElementNode node2, IMaterial material, ICrossSection crossSection) { Guard.AgainstInvalidState(() => { return(!LinearTruss.IsASupportedModelType(this.ModelType)); }, "LinearTruss are not available in a model of type {0}", this.ModelType); LinearTruss newTruss = new LinearTruss(node1, node2, material, crossSection); if (this.repository != null) { this.repository.Add(newTruss); } return(newTruss); }
public void SetUp() { nodeFactory = new NodeFactory(ModelType.Truss1D); start = nodeFactory.Create(0); end = nodeFactory.Create(1); elementFactory = new ElementFactory(ModelType.Truss1D); material = new GenericElasticMaterial(0, 0.1, 0, 0); section = new SolidRectangle(0.1, 1); SUT = elementFactory.CreateLinearTruss(start, end, material, section); }
public bool Equals(LinearTruss other) { if (other == null) { return false; } return base.Equals(other) && object.Equals(this.Material, other.Material) && object.Equals(this.CrossSection, other.CrossSection); }
/// <summary> /// /// </summary> /// <param name="node1"></param> /// <param name="node2"></param> /// <param name="material"></param> /// <param name="crossSection"></param> /// <returns></returns> public LinearTruss CreateLinearTruss(IFiniteElementNode node1, IFiniteElementNode node2, IMaterial material, ICrossSection crossSection) { Guard.AgainstInvalidState(() => { return !LinearTruss.IsASupportedModelType(this.ModelType); }, "LinearTruss are not available in a model of type {0}", this.ModelType); LinearTruss newTruss = new LinearTruss(node1, node2, material, crossSection); if (this.repository != null) { this.repository.Add(newTruss); } return newTruss; }