Esempio n. 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);
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ForceFactory" /> class.
 /// </summary>
 /// <param name="typeOfModel">The type of model for which this new instance will create forces.</param>
 /// <param name="forceRepository">The repository into which to register newly created forces.</param>
 internal ForceFactory(ModelType typeOfModel, ForceRepository forceRepository)
 {
     this.modelType  = typeOfModel;
     this.repository = forceRepository;
 }