public Model(string InputFileName) { FileName = InputFileName; Results = new OutputFileParser(this); simu = new Simulator(this); mesh = new Mesh(Path.Combine(ModelDirectory, "mesh")); Load(); Results.ReadOutputFile(Path.Combine(ModelDirectory, "ud.txt")); }
public void AdjustMesh2() { Mesh m = new Mesh(@"C:\Flemming\Model\ToughReact\Radial_CoarseModel\mesh"); List<Connection> NewConnections = new List<Connection>(); int i = 1; foreach (var v in m.Connections) { if (v.First.Name.StartsWith("A1") & v.Second.Name.StartsWith("A2") & i<25) { Connection c = new Connection(v); c.Second = m.Elements.Single(el =>el.Name=="AIR11"); NewConnections.Add(c); i++; } } m.Connections.AddRange(NewConnections); m.SaveAs(@"C:\Flemming\Model\ToughReact\Radial_CoarseModel\mesh"); }
public void SaveTest() { Mesh target = new Mesh(@"..\..\..\DotNetT2VOC.UnitTest\TestData\mesh"); // TODO: Initialize to an appropriate value target.SaveAs(@"..\..\..\DotNetT2VOC.UnitTest\TestData\mesh_new"); }
public void AdjustMesh() { Mesh m = new Mesh(@"C:\Jacob\Projects\Flemming\Model\2DFracture\mesh"); Element atm = new Element("ATM11",3,0); m.Elements.Add(atm); foreach (var v in m.Elements) { if (v.Z < -3) v.Material = 2; else v.Material = 1; if (v.X < 1.5000E-02) v.Material = 2; if (v.Z>-0.3) { Connection c = new Connection(m.Connections[1]); c.First = atm; c.Second = v; m.Connections.Add(c); } } atm.Material = 3; m.Save(); }