/// <summary>
 /// General constructor for simulation inputs
 /// </summary>
 /// <param name="meshDataInput">Input data for spatial and angular mesh</param>
 /// <param name="simulationOptionsInput">Mesh simulation options input</param>
 /// <param name="extSourceInput">Specifying external source</param>
 /// <param name="intSourceInput">Specifying internal source</param>
 /// <param name="tissueInput">Specifying tissue definition</param>
 public SimulationInput(
     SquareMeshDataInput meshDataInput,
     MeshSimulationOptions simulationOptionsInput,
     IExtFemSourceInput extSourceInput,
     IIntFemSourceInput intSourceInput,
     ITissueInput tissueInput
     )
 {
     MeshDataInput          = meshDataInput;
     SimulationOptionsInput = simulationOptionsInput;
     ExtSourceInput         = extSourceInput;
     IntSourceInput         = intSourceInput;
     TissueInput            = tissueInput;
 }
Example #2
0
        /// <summary>
        /// Get External source
        /// </summary>
        /// <param name="input">External FEM source</param>
        /// <returns>selected source</returns>
        public static IExtSource GetExtSource(IExtFemSourceInput input)
        {
            switch (input.SourceType)
            {
            case FemSourceType.ExtPointSource:
                var epsInput = (ExtPointSourceInput)input;
                return(new ExtPointSource(
                           epsInput.LaunchPoint,
                           epsInput.ThetaRange));

            case FemSourceType.ExtLineSource:
                var elsInput = (ExtLineSourceInput)input;
                return(new ExtLineSource(
                           elsInput.Start,
                           elsInput.End,
                           elsInput.ThetaRange));

            default:
                throw new NotImplementedException(
                          "Problem generating IExtSource instance. Check that IExtFemSourceInput has a matching IExtSource definition.");
            }
        }