예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FiniteElementModel" /> class.
        /// </summary>
        /// <param name="typeOfModel">The axes in which this model is constrained and the type of analysis expected on it.</param>
        public FiniteElementModel(ModelType typeOfModel)
        {
            this.ModelType = typeOfModel;
            this.nodes     = new NodeRepository(this.ModelType);
            this.elements  = new ElementRepository();
            this.forces    = new ForceRepository();

            this.NodeFactory    = new NodeFactory(this.ModelType, this.nodes);
            this.ElementFactory = new ElementFactory(this.ModelType, this.elements);
            this.ForceFactory   = new ForceFactory(this.ModelType, this.forces);
        }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NodeFactory" /> class.
 /// </summary>
 /// <param name="typeOfModel">The type of model for which this factory will be creating new nodes.</param>
 /// <param name="repository">The repository with which to register newly created nodes.</param>
 internal NodeFactory(ModelType typeOfModel, NodeRepository repository)
 {
     this.modelType = typeOfModel;
     this.repo      = repository;
 }