< Summary

Information
Class: Morpho25.Settings.OutputSettings
Assembly: Morpho25
File(s): D:\a\Morpho\Morpho\project\Morpho\Morpho25\Settings\OutputSettings.cs
Line coverage
98%
Covered lines: 83
Uncovered lines: 1
Coverable lines: 84
Total lines: 201
Line coverage: 98.8%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_NetCDF()100%1100%
get_NetCDFAllDataInOneFile()100%1100%
get_NetCDFWriteOnlySmallFiles()100%1100%
get_IncludeNestingGrid()100%1100%
get_MainFiles()100%1100%
set_MainFiles(...)100%1100%
get_TextFiles()100%1100%
set_TextFiles(...)100%1100%
get_WriteAgents()100%1100%
get_WriteAtmosphere()100%1100%
get_WriteBuildings()100%1100%
get_WriteObjects()100%1100%
get_WriteGreenpass()100%1100%
get_WriteNesting()100%1100%
get_WriteRadiation()100%1100%
get_WriteSoil()100%1100%
get_WriteSolarAccess()100%1100%
get_WriteSurface()100%1100%
get_WriteVegetation()100%1100%
.ctor()100%1100%
get_Title()100%1100%
get_Values()100%1100%
get_Tags()100%1100%
ToString()100%10%

File(s)

D:\a\Morpho\Morpho\project\Morpho\Morpho25\Settings\OutputSettings.cs

