public SolveStepViewModel(SolidMechanicsModel model) :base("Solve", model) { SolveCommand = new RelayCommand(Solve); Results = new ObservableCollection<INumericalResult>(); GridResults = new ObservableCollection<ResultItem>(); }
public void SaveTest() { Shape shape = new Rectangle(10, 20); // TODO: Initialize to an appropriate value SolidMechanicsModel target = new SolidMechanicsModel(shape); // TODO: Initialize to an appropriate value string filename = "temp.dat"; // TODO: Initialize to an appropriate value target.Save(filename); //Assert.Inconclusive("A method that does not return a value cannot be verified."); }
public override void RefreshProperties(SolidMechanicsModel model) { SolidMechanicsModel2D m = model as SolidMechanicsModel2D; if (m != null) { VerticalElements = m.VerticalElements; } HorizontalElements = model.HorizontalElements; }
public void InitializeSteps() { model = createModel(); Steps = getSteps(model); SelectStep(Steps[0]); foreach (WizardStepViewModelBase step in Steps) { step.PropertyChanged += step_PropertyChanged; } }
public override void RefreshProperties(SolidMechanicsModel model) { Rectangle rectangle = model.Model.Shape as Rectangle; if (rectangle != null) { Height = rectangle.Height; Width = rectangle.Width; } }
public override void RefreshProperties(SolidMechanicsModel model) { base.RefreshProperties(model); CylindricalPlate plate = model.Model.Shape as CylindricalPlate; if (plate != null) { Curvature = plate.Curvature; } }
public void SetBoundaryConditions(SolidMechanicsModel model) { Edges = new ObservableCollection<EdgeViewModel>(); int i = 1; foreach (Edge edge in model.Model.Shape.Edges) { Edges.Add(new EdgeViewModel(i, edge, model.Model.BoundaryConditions[edge])); i++; } }
private void SetPointConditions(SolidMechanicsModel model) { Points = new ObservableCollection<PointViewModel>(); int i = 1; foreach (Point point in model.Model.Shape.Points) { Points.Add(new PointViewModel(i, point, model.Model.PointConditions[point])); i++; } }
public override void RefreshProperties(SolidMechanicsModel model) { solidMechanicsModel.Model.Shape.Edges.Clear(); solidMechanicsModel.Model.BoundaryConditions.Clear(); foreach (Edge edge in model.Model.Shape.Edges) { solidMechanicsModel.Model.Shape.Edges.Add(edge); solidMechanicsModel.Model.BoundaryConditions.Add(edge, model.Model.BoundaryConditions[edge]); } SetBoundaryConditions(model); CurrentEdge = Edges[0]; }
public override void RefreshProperties(SolidMechanicsModel model) { solidMechanicsModel.Model.Shape.Points.Clear(); solidMechanicsModel.Model.PointConditions.Clear(); foreach (Point point in model.Model.Shape.Points) { solidMechanicsModel.Model.Shape.Points.Add(point); solidMechanicsModel.Model.PointConditions.Add(point, model.Model.PointConditions[point]); } SetPointConditions(solidMechanicsModel); CurrentPoint = Points[0]; }
protected override ObservableCollection<WizardStepViewModelBase> getSteps(SolidMechanicsModel m) { ObservableCollection<WizardStepViewModelBase> steps = new ObservableCollection<WizardStepViewModelBase>(); steps.Add(new CylindricalShapeStepViewModel(m)); steps.Add(new MaterialStepViewModel(m)); steps.Add(new PointSettingsStepViewModel(m)); steps.Add(new BoundarySettingsStepViewModel(m)); steps.Add(new InitialSettingsStepViewModel(m)); steps.Add(new MeshSettingsStepViewModel(m)); steps.Add(new SolveStepViewModel(m)); return steps; }
public PointSettingsStepViewModel(SolidMechanicsModel model) : base("Point Settings", model) { SetPointConditions(solidMechanicsModel); currentPoint = Points[0]; }
public BoundarySettingsStepViewModel(SolidMechanicsModel model):base("Boundary Settings", model) { SetBoundaryConditions(solidMechanicsModel); currentEdge = Edges[0]; }
public override void RefreshProperties(SolidMechanicsModel model) { MaxAmplitude = model.MaxAmplitude; }
public InitialSettingsStepViewModel(SolidMechanicsModel model) : base("Initial Settings", model) { }
public CylindricalShapeStepViewModel(SolidMechanicsModel model) : base(model) { }
public override void RefreshProperties(SolidMechanicsModel model) { HorizontalElements = model.HorizontalElements; }
public override void RefreshProperties(SolidMechanicsModel model) { Rho = model.Model.Material.Rho; PoissonCoef = model.Model.Material.v[0, 0]; YoungModulus = model.Model.Material.E[0]; }
public ShapeStepViewModel(SolidMechanicsModel model):base("Shape", model) { rectangle = solidMechanicsModel.Model.Shape as Rectangle; isValid = rectangle != null; }
public abstract void RefreshProperties(SolidMechanicsModel model);
protected WizardStepViewModelBase(string displayName, SolidMechanicsModel model) { this.displayName = displayName; solidMechanicsModel = model; Figures = new ObservableCollection<Shape>(); }
public RectangleMeshSettingsStepViewModel(SolidMechanicsModel model) : base("Mesh Settings", model) { }
protected abstract ObservableCollection<WizardStepViewModelBase> getSteps(SolidMechanicsModel m);
public MaterialStepViewModel(SolidMechanicsModel model):base("Material", model) { }
public virtual void Copy(SolidMechanicsModel model) { HorizontalElements = model.HorizontalElements; MaxAmplitude = model.MaxAmplitude; Model.Copy(model.Model); }
public override void RefreshProperties(SolidMechanicsModel model) { }