/// <summary> /// コンパイラ /// </summary> /// <param name="reflectionLimit"></param> protected Geometry(int reflectionLimit, double reflectionCoefficient, Atom.ReflectionPattern pattern, Structure[] structures) { ReflectionLimit = reflectionLimit; ReflectionCoefficient = reflectionCoefficient; ReflectionPattern = pattern; Structures = structures; }
public Collision(int id, Atom.ReflectionPattern reflectionPattern) { IsValid = false; Time = double.NaN; Position = Vector.Zero; Normal = Vector.Zero; ReflectionPattern = reflectionPattern; StructureID = id; }
public Shield(int id, Vector position, Vector direction, double radius, Atom.ReflectionPattern reflectionPattern = Atom.ReflectionPattern.Specularly, double?reflectionCoefficient = null) { Radius = radius; Position = position; Direction = direction.Normal; ReflectionCoefficient = reflectionCoefficient; ReflectionPattern = reflectionPattern; ID = id; Collision = new Collision(ID, reflectionPattern); }
public Plate(int id, Vector position, Vector horizontalVector, Vector verticalVector, Atom.ReflectionPattern reflectionPattern, double?reflectionCoefficient = null) { ID = id; Position = position; Direction = Cross(horizontalVector, verticalVector).Normal; HorizontalVector = horizontalVector; VerticalVector = verticalVector; ReflectionCoefficient = reflectionCoefficient; ReflectionPattern = reflectionPattern; Collision = new Collision(id, reflectionPattern); }
public ProbeRotationGeometrySetting() { Geometry = new ProbeRotationGeometry ( new CylinderReflector(0, 52.5 * Vector.Back, Vector.Forward, 40, 2.5, Atom.ReflectionPattern.Specularly, 0.93), new Plate(1, Vector.Zero, (10 / 1.414213) * (Vector.Right + Vector.Forward), 20 * Vector.Up, Atom.ReflectionPattern.Specularly, 1), new Shield(2, Vector.Zero, Vector.Right, 16, 0), new Hole(3, Vector.Zero, Vector.Forward, null, Atom.ReflectionPattern.Specularly, 0), new Hole(4, Vector.Zero, Vector.Forward, null, Atom.ReflectionPattern.Specularly, 0), Atom.ReflectionPattern.Specularly ); ProbeDistance = 50; MinimumAngle = 45; MaximumAngle = 135; SimulationCount = 1000000; PlateAngle = 45; ReflectionPattern = Atom.ReflectionPattern.Specularly; }
public static string ToString(this Atom.ReflectionPattern pattern) { switch (pattern) { case Atom.ReflectionPattern.Specularly: return("鏡面反射"); case Atom.ReflectionPattern.Randomly: return("ランダム反射"); case Atom.ReflectionPattern.CosineSpecularly: return("コサイン分布反射"); case Atom.ReflectionPattern.CosineRandomly: return("コサイン分布散乱"); default: throw new NotImplementedException(); } }
public KatayamaGeometry(CylinderReflector nozzle, CylinderReflector reflector, Shield shield, Shield target, CylinderReflector chamber, Shield chamberTop, Shield chamberBottom, int limit, double reflectionCoefficient, Atom.ReflectionPattern pattern) : base(limit, reflectionCoefficient, pattern, new Structure[7]) { Nozzle = nozzle; Reflector = reflector; Shield = shield; Target = target; Chamber = chamber; ChamberTop = chamberTop; ChamberBottom = chamberBottom; }
public ProbeRotationGeometry(CylinderReflector nozzle, Plate plate, Shield probe, Hole slit1, Hole slit2, Atom.ReflectionPattern pattern) : base(100, 1, pattern, new Structure[] { nozzle, plate, probe, slit1, slit2 }) { NozzleRotation = new Rotation(Vector.Forward, nozzle.Direction); }
public CylinderGeometry(CylinderReflector cylinder, Shield bottom, double[] distribution, double time, double interval, double flux, double resolution, int count, int limit, Atom.ReflectionPattern pattern) : base(limit, 1, pattern, new Structure[2]) { Cylinder = cylinder; Bottom = bottom; Time = time; Interval = interval; Flux = flux; Count = count; Resolution = resolution; if (distribution != null) { Distribution = distribution; } else { Distribution = new double[(int)(Cylinder.Length / Resolution)]; } }
public HoleGeometry(int limit, double reflectionCoefficient, Atom.ReflectionPattern pattern, CylinderReflector nozzle, CylinderReflector subNozzle, Hole hole, Shield detector) : base(limit, reflectionCoefficient, pattern, new Structure[] { nozzle, subNozzle, hole, detector }) { }