#LineLine coverage
 1using Morpho25.Geometry;
 2using System;
 3using System.Collections.Generic;
 4using System.Linq;
 5
 6
 7namespace Morpho25.Settings
 8{
 9    /// <summary>
 10    /// OutputSettings class.
 11    /// </summary>
 12    public class OutputSettings : Configuration
 13    {
 14        public const int NESTING_GRID = 0;
 15
 16        private int _mainFiles;
 17        private int _textFiles;
 18
 19        /// </summary>
 20        /// Enable NetCDF output.
 21        /// </summary>
 322        public Active NetCDF { get; set; }
 23
 24        /// <summary>
 25        /// Merge NetCDF files.
 26        /// </summary>
 327        public Active NetCDFAllDataInOneFile { get; set; }
 28
 29        /// <summary>
 30        /// NetCDF small size.
 31        /// </summary>
 332        public Active NetCDFWriteOnlySmallFiles { get; set; }
 33
 34        /// <summary>
 35        /// Include nesting grid.
 36        /// </summary>
 137        public Active IncludeNestingGrid { get; set; }
 38
 39        /// <summary>
 40        /// Decide in which output interval save output files.
 41        /// </summary>
 42        public int MainFiles
 43        {
 344            get { return _mainFiles; }
 45            set
 246            {
 247                ItIsPositive(value);
 248                _mainFiles = value;
 249            }
 50        }
 51        /// <summary>
 52        /// Decide in which output interval save receptor and building files.
 53        /// </summary>
 54        public int TextFiles
 55        {
 356            get { return _textFiles; }
 57            set
 258            {
 259                ItIsPositive(value);
 260                _textFiles = value;
 261            }
 62        }
 63
 64        /// </summary>
 65        /// Enable Agent output.
 66        /// </summary>
 567        public Active WriteAgents { get; set; }
 68
 69
 70        /// </summary>
 71        /// Enable Atmosphere output.
 72        /// </summary>
 373        public Active WriteAtmosphere { get; set; }
 74
 75        /// </summary>
 76        /// Enable Buildings output.
 77        /// </summary>
 378        public Active WriteBuildings { get; set; }
 79
 80        /// </summary>
 81        /// Enable Objects output.
 82        /// </summary>
 383        public Active WriteObjects { get; set; }
 84
 85        /// </summary>
 86        /// Enable Greenpass output.
 87        /// </summary>
 388        public Active WriteGreenpass { get; set; }
 89
 90        /// </summary>
 91        /// Enable Nesting output.
 92        /// </summary>
 393        public Active WriteNesting { get; set; }
 94
 95        /// </summary>
 96        /// Enable Radiation output.
 97        /// </summary>
 398        public Active WriteRadiation { get; set; }
 99
 100        /// </summary>
 101        /// Enable Soil output.
 102        /// </summary>
 3103        public Active WriteSoil { get; set; }
 104
 105        /// </summary>
 106        /// Enable SolarAccess output.
 107        /// </summary>
 3108        public Active WriteSolarAccess { get; set; }
 109
 110        /// </summary>
 111        /// Enable Surface output.
 112        /// </summary>
 4113        public Active WriteSurface { get; set; }
 114
 115        /// </summary>
 116        /// Enable Buildings output.
 117        /// </summary>
 3118        public Active WriteVegetation { get; set; }
 119
 120        /// <summary>
 121        /// Create new OutputSettings.
 122        /// </summary>
 2123        public OutputSettings()
 2124        {
 2125            MainFiles = 60;
 2126            TextFiles = 60;
 2127            NetCDF = Active.NO;
 2128            NetCDFAllDataInOneFile = Active.NO;
 2129            NetCDFWriteOnlySmallFiles = Active.NO;
 2130            WriteAgents = Active.NO;
 2131            WriteAtmosphere = Active.YES;
 2132            WriteBuildings = Active.YES;
 2133            WriteObjects = Active.NO;
 2134            WriteGreenpass = Active.NO;
 2135            WriteNesting = Active.NO;
 2136            WriteRadiation = Active.YES;
 2137            WriteSoil = Active.YES;
 2138            WriteSolarAccess = Active.YES;
 2139            WriteSurface = Active.YES;
 2140            WriteVegetation = Active.YES;
 2141        }
 142
 143        /// <summary>
 144        /// Title of the XML section
 145        /// </summary>
 1146        public string Title => "OutputSettings";
 147
 148        /// <summary>
 149        /// Values of the XML section
 150        /// </summary>
 1151        public string[] Values => new[] {
 1152            MainFiles.ToString(),
 1153            TextFiles.ToString(),
 1154            ((int)NetCDF).ToString(),
 1155            ((int)NetCDFAllDataInOneFile).ToString(),
 1156            ((int)NetCDFWriteOnlySmallFiles).ToString(),
 1157            ((int)IncludeNestingGrid).ToString(),
 1158            ((int)WriteAgents).ToString(),
 1159            ((int)WriteAtmosphere).ToString(),
 1160            ((int)WriteBuildings).ToString(),
 1161            ((int)WriteObjects).ToString(),
 1162            ((int)WriteGreenpass).ToString(),
 1163            ((int)WriteNesting).ToString(),
 1164            ((int)WriteRadiation).ToString(),
 1165            ((int)WriteSoil).ToString(),
 1166            ((int)WriteSolarAccess).ToString(),
 1167            ((int)WriteSurface).ToString(),
 1168            ((int)WriteVegetation).ToString(),
 1169        };
 170
 171        /// <summary>
 172        /// Tags of the XML section
 173        /// </summary>
 1174        public string[] Tags => new[] {
 1175            "mainFiles",
 1176            "textFiles",
 1177            "netCDF",
 1178            "netCDFAllDataInOneFile",
 1179            "netCDFWriteOnlySmallFile",
 1180            "inclNestingGrids",
 1181            "writeAgents",
 1182            "writeAtmosphere",
 1183            "writeBuildings",
 1184            "writeObjects",
 1185            "writeGreenpass",
 1186            "writeNesting",
 1187            "writeRadiation",
 1188            "writeSoil",
 1189            "writeSolarAccess",
 1190            "writeSurface",
 1191            "writeVegetation"
 1192        };
 193
 194        /// <summary>
 195        /// String representation of OutputSettings.
 196        /// </summary>
 197        /// <returns>String representation.</returns>
 0198        public override string ToString() => $"Config::OutputSettings::{NetCDF}";
 199    }
 200
 201}