// <auto-generated>
//     Generated by the protocol buffer compiler.  DO NOT EDIT!
//     source: spatial.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Messages {

  /// <summary>Holder for reflection information generated from spatial.proto</summary>
  public static partial class SpatialReflection {

    #region Descriptor
    /// <summary>File descriptor for spatial.proto</summary>
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static SpatialReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "Cg1zcGF0aWFsLnByb3RvEghNZXNzYWdlcxoMdmVjdG9yLnByb3RvIvkBCgRa",
            "b25lEgwKBG5hbWUYASABKAkSCgoCaWQYAiABKAUSFgoOZGltZW5zaW9uYWxp",
            "dHkYAyABKA0SJAoIcmV2aXNpb24YBCABKAsyEi5NZXNzYWdlcy5SZXZpc2lv",
            "bhIQCghlbGVtZW50cxgFIAMoDRIVCg1lbGVtZW50X2NvdW50GAYgASgNEhAK",
            "CGNvbW1lbnRzGAcgASgJEgwKBGluZm8YCCABKAkSFQoNcmVzb3VyY2VfbmFt",
            "ZRgJIAEoCRIhCgZib3VuZHMYCiABKAsyES5NZXNzYWdlcy5FeHRyZW1hEhYK",
            "DnRlcm1pbmFsX2Nvb3JkGAsgAygCIt4BCgtHcmlkQ29udHJvbBINCgViYXNp",
            "cxgBIAEoDRIMCgRzaXplGAIgAygNEg8KB3NwYWNpbmcYAyADKAESDwoHZ3Jh",
            "ZGluZxgEIAMoARIUCgxsZW5ndGhfdW5pdHMYCCABKA0SEAoIdGFyZ2V0X24Y",
            "CSABKAQSIQoGYm91bmRzGAogASgLMhEuTWVzc2FnZXMuRXh0cmVtYRISCgpz",
            "eW1tZXRyaWVzGAsgAygIEhAKCGludGVyaW9yGAwgASgIEhAKCGV4dGVyaW9y",
            "GA0gASgIEg0KBXNoZWxsGA4gASgIIvcDCgtNZXNoQ29udHJvbBIQCgh0YXJn",
            "ZXRfbhgBIAEoBBIWCg5tYXhfaXRlcmF0aW9ucxgCIAEoDRISCgpzaXplX3Jh",
            "dGlvGAMgASgBEhIKCnNpemVfZGVjYXkYBCABKAESFQoNc2l6ZV9leHBvbmVu",
            "dBgFIAEoARISCgpjdXJ2X3JhdGlvGAYgASgBEhIKCmN1cnZfZGVjYXkYByAB",
            "KAESFQoNY3Vydl9leHBvbmVudBgIIAEoARITCgtub2RlX3JhZGl1cxgJIAEo",
            "ARIhCgZib3VuZHMYCiABKAsyES5NZXNzYWdlcy5FeHRyZW1hEhQKDGxlbmd0",
            "aF91bml0cxgLIAEoDRIQCghpbnRlcmlvchgMIAEoCBIQCghleHRlcmlvchgN",
            "IAEoCBINCgVzaGVsbBgOIAEoCBIQCghlcXVhbGl6ZRgPIAEoCBIOCgZzbW9v",
            "dGgYECABKAgSGgoSaW5jbHVkZV9iYWNrZ3JvdW5kGBIgASgIEhwKFGtlZXBf",
            "ZXhpc3RpbmdfcG9pbnRzGBMgASgIEhcKD2F1dG9fZml0X2RvbWFpbhgUIAEo",
            "CBIgChhib3VuZGFyeV9sYXllcl90aGlja25lc3MYFyABKAESEgoKc3ltbWV0",
            "cmllcxgYIAMoCBIUCgxiYWNrZ3JvdW5kX24YHiABKAQimgEKC1RyZWVDb250",
            "cm9sEhEKCW1pbl9kZXB0aBgBIAEoDRIRCgltYXhfZGVwdGgYAiABKA0SEAoI",
            "bWF4X3NpemUYAyABKAQSGgoScmVmX2RpbWVuc2lvbmFsaXR5GAcgASgNEhQK",
            "DGxlbmd0aF91bml0cxgIIAEoDRIhCgZib3VuZHMYCiABKAsyES5NZXNzYWdl",
            "cy5FeHRyZW1hIusDCghUb3BvbG9neRIMCgRuYW1lGAEgASgJEgwKBHR5cGUY",
            "AiABKA0SDAoEbmRpbRgDIAEoDRINCgViYXNpcxgEIAEoDRIQCghmaWxlbmFt",
            "ZRgFIAEoCRIkCghyZXZpc2lvbhgGIAEoCzISLk1lc3NhZ2VzLlJldmlzaW9u",
            "EgwKBGluZm8YByABKAkSIQoFbm9kZXMYCiABKAsyEi5NZXNzYWdlcy5FbGVt",
            "ZW50cxIhCgVlZGdlcxgLIAEoCzISLk1lc3NhZ2VzLkVsZW1lbnRzEiEKBWZh",
            "Y2VzGAwgASgLMhIuTWVzc2FnZXMuRWxlbWVudHMSIQoFY2VsbHMYDSABKAsy",
            "Ei5NZXNzYWdlcy5FbGVtZW50cxIgCgRkYXRhGA8gASgLMhIuTWVzc2FnZXMu",
            "UmVjb3JkNjQSKwoLc3BhcnNlX2RhdGEYECADKAsyFi5NZXNzYWdlcy5TcGFy",
            "c2VNYXRyaXgSKwoMZ3JpZF9jb250cm9sGBQgASgLMhUuTWVzc2FnZXMuR3Jp",
            "ZENvbnRyb2wSKwoMbWVzaF9jb250cm9sGBUgASgLMhUuTWVzc2FnZXMuTWVz",
            "aENvbnRyb2wSKwoMdHJlZV9jb250cm9sGBYgASgLMhUuTWVzc2FnZXMuVHJl",
            "ZUNvbnRyb2xiBnByb3RvMw=="));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::Messages.VectorReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Messages.Zone), global::Messages.Zone.Parser, new[]{ "Name", "Id", "Dimensionality", "Revision", "Elements", "ElementCount", "Comments", "Info", "ResourceName", "Bounds", "TerminalCoord" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Messages.GridControl), global::Messages.GridControl.Parser, new[]{ "Basis", "Size", "Spacing", "Grading", "LengthUnits", "TargetN", "Bounds", "Symmetries", "Interior", "Exterior", "Shell" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Messages.MeshControl), global::Messages.MeshControl.Parser, new[]{ "TargetN", "MaxIterations", "SizeRatio", "SizeDecay", "SizeExponent", "CurvRatio", "CurvDecay", "CurvExponent", "NodeRadius", "Bounds", "LengthUnits", "Interior", "Exterior", "Shell", "Equalize", "Smooth", "IncludeBackground", "KeepExistingPoints", "AutoFitDomain", "BoundaryLayerThickness", "Symmetries", "BackgroundN" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Messages.TreeControl), global::Messages.TreeControl.Parser, new[]{ "MinDepth", "MaxDepth", "MaxSize", "RefDimensionality", "LengthUnits", "Bounds" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::Messages.Topology), global::Messages.Topology.Parser, new[]{ "Name", "Type", "Ndim", "Basis", "Filename", "Revision", "Info", "Nodes", "Edges", "Faces", "Cells", "Data", "SparseData", "GridControl", "MeshControl", "TreeControl" }, null, null, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  public sealed partial class Zone : pb::IMessage<Zone>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<Zone> _parser = new pb::MessageParser<Zone>(() => new Zone());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<Zone> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Messages.SpatialReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public Zone() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public Zone(Zone other) : this() {
      name_ = other.name_;
      id_ = other.id_;
      dimensionality_ = other.dimensionality_;
      revision_ = other.revision_ != null ? other.revision_.Clone() : null;
      elements_ = other.elements_.Clone();
      elementCount_ = other.elementCount_;
      comments_ = other.comments_;
      info_ = other.info_;
      resourceName_ = other.resourceName_;
      bounds_ = other.bounds_ != null ? other.bounds_.Clone() : null;
      terminalCoord_ = other.terminalCoord_.Clone();
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public Zone Clone() {
      return new Zone(this);
    }

    /// <summary>Field number for the "name" field.</summary>
    public const int NameFieldNumber = 1;
    private string name_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Name {
      get { return name_; }
      set {
        name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "id" field.</summary>
    public const int IdFieldNumber = 2;
    private int id_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int Id {
      get { return id_; }
      set {
        id_ = value;
      }
    }

    /// <summary>Field number for the "dimensionality" field.</summary>
    public const int DimensionalityFieldNumber = 3;
    private uint dimensionality_;
    /// <summary>
    ///0:node-group, 1:edge-loop, 2:face-surface, 3:cell-volume
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Dimensionality {
      get { return dimensionality_; }
      set {
        dimensionality_ = value;
      }
    }

    /// <summary>Field number for the "revision" field.</summary>
    public const int RevisionFieldNumber = 4;
    private global::Messages.Revision revision_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Messages.Revision Revision {
      get { return revision_; }
      set {
        revision_ = value;
      }
    }

    /// <summary>Field number for the "elements" field.</summary>
    public const int ElementsFieldNumber = 5;
    private static readonly pb::FieldCodec<uint> _repeated_elements_codec
        = pb::FieldCodec.ForUInt32(42);
    private readonly pbc::RepeatedField<uint> elements_ = new pbc::RepeatedField<uint>();
    /// <summary>
    ///optional set of element indices (else, all by this id)
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<uint> Elements {
      get { return elements_; }
    }

    /// <summary>Field number for the "element_count" field.</summary>
    public const int ElementCountFieldNumber = 6;
    private uint elementCount_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint ElementCount {
      get { return elementCount_; }
      set {
        elementCount_ = value;
      }
    }

    /// <summary>Field number for the "comments" field.</summary>
    public const int CommentsFieldNumber = 7;
    private string comments_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Comments {
      get { return comments_; }
      set {
        comments_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "info" field.</summary>
    public const int InfoFieldNumber = 8;
    private string info_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Info {
      get { return info_; }
      set {
        info_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "resource_name" field.</summary>
    public const int ResourceNameFieldNumber = 9;
    private string resourceName_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string ResourceName {
      get { return resourceName_; }
      set {
        resourceName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "bounds" field.</summary>
    public const int BoundsFieldNumber = 10;
    private global::Messages.Extrema bounds_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Messages.Extrema Bounds {
      get { return bounds_; }
      set {
        bounds_ = value;
      }
    }

    /// <summary>Field number for the "terminal_coord" field.</summary>
    public const int TerminalCoordFieldNumber = 11;
    private static readonly pb::FieldCodec<float> _repeated_terminalCoord_codec
        = pb::FieldCodec.ForFloat(90);
    private readonly pbc::RepeatedField<float> terminalCoord_ = new pbc::RepeatedField<float>();
    /// <summary>
    ///in symbol icon's coordinates [0,1]
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<float> TerminalCoord {
      get { return terminalCoord_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as Zone);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(Zone other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Name != other.Name) return false;
      if (Id != other.Id) return false;
      if (Dimensionality != other.Dimensionality) return false;
      if (!object.Equals(Revision, other.Revision)) return false;
      if(!elements_.Equals(other.elements_)) return false;
      if (ElementCount != other.ElementCount) return false;
      if (Comments != other.Comments) return false;
      if (Info != other.Info) return false;
      if (ResourceName != other.ResourceName) return false;
      if (!object.Equals(Bounds, other.Bounds)) return false;
      if(!terminalCoord_.Equals(other.terminalCoord_)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (Name.Length != 0) hash ^= Name.GetHashCode();
      if (Id != 0) hash ^= Id.GetHashCode();
      if (Dimensionality != 0) hash ^= Dimensionality.GetHashCode();
      if (revision_ != null) hash ^= Revision.GetHashCode();
      hash ^= elements_.GetHashCode();
      if (ElementCount != 0) hash ^= ElementCount.GetHashCode();
      if (Comments.Length != 0) hash ^= Comments.GetHashCode();
      if (Info.Length != 0) hash ^= Info.GetHashCode();
      if (ResourceName.Length != 0) hash ^= ResourceName.GetHashCode();
      if (bounds_ != null) hash ^= Bounds.GetHashCode();
      hash ^= terminalCoord_.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (Name.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Name);
      }
      if (Id != 0) {
        output.WriteRawTag(16);
        output.WriteInt32(Id);
      }
      if (Dimensionality != 0) {
        output.WriteRawTag(24);
        output.WriteUInt32(Dimensionality);
      }
      if (revision_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(Revision);
      }
      elements_.WriteTo(output, _repeated_elements_codec);
      if (ElementCount != 0) {
        output.WriteRawTag(48);
        output.WriteUInt32(ElementCount);
      }
      if (Comments.Length != 0) {
        output.WriteRawTag(58);
        output.WriteString(Comments);
      }
      if (Info.Length != 0) {
        output.WriteRawTag(66);
        output.WriteString(Info);
      }
      if (ResourceName.Length != 0) {
        output.WriteRawTag(74);
        output.WriteString(ResourceName);
      }
      if (bounds_ != null) {
        output.WriteRawTag(82);
        output.WriteMessage(Bounds);
      }
      terminalCoord_.WriteTo(output, _repeated_terminalCoord_codec);
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (Name.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Name);
      }
      if (Id != 0) {
        output.WriteRawTag(16);
        output.WriteInt32(Id);
      }
      if (Dimensionality != 0) {
        output.WriteRawTag(24);
        output.WriteUInt32(Dimensionality);
      }
      if (revision_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(Revision);
      }
      elements_.WriteTo(ref output, _repeated_elements_codec);
      if (ElementCount != 0) {
        output.WriteRawTag(48);
        output.WriteUInt32(ElementCount);
      }
      if (Comments.Length != 0) {
        output.WriteRawTag(58);
        output.WriteString(Comments);
      }
      if (Info.Length != 0) {
        output.WriteRawTag(66);
        output.WriteString(Info);
      }
      if (ResourceName.Length != 0) {
        output.WriteRawTag(74);
        output.WriteString(ResourceName);
      }
      if (bounds_ != null) {
        output.WriteRawTag(82);
        output.WriteMessage(Bounds);
      }
      terminalCoord_.WriteTo(ref output, _repeated_terminalCoord_codec);
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (Name.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
      }
      if (Id != 0) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id);
      }
      if (Dimensionality != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Dimensionality);
      }
      if (revision_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Revision);
      }
      size += elements_.CalculateSize(_repeated_elements_codec);
      if (ElementCount != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(ElementCount);
      }
      if (Comments.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Comments);
      }
      if (Info.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Info);
      }
      if (ResourceName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(ResourceName);
      }
      if (bounds_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Bounds);
      }
      size += terminalCoord_.CalculateSize(_repeated_terminalCoord_codec);
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(Zone other) {
      if (other == null) {
        return;
      }
      if (other.Name.Length != 0) {
        Name = other.Name;
      }
      if (other.Id != 0) {
        Id = other.Id;
      }
      if (other.Dimensionality != 0) {
        Dimensionality = other.Dimensionality;
      }
      if (other.revision_ != null) {
        if (revision_ == null) {
          Revision = new global::Messages.Revision();
        }
        Revision.MergeFrom(other.Revision);
      }
      elements_.Add(other.elements_);
      if (other.ElementCount != 0) {
        ElementCount = other.ElementCount;
      }
      if (other.Comments.Length != 0) {
        Comments = other.Comments;
      }
      if (other.Info.Length != 0) {
        Info = other.Info;
      }
      if (other.ResourceName.Length != 0) {
        ResourceName = other.ResourceName;
      }
      if (other.bounds_ != null) {
        if (bounds_ == null) {
          Bounds = new global::Messages.Extrema();
        }
        Bounds.MergeFrom(other.Bounds);
      }
      terminalCoord_.Add(other.terminalCoord_);
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            Name = input.ReadString();
            break;
          }
          case 16: {
            Id = input.ReadInt32();
            break;
          }
          case 24: {
            Dimensionality = input.ReadUInt32();
            break;
          }
          case 34: {
            if (revision_ == null) {
              Revision = new global::Messages.Revision();
            }
            input.ReadMessage(Revision);
            break;
          }
          case 42:
          case 40: {
            elements_.AddEntriesFrom(input, _repeated_elements_codec);
            break;
          }
          case 48: {
            ElementCount = input.ReadUInt32();
            break;
          }
          case 58: {
            Comments = input.ReadString();
            break;
          }
          case 66: {
            Info = input.ReadString();
            break;
          }
          case 74: {
            ResourceName = input.ReadString();
            break;
          }
          case 82: {
            if (bounds_ == null) {
              Bounds = new global::Messages.Extrema();
            }
            input.ReadMessage(Bounds);
            break;
          }
          case 90:
          case 93: {
            terminalCoord_.AddEntriesFrom(input, _repeated_terminalCoord_codec);
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            Name = input.ReadString();
            break;
          }
          case 16: {
            Id = input.ReadInt32();
            break;
          }
          case 24: {
            Dimensionality = input.ReadUInt32();
            break;
          }
          case 34: {
            if (revision_ == null) {
              Revision = new global::Messages.Revision();
            }
            input.ReadMessage(Revision);
            break;
          }
          case 42:
          case 40: {
            elements_.AddEntriesFrom(ref input, _repeated_elements_codec);
            break;
          }
          case 48: {
            ElementCount = input.ReadUInt32();
            break;
          }
          case 58: {
            Comments = input.ReadString();
            break;
          }
          case 66: {
            Info = input.ReadString();
            break;
          }
          case 74: {
            ResourceName = input.ReadString();
            break;
          }
          case 82: {
            if (bounds_ == null) {
              Bounds = new global::Messages.Extrema();
            }
            input.ReadMessage(Bounds);
            break;
          }
          case 90:
          case 93: {
            terminalCoord_.AddEntriesFrom(ref input, _repeated_terminalCoord_codec);
            break;
          }
        }
      }
    }
    #endif

  }

  public sealed partial class GridControl : pb::IMessage<GridControl>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<GridControl> _parser = new pb::MessageParser<GridControl>(() => new GridControl());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<GridControl> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Messages.SpatialReflection.Descriptor.MessageTypes[1]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GridControl() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GridControl(GridControl other) : this() {
      basis_ = other.basis_;
      size_ = other.size_.Clone();
      spacing_ = other.spacing_.Clone();
      grading_ = other.grading_.Clone();
      lengthUnits_ = other.lengthUnits_;
      targetN_ = other.targetN_;
      bounds_ = other.bounds_ != null ? other.bounds_.Clone() : null;
      symmetries_ = other.symmetries_.Clone();
      interior_ = other.interior_;
      exterior_ = other.exterior_;
      shell_ = other.shell_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public GridControl Clone() {
      return new GridControl(this);
    }

    /// <summary>Field number for the "basis" field.</summary>
    public const int BasisFieldNumber = 1;
    private uint basis_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Basis {
      get { return basis_; }
      set {
        basis_ = value;
      }
    }

    /// <summary>Field number for the "size" field.</summary>
    public const int SizeFieldNumber = 2;
    private static readonly pb::FieldCodec<uint> _repeated_size_codec
        = pb::FieldCodec.ForUInt32(18);
    private readonly pbc::RepeatedField<uint> size_ = new pbc::RepeatedField<uint>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<uint> Size {
      get { return size_; }
    }

    /// <summary>Field number for the "spacing" field.</summary>
    public const int SpacingFieldNumber = 3;
    private static readonly pb::FieldCodec<double> _repeated_spacing_codec
        = pb::FieldCodec.ForDouble(26);
    private readonly pbc::RepeatedField<double> spacing_ = new pbc::RepeatedField<double>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<double> Spacing {
      get { return spacing_; }
    }

    /// <summary>Field number for the "grading" field.</summary>
    public const int GradingFieldNumber = 4;
    private static readonly pb::FieldCodec<double> _repeated_grading_codec
        = pb::FieldCodec.ForDouble(34);
    private readonly pbc::RepeatedField<double> grading_ = new pbc::RepeatedField<double>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<double> Grading {
      get { return grading_; }
    }

    /// <summary>Field number for the "length_units" field.</summary>
    public const int LengthUnitsFieldNumber = 8;
    private uint lengthUnits_;
    /// <summary>
    /// 0-7: mm, cm, m, km, in, ft, yd, mi (defined in common/space.h)       
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint LengthUnits {
      get { return lengthUnits_; }
      set {
        lengthUnits_ = value;
      }
    }

    /// <summary>Field number for the "target_n" field.</summary>
    public const int TargetNFieldNumber = 9;
    private ulong targetN_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ulong TargetN {
      get { return targetN_; }
      set {
        targetN_ = value;
      }
    }

    /// <summary>Field number for the "bounds" field.</summary>
    public const int BoundsFieldNumber = 10;
    private global::Messages.Extrema bounds_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Messages.Extrema Bounds {
      get { return bounds_; }
      set {
        bounds_ = value;
      }
    }

    /// <summary>Field number for the "symmetries" field.</summary>
    public const int SymmetriesFieldNumber = 11;
    private static readonly pb::FieldCodec<bool> _repeated_symmetries_codec
        = pb::FieldCodec.ForBool(90);
    private readonly pbc::RepeatedField<bool> symmetries_ = new pbc::RepeatedField<bool>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<bool> Symmetries {
      get { return symmetries_; }
    }

    /// <summary>Field number for the "interior" field.</summary>
    public const int InteriorFieldNumber = 12;
    private bool interior_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Interior {
      get { return interior_; }
      set {
        interior_ = value;
      }
    }

    /// <summary>Field number for the "exterior" field.</summary>
    public const int ExteriorFieldNumber = 13;
    private bool exterior_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Exterior {
      get { return exterior_; }
      set {
        exterior_ = value;
      }
    }

    /// <summary>Field number for the "shell" field.</summary>
    public const int ShellFieldNumber = 14;
    private bool shell_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Shell {
      get { return shell_; }
      set {
        shell_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as GridControl);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(GridControl other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Basis != other.Basis) return false;
      if(!size_.Equals(other.size_)) return false;
      if(!spacing_.Equals(other.spacing_)) return false;
      if(!grading_.Equals(other.grading_)) return false;
      if (LengthUnits != other.LengthUnits) return false;
      if (TargetN != other.TargetN) return false;
      if (!object.Equals(Bounds, other.Bounds)) return false;
      if(!symmetries_.Equals(other.symmetries_)) return false;
      if (Interior != other.Interior) return false;
      if (Exterior != other.Exterior) return false;
      if (Shell != other.Shell) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (Basis != 0) hash ^= Basis.GetHashCode();
      hash ^= size_.GetHashCode();
      hash ^= spacing_.GetHashCode();
      hash ^= grading_.GetHashCode();
      if (LengthUnits != 0) hash ^= LengthUnits.GetHashCode();
      if (TargetN != 0UL) hash ^= TargetN.GetHashCode();
      if (bounds_ != null) hash ^= Bounds.GetHashCode();
      hash ^= symmetries_.GetHashCode();
      if (Interior != false) hash ^= Interior.GetHashCode();
      if (Exterior != false) hash ^= Exterior.GetHashCode();
      if (Shell != false) hash ^= Shell.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (Basis != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(Basis);
      }
      size_.WriteTo(output, _repeated_size_codec);
      spacing_.WriteTo(output, _repeated_spacing_codec);
      grading_.WriteTo(output, _repeated_grading_codec);
      if (LengthUnits != 0) {
        output.WriteRawTag(64);
        output.WriteUInt32(LengthUnits);
      }
      if (TargetN != 0UL) {
        output.WriteRawTag(72);
        output.WriteUInt64(TargetN);
      }
      if (bounds_ != null) {
        output.WriteRawTag(82);
        output.WriteMessage(Bounds);
      }
      symmetries_.WriteTo(output, _repeated_symmetries_codec);
      if (Interior != false) {
        output.WriteRawTag(96);
        output.WriteBool(Interior);
      }
      if (Exterior != false) {
        output.WriteRawTag(104);
        output.WriteBool(Exterior);
      }
      if (Shell != false) {
        output.WriteRawTag(112);
        output.WriteBool(Shell);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (Basis != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(Basis);
      }
      size_.WriteTo(ref output, _repeated_size_codec);
      spacing_.WriteTo(ref output, _repeated_spacing_codec);
      grading_.WriteTo(ref output, _repeated_grading_codec);
      if (LengthUnits != 0) {
        output.WriteRawTag(64);
        output.WriteUInt32(LengthUnits);
      }
      if (TargetN != 0UL) {
        output.WriteRawTag(72);
        output.WriteUInt64(TargetN);
      }
      if (bounds_ != null) {
        output.WriteRawTag(82);
        output.WriteMessage(Bounds);
      }
      symmetries_.WriteTo(ref output, _repeated_symmetries_codec);
      if (Interior != false) {
        output.WriteRawTag(96);
        output.WriteBool(Interior);
      }
      if (Exterior != false) {
        output.WriteRawTag(104);
        output.WriteBool(Exterior);
      }
      if (Shell != false) {
        output.WriteRawTag(112);
        output.WriteBool(Shell);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (Basis != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Basis);
      }
      size += size_.CalculateSize(_repeated_size_codec);
      size += spacing_.CalculateSize(_repeated_spacing_codec);
      size += grading_.CalculateSize(_repeated_grading_codec);
      if (LengthUnits != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(LengthUnits);
      }
      if (TargetN != 0UL) {
        size += 1 + pb::CodedOutputStream.ComputeUInt64Size(TargetN);
      }
      if (bounds_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Bounds);
      }
      size += symmetries_.CalculateSize(_repeated_symmetries_codec);
      if (Interior != false) {
        size += 1 + 1;
      }
      if (Exterior != false) {
        size += 1 + 1;
      }
      if (Shell != false) {
        size += 1 + 1;
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(GridControl other) {
      if (other == null) {
        return;
      }
      if (other.Basis != 0) {
        Basis = other.Basis;
      }
      size_.Add(other.size_);
      spacing_.Add(other.spacing_);
      grading_.Add(other.grading_);
      if (other.LengthUnits != 0) {
        LengthUnits = other.LengthUnits;
      }
      if (other.TargetN != 0UL) {
        TargetN = other.TargetN;
      }
      if (other.bounds_ != null) {
        if (bounds_ == null) {
          Bounds = new global::Messages.Extrema();
        }
        Bounds.MergeFrom(other.Bounds);
      }
      symmetries_.Add(other.symmetries_);
      if (other.Interior != false) {
        Interior = other.Interior;
      }
      if (other.Exterior != false) {
        Exterior = other.Exterior;
      }
      if (other.Shell != false) {
        Shell = other.Shell;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 8: {
            Basis = input.ReadUInt32();
            break;
          }
          case 18:
          case 16: {
            size_.AddEntriesFrom(input, _repeated_size_codec);
            break;
          }
          case 26:
          case 25: {
            spacing_.AddEntriesFrom(input, _repeated_spacing_codec);
            break;
          }
          case 34:
          case 33: {
            grading_.AddEntriesFrom(input, _repeated_grading_codec);
            break;
          }
          case 64: {
            LengthUnits = input.ReadUInt32();
            break;
          }
          case 72: {
            TargetN = input.ReadUInt64();
            break;
          }
          case 82: {
            if (bounds_ == null) {
              Bounds = new global::Messages.Extrema();
            }
            input.ReadMessage(Bounds);
            break;
          }
          case 90:
          case 88: {
            symmetries_.AddEntriesFrom(input, _repeated_symmetries_codec);
            break;
          }
          case 96: {
            Interior = input.ReadBool();
            break;
          }
          case 104: {
            Exterior = input.ReadBool();
            break;
          }
          case 112: {
            Shell = input.ReadBool();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 8: {
            Basis = input.ReadUInt32();
            break;
          }
          case 18:
          case 16: {
            size_.AddEntriesFrom(ref input, _repeated_size_codec);
            break;
          }
          case 26:
          case 25: {
            spacing_.AddEntriesFrom(ref input, _repeated_spacing_codec);
            break;
          }
          case 34:
          case 33: {
            grading_.AddEntriesFrom(ref input, _repeated_grading_codec);
            break;
          }
          case 64: {
            LengthUnits = input.ReadUInt32();
            break;
          }
          case 72: {
            TargetN = input.ReadUInt64();
            break;
          }
          case 82: {
            if (bounds_ == null) {
              Bounds = new global::Messages.Extrema();
            }
            input.ReadMessage(Bounds);
            break;
          }
          case 90:
          case 88: {
            symmetries_.AddEntriesFrom(ref input, _repeated_symmetries_codec);
            break;
          }
          case 96: {
            Interior = input.ReadBool();
            break;
          }
          case 104: {
            Exterior = input.ReadBool();
            break;
          }
          case 112: {
            Shell = input.ReadBool();
            break;
          }
        }
      }
    }
    #endif

  }

  public sealed partial class MeshControl : pb::IMessage<MeshControl>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<MeshControl> _parser = new pb::MessageParser<MeshControl>(() => new MeshControl());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<MeshControl> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Messages.SpatialReflection.Descriptor.MessageTypes[2]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MeshControl() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MeshControl(MeshControl other) : this() {
      targetN_ = other.targetN_;
      maxIterations_ = other.maxIterations_;
      sizeRatio_ = other.sizeRatio_;
      sizeDecay_ = other.sizeDecay_;
      sizeExponent_ = other.sizeExponent_;
      curvRatio_ = other.curvRatio_;
      curvDecay_ = other.curvDecay_;
      curvExponent_ = other.curvExponent_;
      nodeRadius_ = other.nodeRadius_;
      bounds_ = other.bounds_ != null ? other.bounds_.Clone() : null;
      lengthUnits_ = other.lengthUnits_;
      interior_ = other.interior_;
      exterior_ = other.exterior_;
      shell_ = other.shell_;
      equalize_ = other.equalize_;
      smooth_ = other.smooth_;
      includeBackground_ = other.includeBackground_;
      keepExistingPoints_ = other.keepExistingPoints_;
      autoFitDomain_ = other.autoFitDomain_;
      boundaryLayerThickness_ = other.boundaryLayerThickness_;
      symmetries_ = other.symmetries_.Clone();
      backgroundN_ = other.backgroundN_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public MeshControl Clone() {
      return new MeshControl(this);
    }

    /// <summary>Field number for the "target_n" field.</summary>
    public const int TargetNFieldNumber = 1;
    private ulong targetN_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ulong TargetN {
      get { return targetN_; }
      set {
        targetN_ = value;
      }
    }

    /// <summary>Field number for the "max_iterations" field.</summary>
    public const int MaxIterationsFieldNumber = 2;
    private uint maxIterations_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint MaxIterations {
      get { return maxIterations_; }
      set {
        maxIterations_ = value;
      }
    }

    /// <summary>Field number for the "size_ratio" field.</summary>
    public const int SizeRatioFieldNumber = 3;
    private double sizeRatio_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public double SizeRatio {
      get { return sizeRatio_; }
      set {
        sizeRatio_ = value;
      }
    }

    /// <summary>Field number for the "size_decay" field.</summary>
    public const int SizeDecayFieldNumber = 4;
    private double sizeDecay_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public double SizeDecay {
      get { return sizeDecay_; }
      set {
        sizeDecay_ = value;
      }
    }

    /// <summary>Field number for the "size_exponent" field.</summary>
    public const int SizeExponentFieldNumber = 5;
    private double sizeExponent_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public double SizeExponent {
      get { return sizeExponent_; }
      set {
        sizeExponent_ = value;
      }
    }

    /// <summary>Field number for the "curv_ratio" field.</summary>
    public const int CurvRatioFieldNumber = 6;
    private double curvRatio_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public double CurvRatio {
      get { return curvRatio_; }
      set {
        curvRatio_ = value;
      }
    }

    /// <summary>Field number for the "curv_decay" field.</summary>
    public const int CurvDecayFieldNumber = 7;
    private double curvDecay_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public double CurvDecay {
      get { return curvDecay_; }
      set {
        curvDecay_ = value;
      }
    }

    /// <summary>Field number for the "curv_exponent" field.</summary>
    public const int CurvExponentFieldNumber = 8;
    private double curvExponent_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public double CurvExponent {
      get { return curvExponent_; }
      set {
        curvExponent_ = value;
      }
    }

    /// <summary>Field number for the "node_radius" field.</summary>
    public const int NodeRadiusFieldNumber = 9;
    private double nodeRadius_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public double NodeRadius {
      get { return nodeRadius_; }
      set {
        nodeRadius_ = value;
      }
    }

    /// <summary>Field number for the "bounds" field.</summary>
    public const int BoundsFieldNumber = 10;
    private global::Messages.Extrema bounds_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Messages.Extrema Bounds {
      get { return bounds_; }
      set {
        bounds_ = value;
      }
    }

    /// <summary>Field number for the "length_units" field.</summary>
    public const int LengthUnitsFieldNumber = 11;
    private uint lengthUnits_;
    /// <summary>
    /// 0-7: mm, cm, m, km, in, ft, yd, mi (defined in common/space.h)       
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint LengthUnits {
      get { return lengthUnits_; }
      set {
        lengthUnits_ = value;
      }
    }

    /// <summary>Field number for the "interior" field.</summary>
    public const int InteriorFieldNumber = 12;
    private bool interior_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Interior {
      get { return interior_; }
      set {
        interior_ = value;
      }
    }

    /// <summary>Field number for the "exterior" field.</summary>
    public const int ExteriorFieldNumber = 13;
    private bool exterior_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Exterior {
      get { return exterior_; }
      set {
        exterior_ = value;
      }
    }

    /// <summary>Field number for the "shell" field.</summary>
    public const int ShellFieldNumber = 14;
    private bool shell_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Shell {
      get { return shell_; }
      set {
        shell_ = value;
      }
    }

    /// <summary>Field number for the "equalize" field.</summary>
    public const int EqualizeFieldNumber = 15;
    private bool equalize_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equalize {
      get { return equalize_; }
      set {
        equalize_ = value;
      }
    }

    /// <summary>Field number for the "smooth" field.</summary>
    public const int SmoothFieldNumber = 16;
    private bool smooth_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Smooth {
      get { return smooth_; }
      set {
        smooth_ = value;
      }
    }

    /// <summary>Field number for the "include_background" field.</summary>
    public const int IncludeBackgroundFieldNumber = 18;
    private bool includeBackground_;
    /// <summary>
    ///reserved
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool IncludeBackground {
      get { return includeBackground_; }
      set {
        includeBackground_ = value;
      }
    }

    /// <summary>Field number for the "keep_existing_points" field.</summary>
    public const int KeepExistingPointsFieldNumber = 19;
    private bool keepExistingPoints_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool KeepExistingPoints {
      get { return keepExistingPoints_; }
      set {
        keepExistingPoints_ = value;
      }
    }

    /// <summary>Field number for the "auto_fit_domain" field.</summary>
    public const int AutoFitDomainFieldNumber = 20;
    private bool autoFitDomain_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool AutoFitDomain {
      get { return autoFitDomain_; }
      set {
        autoFitDomain_ = value;
      }
    }

    /// <summary>Field number for the "boundary_layer_thickness" field.</summary>
    public const int BoundaryLayerThicknessFieldNumber = 23;
    private double boundaryLayerThickness_;
    /// <summary>
    ///reserved
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public double BoundaryLayerThickness {
      get { return boundaryLayerThickness_; }
      set {
        boundaryLayerThickness_ = value;
      }
    }

    /// <summary>Field number for the "symmetries" field.</summary>
    public const int SymmetriesFieldNumber = 24;
    private static readonly pb::FieldCodec<bool> _repeated_symmetries_codec
        = pb::FieldCodec.ForBool(194);
    private readonly pbc::RepeatedField<bool> symmetries_ = new pbc::RepeatedField<bool>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<bool> Symmetries {
      get { return symmetries_; }
    }

    /// <summary>Field number for the "background_n" field.</summary>
    public const int BackgroundNFieldNumber = 30;
    private ulong backgroundN_;
    /// <summary>
    ///reserved
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ulong BackgroundN {
      get { return backgroundN_; }
      set {
        backgroundN_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as MeshControl);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(MeshControl other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (TargetN != other.TargetN) return false;
      if (MaxIterations != other.MaxIterations) return false;
      if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(SizeRatio, other.SizeRatio)) return false;
      if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(SizeDecay, other.SizeDecay)) return false;
      if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(SizeExponent, other.SizeExponent)) return false;
      if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(CurvRatio, other.CurvRatio)) return false;
      if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(CurvDecay, other.CurvDecay)) return false;
      if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(CurvExponent, other.CurvExponent)) return false;
      if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(NodeRadius, other.NodeRadius)) return false;
      if (!object.Equals(Bounds, other.Bounds)) return false;
      if (LengthUnits != other.LengthUnits) return false;
      if (Interior != other.Interior) return false;
      if (Exterior != other.Exterior) return false;
      if (Shell != other.Shell) return false;
      if (Equalize != other.Equalize) return false;
      if (Smooth != other.Smooth) return false;
      if (IncludeBackground != other.IncludeBackground) return false;
      if (KeepExistingPoints != other.KeepExistingPoints) return false;
      if (AutoFitDomain != other.AutoFitDomain) return false;
      if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(BoundaryLayerThickness, other.BoundaryLayerThickness)) return false;
      if(!symmetries_.Equals(other.symmetries_)) return false;
      if (BackgroundN != other.BackgroundN) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (TargetN != 0UL) hash ^= TargetN.GetHashCode();
      if (MaxIterations != 0) hash ^= MaxIterations.GetHashCode();
      if (SizeRatio != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(SizeRatio);
      if (SizeDecay != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(SizeDecay);
      if (SizeExponent != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(SizeExponent);
      if (CurvRatio != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(CurvRatio);
      if (CurvDecay != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(CurvDecay);
      if (CurvExponent != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(CurvExponent);
      if (NodeRadius != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(NodeRadius);
      if (bounds_ != null) hash ^= Bounds.GetHashCode();
      if (LengthUnits != 0) hash ^= LengthUnits.GetHashCode();
      if (Interior != false) hash ^= Interior.GetHashCode();
      if (Exterior != false) hash ^= Exterior.GetHashCode();
      if (Shell != false) hash ^= Shell.GetHashCode();
      if (Equalize != false) hash ^= Equalize.GetHashCode();
      if (Smooth != false) hash ^= Smooth.GetHashCode();
      if (IncludeBackground != false) hash ^= IncludeBackground.GetHashCode();
      if (KeepExistingPoints != false) hash ^= KeepExistingPoints.GetHashCode();
      if (AutoFitDomain != false) hash ^= AutoFitDomain.GetHashCode();
      if (BoundaryLayerThickness != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(BoundaryLayerThickness);
      hash ^= symmetries_.GetHashCode();
      if (BackgroundN != 0UL) hash ^= BackgroundN.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (TargetN != 0UL) {
        output.WriteRawTag(8);
        output.WriteUInt64(TargetN);
      }
      if (MaxIterations != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(MaxIterations);
      }
      if (SizeRatio != 0D) {
        output.WriteRawTag(25);
        output.WriteDouble(SizeRatio);
      }
      if (SizeDecay != 0D) {
        output.WriteRawTag(33);
        output.WriteDouble(SizeDecay);
      }
      if (SizeExponent != 0D) {
        output.WriteRawTag(41);
        output.WriteDouble(SizeExponent);
      }
      if (CurvRatio != 0D) {
        output.WriteRawTag(49);
        output.WriteDouble(CurvRatio);
      }
      if (CurvDecay != 0D) {
        output.WriteRawTag(57);
        output.WriteDouble(CurvDecay);
      }
      if (CurvExponent != 0D) {
        output.WriteRawTag(65);
        output.WriteDouble(CurvExponent);
      }
      if (NodeRadius != 0D) {
        output.WriteRawTag(73);
        output.WriteDouble(NodeRadius);
      }
      if (bounds_ != null) {
        output.WriteRawTag(82);
        output.WriteMessage(Bounds);
      }
      if (LengthUnits != 0) {
        output.WriteRawTag(88);
        output.WriteUInt32(LengthUnits);
      }
      if (Interior != false) {
        output.WriteRawTag(96);
        output.WriteBool(Interior);
      }
      if (Exterior != false) {
        output.WriteRawTag(104);
        output.WriteBool(Exterior);
      }
      if (Shell != false) {
        output.WriteRawTag(112);
        output.WriteBool(Shell);
      }
      if (Equalize != false) {
        output.WriteRawTag(120);
        output.WriteBool(Equalize);
      }
      if (Smooth != false) {
        output.WriteRawTag(128, 1);
        output.WriteBool(Smooth);
      }
      if (IncludeBackground != false) {
        output.WriteRawTag(144, 1);
        output.WriteBool(IncludeBackground);
      }
      if (KeepExistingPoints != false) {
        output.WriteRawTag(152, 1);
        output.WriteBool(KeepExistingPoints);
      }
      if (AutoFitDomain != false) {
        output.WriteRawTag(160, 1);
        output.WriteBool(AutoFitDomain);
      }
      if (BoundaryLayerThickness != 0D) {
        output.WriteRawTag(185, 1);
        output.WriteDouble(BoundaryLayerThickness);
      }
      symmetries_.WriteTo(output, _repeated_symmetries_codec);
      if (BackgroundN != 0UL) {
        output.WriteRawTag(240, 1);
        output.WriteUInt64(BackgroundN);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (TargetN != 0UL) {
        output.WriteRawTag(8);
        output.WriteUInt64(TargetN);
      }
      if (MaxIterations != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(MaxIterations);
      }
      if (SizeRatio != 0D) {
        output.WriteRawTag(25);
        output.WriteDouble(SizeRatio);
      }
      if (SizeDecay != 0D) {
        output.WriteRawTag(33);
        output.WriteDouble(SizeDecay);
      }
      if (SizeExponent != 0D) {
        output.WriteRawTag(41);
        output.WriteDouble(SizeExponent);
      }
      if (CurvRatio != 0D) {
        output.WriteRawTag(49);
        output.WriteDouble(CurvRatio);
      }
      if (CurvDecay != 0D) {
        output.WriteRawTag(57);
        output.WriteDouble(CurvDecay);
      }
      if (CurvExponent != 0D) {
        output.WriteRawTag(65);
        output.WriteDouble(CurvExponent);
      }
      if (NodeRadius != 0D) {
        output.WriteRawTag(73);
        output.WriteDouble(NodeRadius);
      }
      if (bounds_ != null) {
        output.WriteRawTag(82);
        output.WriteMessage(Bounds);
      }
      if (LengthUnits != 0) {
        output.WriteRawTag(88);
        output.WriteUInt32(LengthUnits);
      }
      if (Interior != false) {
        output.WriteRawTag(96);
        output.WriteBool(Interior);
      }
      if (Exterior != false) {
        output.WriteRawTag(104);
        output.WriteBool(Exterior);
      }
      if (Shell != false) {
        output.WriteRawTag(112);
        output.WriteBool(Shell);
      }
      if (Equalize != false) {
        output.WriteRawTag(120);
        output.WriteBool(Equalize);
      }
      if (Smooth != false) {
        output.WriteRawTag(128, 1);
        output.WriteBool(Smooth);
      }
      if (IncludeBackground != false) {
        output.WriteRawTag(144, 1);
        output.WriteBool(IncludeBackground);
      }
      if (KeepExistingPoints != false) {
        output.WriteRawTag(152, 1);
        output.WriteBool(KeepExistingPoints);
      }
      if (AutoFitDomain != false) {
        output.WriteRawTag(160, 1);
        output.WriteBool(AutoFitDomain);
      }
      if (BoundaryLayerThickness != 0D) {
        output.WriteRawTag(185, 1);
        output.WriteDouble(BoundaryLayerThickness);
      }
      symmetries_.WriteTo(ref output, _repeated_symmetries_codec);
      if (BackgroundN != 0UL) {
        output.WriteRawTag(240, 1);
        output.WriteUInt64(BackgroundN);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (TargetN != 0UL) {
        size += 1 + pb::CodedOutputStream.ComputeUInt64Size(TargetN);
      }
      if (MaxIterations != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MaxIterations);
      }
      if (SizeRatio != 0D) {
        size += 1 + 8;
      }
      if (SizeDecay != 0D) {
        size += 1 + 8;
      }
      if (SizeExponent != 0D) {
        size += 1 + 8;
      }
      if (CurvRatio != 0D) {
        size += 1 + 8;
      }
      if (CurvDecay != 0D) {
        size += 1 + 8;
      }
      if (CurvExponent != 0D) {
        size += 1 + 8;
      }
      if (NodeRadius != 0D) {
        size += 1 + 8;
      }
      if (bounds_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Bounds);
      }
      if (LengthUnits != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(LengthUnits);
      }
      if (Interior != false) {
        size += 1 + 1;
      }
      if (Exterior != false) {
        size += 1 + 1;
      }
      if (Shell != false) {
        size += 1 + 1;
      }
      if (Equalize != false) {
        size += 1 + 1;
      }
      if (Smooth != false) {
        size += 2 + 1;
      }
      if (IncludeBackground != false) {
        size += 2 + 1;
      }
      if (KeepExistingPoints != false) {
        size += 2 + 1;
      }
      if (AutoFitDomain != false) {
        size += 2 + 1;
      }
      if (BoundaryLayerThickness != 0D) {
        size += 2 + 8;
      }
      size += symmetries_.CalculateSize(_repeated_symmetries_codec);
      if (BackgroundN != 0UL) {
        size += 2 + pb::CodedOutputStream.ComputeUInt64Size(BackgroundN);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(MeshControl other) {
      if (other == null) {
        return;
      }
      if (other.TargetN != 0UL) {
        TargetN = other.TargetN;
      }
      if (other.MaxIterations != 0) {
        MaxIterations = other.MaxIterations;
      }
      if (other.SizeRatio != 0D) {
        SizeRatio = other.SizeRatio;
      }
      if (other.SizeDecay != 0D) {
        SizeDecay = other.SizeDecay;
      }
      if (other.SizeExponent != 0D) {
        SizeExponent = other.SizeExponent;
      }
      if (other.CurvRatio != 0D) {
        CurvRatio = other.CurvRatio;
      }
      if (other.CurvDecay != 0D) {
        CurvDecay = other.CurvDecay;
      }
      if (other.CurvExponent != 0D) {
        CurvExponent = other.CurvExponent;
      }
      if (other.NodeRadius != 0D) {
        NodeRadius = other.NodeRadius;
      }
      if (other.bounds_ != null) {
        if (bounds_ == null) {
          Bounds = new global::Messages.Extrema();
        }
        Bounds.MergeFrom(other.Bounds);
      }
      if (other.LengthUnits != 0) {
        LengthUnits = other.LengthUnits;
      }
      if (other.Interior != false) {
        Interior = other.Interior;
      }
      if (other.Exterior != false) {
        Exterior = other.Exterior;
      }
      if (other.Shell != false) {
        Shell = other.Shell;
      }
      if (other.Equalize != false) {
        Equalize = other.Equalize;
      }
      if (other.Smooth != false) {
        Smooth = other.Smooth;
      }
      if (other.IncludeBackground != false) {
        IncludeBackground = other.IncludeBackground;
      }
      if (other.KeepExistingPoints != false) {
        KeepExistingPoints = other.KeepExistingPoints;
      }
      if (other.AutoFitDomain != false) {
        AutoFitDomain = other.AutoFitDomain;
      }
      if (other.BoundaryLayerThickness != 0D) {
        BoundaryLayerThickness = other.BoundaryLayerThickness;
      }
      symmetries_.Add(other.symmetries_);
      if (other.BackgroundN != 0UL) {
        BackgroundN = other.BackgroundN;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 8: {
            TargetN = input.ReadUInt64();
            break;
          }
          case 16: {
            MaxIterations = input.ReadUInt32();
            break;
          }
          case 25: {
            SizeRatio = input.ReadDouble();
            break;
          }
          case 33: {
            SizeDecay = input.ReadDouble();
            break;
          }
          case 41: {
            SizeExponent = input.ReadDouble();
            break;
          }
          case 49: {
            CurvRatio = input.ReadDouble();
            break;
          }
          case 57: {
            CurvDecay = input.ReadDouble();
            break;
          }
          case 65: {
            CurvExponent = input.ReadDouble();
            break;
          }
          case 73: {
            NodeRadius = input.ReadDouble();
            break;
          }
          case 82: {
            if (bounds_ == null) {
              Bounds = new global::Messages.Extrema();
            }
            input.ReadMessage(Bounds);
            break;
          }
          case 88: {
            LengthUnits = input.ReadUInt32();
            break;
          }
          case 96: {
            Interior = input.ReadBool();
            break;
          }
          case 104: {
            Exterior = input.ReadBool();
            break;
          }
          case 112: {
            Shell = input.ReadBool();
            break;
          }
          case 120: {
            Equalize = input.ReadBool();
            break;
          }
          case 128: {
            Smooth = input.ReadBool();
            break;
          }
          case 144: {
            IncludeBackground = input.ReadBool();
            break;
          }
          case 152: {
            KeepExistingPoints = input.ReadBool();
            break;
          }
          case 160: {
            AutoFitDomain = input.ReadBool();
            break;
          }
          case 185: {
            BoundaryLayerThickness = input.ReadDouble();
            break;
          }
          case 194:
          case 192: {
            symmetries_.AddEntriesFrom(input, _repeated_symmetries_codec);
            break;
          }
          case 240: {
            BackgroundN = input.ReadUInt64();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 8: {
            TargetN = input.ReadUInt64();
            break;
          }
          case 16: {
            MaxIterations = input.ReadUInt32();
            break;
          }
          case 25: {
            SizeRatio = input.ReadDouble();
            break;
          }
          case 33: {
            SizeDecay = input.ReadDouble();
            break;
          }
          case 41: {
            SizeExponent = input.ReadDouble();
            break;
          }
          case 49: {
            CurvRatio = input.ReadDouble();
            break;
          }
          case 57: {
            CurvDecay = input.ReadDouble();
            break;
          }
          case 65: {
            CurvExponent = input.ReadDouble();
            break;
          }
          case 73: {
            NodeRadius = input.ReadDouble();
            break;
          }
          case 82: {
            if (bounds_ == null) {
              Bounds = new global::Messages.Extrema();
            }
            input.ReadMessage(Bounds);
            break;
          }
          case 88: {
            LengthUnits = input.ReadUInt32();
            break;
          }
          case 96: {
            Interior = input.ReadBool();
            break;
          }
          case 104: {
            Exterior = input.ReadBool();
            break;
          }
          case 112: {
            Shell = input.ReadBool();
            break;
          }
          case 120: {
            Equalize = input.ReadBool();
            break;
          }
          case 128: {
            Smooth = input.ReadBool();
            break;
          }
          case 144: {
            IncludeBackground = input.ReadBool();
            break;
          }
          case 152: {
            KeepExistingPoints = input.ReadBool();
            break;
          }
          case 160: {
            AutoFitDomain = input.ReadBool();
            break;
          }
          case 185: {
            BoundaryLayerThickness = input.ReadDouble();
            break;
          }
          case 194:
          case 192: {
            symmetries_.AddEntriesFrom(ref input, _repeated_symmetries_codec);
            break;
          }
          case 240: {
            BackgroundN = input.ReadUInt64();
            break;
          }
        }
      }
    }
    #endif

  }

  public sealed partial class TreeControl : pb::IMessage<TreeControl>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<TreeControl> _parser = new pb::MessageParser<TreeControl>(() => new TreeControl());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<TreeControl> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Messages.SpatialReflection.Descriptor.MessageTypes[3]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public TreeControl() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public TreeControl(TreeControl other) : this() {
      minDepth_ = other.minDepth_;
      maxDepth_ = other.maxDepth_;
      maxSize_ = other.maxSize_;
      refDimensionality_ = other.refDimensionality_;
      lengthUnits_ = other.lengthUnits_;
      bounds_ = other.bounds_ != null ? other.bounds_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public TreeControl Clone() {
      return new TreeControl(this);
    }

    /// <summary>Field number for the "min_depth" field.</summary>
    public const int MinDepthFieldNumber = 1;
    private uint minDepth_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint MinDepth {
      get { return minDepth_; }
      set {
        minDepth_ = value;
      }
    }

    /// <summary>Field number for the "max_depth" field.</summary>
    public const int MaxDepthFieldNumber = 2;
    private uint maxDepth_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint MaxDepth {
      get { return maxDepth_; }
      set {
        maxDepth_ = value;
      }
    }

    /// <summary>Field number for the "max_size" field.</summary>
    public const int MaxSizeFieldNumber = 3;
    private ulong maxSize_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public ulong MaxSize {
      get { return maxSize_; }
      set {
        maxSize_ = value;
      }
    }

    /// <summary>Field number for the "ref_dimensionality" field.</summary>
    public const int RefDimensionalityFieldNumber = 7;
    private uint refDimensionality_;
    /// <summary>
    ///reserved
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint RefDimensionality {
      get { return refDimensionality_; }
      set {
        refDimensionality_ = value;
      }
    }

    /// <summary>Field number for the "length_units" field.</summary>
    public const int LengthUnitsFieldNumber = 8;
    private uint lengthUnits_;
    /// <summary>
    /// 0-7: mm, cm, m, km, in, ft, yd, mi (defined in common/space.h)       
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint LengthUnits {
      get { return lengthUnits_; }
      set {
        lengthUnits_ = value;
      }
    }

    /// <summary>Field number for the "bounds" field.</summary>
    public const int BoundsFieldNumber = 10;
    private global::Messages.Extrema bounds_;
    /// <summary>
    ///reserved
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Messages.Extrema Bounds {
      get { return bounds_; }
      set {
        bounds_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as TreeControl);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(TreeControl other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (MinDepth != other.MinDepth) return false;
      if (MaxDepth != other.MaxDepth) return false;
      if (MaxSize != other.MaxSize) return false;
      if (RefDimensionality != other.RefDimensionality) return false;
      if (LengthUnits != other.LengthUnits) return false;
      if (!object.Equals(Bounds, other.Bounds)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (MinDepth != 0) hash ^= MinDepth.GetHashCode();
      if (MaxDepth != 0) hash ^= MaxDepth.GetHashCode();
      if (MaxSize != 0UL) hash ^= MaxSize.GetHashCode();
      if (RefDimensionality != 0) hash ^= RefDimensionality.GetHashCode();
      if (LengthUnits != 0) hash ^= LengthUnits.GetHashCode();
      if (bounds_ != null) hash ^= Bounds.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (MinDepth != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(MinDepth);
      }
      if (MaxDepth != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(MaxDepth);
      }
      if (MaxSize != 0UL) {
        output.WriteRawTag(24);
        output.WriteUInt64(MaxSize);
      }
      if (RefDimensionality != 0) {
        output.WriteRawTag(56);
        output.WriteUInt32(RefDimensionality);
      }
      if (LengthUnits != 0) {
        output.WriteRawTag(64);
        output.WriteUInt32(LengthUnits);
      }
      if (bounds_ != null) {
        output.WriteRawTag(82);
        output.WriteMessage(Bounds);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (MinDepth != 0) {
        output.WriteRawTag(8);
        output.WriteUInt32(MinDepth);
      }
      if (MaxDepth != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(MaxDepth);
      }
      if (MaxSize != 0UL) {
        output.WriteRawTag(24);
        output.WriteUInt64(MaxSize);
      }
      if (RefDimensionality != 0) {
        output.WriteRawTag(56);
        output.WriteUInt32(RefDimensionality);
      }
      if (LengthUnits != 0) {
        output.WriteRawTag(64);
        output.WriteUInt32(LengthUnits);
      }
      if (bounds_ != null) {
        output.WriteRawTag(82);
        output.WriteMessage(Bounds);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (MinDepth != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MinDepth);
      }
      if (MaxDepth != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MaxDepth);
      }
      if (MaxSize != 0UL) {
        size += 1 + pb::CodedOutputStream.ComputeUInt64Size(MaxSize);
      }
      if (RefDimensionality != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(RefDimensionality);
      }
      if (LengthUnits != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(LengthUnits);
      }
      if (bounds_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Bounds);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(TreeControl other) {
      if (other == null) {
        return;
      }
      if (other.MinDepth != 0) {
        MinDepth = other.MinDepth;
      }
      if (other.MaxDepth != 0) {
        MaxDepth = other.MaxDepth;
      }
      if (other.MaxSize != 0UL) {
        MaxSize = other.MaxSize;
      }
      if (other.RefDimensionality != 0) {
        RefDimensionality = other.RefDimensionality;
      }
      if (other.LengthUnits != 0) {
        LengthUnits = other.LengthUnits;
      }
      if (other.bounds_ != null) {
        if (bounds_ == null) {
          Bounds = new global::Messages.Extrema();
        }
        Bounds.MergeFrom(other.Bounds);
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 8: {
            MinDepth = input.ReadUInt32();
            break;
          }
          case 16: {
            MaxDepth = input.ReadUInt32();
            break;
          }
          case 24: {
            MaxSize = input.ReadUInt64();
            break;
          }
          case 56: {
            RefDimensionality = input.ReadUInt32();
            break;
          }
          case 64: {
            LengthUnits = input.ReadUInt32();
            break;
          }
          case 82: {
            if (bounds_ == null) {
              Bounds = new global::Messages.Extrema();
            }
            input.ReadMessage(Bounds);
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 8: {
            MinDepth = input.ReadUInt32();
            break;
          }
          case 16: {
            MaxDepth = input.ReadUInt32();
            break;
          }
          case 24: {
            MaxSize = input.ReadUInt64();
            break;
          }
          case 56: {
            RefDimensionality = input.ReadUInt32();
            break;
          }
          case 64: {
            LengthUnits = input.ReadUInt32();
            break;
          }
          case 82: {
            if (bounds_ == null) {
              Bounds = new global::Messages.Extrema();
            }
            input.ReadMessage(Bounds);
            break;
          }
        }
      }
    }
    #endif

  }

  /// <summary>
  /// Note:  message 'Elements' is defined in vector.proto to utilize arena/packed allocation
  /// </summary>
  public sealed partial class Topology : pb::IMessage<Topology>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<Topology> _parser = new pb::MessageParser<Topology>(() => new Topology());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<Topology> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Messages.SpatialReflection.Descriptor.MessageTypes[4]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public Topology() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public Topology(Topology other) : this() {
      name_ = other.name_;
      type_ = other.type_;
      ndim_ = other.ndim_;
      basis_ = other.basis_;
      filename_ = other.filename_;
      revision_ = other.revision_ != null ? other.revision_.Clone() : null;
      info_ = other.info_;
      nodes_ = other.nodes_ != null ? other.nodes_.Clone() : null;
      edges_ = other.edges_ != null ? other.edges_.Clone() : null;
      faces_ = other.faces_ != null ? other.faces_.Clone() : null;
      cells_ = other.cells_ != null ? other.cells_.Clone() : null;
      data_ = other.data_ != null ? other.data_.Clone() : null;
      sparseData_ = other.sparseData_.Clone();
      gridControl_ = other.gridControl_ != null ? other.gridControl_.Clone() : null;
      meshControl_ = other.meshControl_ != null ? other.meshControl_.Clone() : null;
      treeControl_ = other.treeControl_ != null ? other.treeControl_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public Topology Clone() {
      return new Topology(this);
    }

    /// <summary>Field number for the "name" field.</summary>
    public const int NameFieldNumber = 1;
    private string name_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Name {
      get { return name_; }
      set {
        name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "type" field.</summary>
    public const int TypeFieldNumber = 2;
    private uint type_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Type {
      get { return type_; }
      set {
        type_ = value;
      }
    }

    /// <summary>Field number for the "ndim" field.</summary>
    public const int NdimFieldNumber = 3;
    private uint ndim_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Ndim {
      get { return ndim_; }
      set {
        ndim_ = value;
      }
    }

    /// <summary>Field number for the "basis" field.</summary>
    public const int BasisFieldNumber = 4;
    private uint basis_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public uint Basis {
      get { return basis_; }
      set {
        basis_ = value;
      }
    }

    /// <summary>Field number for the "filename" field.</summary>
    public const int FilenameFieldNumber = 5;
    private string filename_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Filename {
      get { return filename_; }
      set {
        filename_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "revision" field.</summary>
    public const int RevisionFieldNumber = 6;
    private global::Messages.Revision revision_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Messages.Revision Revision {
      get { return revision_; }
      set {
        revision_ = value;
      }
    }

    /// <summary>Field number for the "info" field.</summary>
    public const int InfoFieldNumber = 7;
    private string info_ = "";
    /// <summary>
    /// as defined in common/space.hpp: mm=0, cm=1, m=2, km=3, in=4, ft=5, yd=6, mi=7
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Info {
      get { return info_; }
      set {
        info_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "nodes" field.</summary>
    public const int NodesFieldNumber = 10;
    private global::Messages.Elements nodes_;
    /// <summary>
    ///reserved
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Messages.Elements Nodes {
      get { return nodes_; }
      set {
        nodes_ = value;
      }
    }

    /// <summary>Field number for the "edges" field.</summary>
    public const int EdgesFieldNumber = 11;
    private global::Messages.Elements edges_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Messages.Elements Edges {
      get { return edges_; }
      set {
        edges_ = value;
      }
    }

    /// <summary>Field number for the "faces" field.</summary>
    public const int FacesFieldNumber = 12;
    private global::Messages.Elements faces_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Messages.Elements Faces {
      get { return faces_; }
      set {
        faces_ = value;
      }
    }

    /// <summary>Field number for the "cells" field.</summary>
    public const int CellsFieldNumber = 13;
    private global::Messages.Elements cells_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Messages.Elements Cells {
      get { return cells_; }
      set {
        cells_ = value;
      }
    }

    /// <summary>Field number for the "data" field.</summary>
    public const int DataFieldNumber = 15;
    private global::Messages.Record64 data_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Messages.Record64 Data {
      get { return data_; }
      set {
        data_ = value;
      }
    }

    /// <summary>Field number for the "sparse_data" field.</summary>
    public const int SparseDataFieldNumber = 16;
    private static readonly pb::FieldCodec<global::Messages.SparseMatrix> _repeated_sparseData_codec
        = pb::FieldCodec.ForMessage(130, global::Messages.SparseMatrix.Parser);
    private readonly pbc::RepeatedField<global::Messages.SparseMatrix> sparseData_ = new pbc::RepeatedField<global::Messages.SparseMatrix>();
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::RepeatedField<global::Messages.SparseMatrix> SparseData {
      get { return sparseData_; }
    }

    /// <summary>Field number for the "grid_control" field.</summary>
    public const int GridControlFieldNumber = 20;
    private global::Messages.GridControl gridControl_;
    /// <summary>
    ///reserved
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Messages.GridControl GridControl {
      get { return gridControl_; }
      set {
        gridControl_ = value;
      }
    }

    /// <summary>Field number for the "mesh_control" field.</summary>
    public const int MeshControlFieldNumber = 21;
    private global::Messages.MeshControl meshControl_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Messages.MeshControl MeshControl {
      get { return meshControl_; }
      set {
        meshControl_ = value;
      }
    }

    /// <summary>Field number for the "tree_control" field.</summary>
    public const int TreeControlFieldNumber = 22;
    private global::Messages.TreeControl treeControl_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Messages.TreeControl TreeControl {
      get { return treeControl_; }
      set {
        treeControl_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as Topology);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(Topology other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Name != other.Name) return false;
      if (Type != other.Type) return false;
      if (Ndim != other.Ndim) return false;
      if (Basis != other.Basis) return false;
      if (Filename != other.Filename) return false;
      if (!object.Equals(Revision, other.Revision)) return false;
      if (Info != other.Info) return false;
      if (!object.Equals(Nodes, other.Nodes)) return false;
      if (!object.Equals(Edges, other.Edges)) return false;
      if (!object.Equals(Faces, other.Faces)) return false;
      if (!object.Equals(Cells, other.Cells)) return false;
      if (!object.Equals(Data, other.Data)) return false;
      if(!sparseData_.Equals(other.sparseData_)) return false;
      if (!object.Equals(GridControl, other.GridControl)) return false;
      if (!object.Equals(MeshControl, other.MeshControl)) return false;
      if (!object.Equals(TreeControl, other.TreeControl)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (Name.Length != 0) hash ^= Name.GetHashCode();
      if (Type != 0) hash ^= Type.GetHashCode();
      if (Ndim != 0) hash ^= Ndim.GetHashCode();
      if (Basis != 0) hash ^= Basis.GetHashCode();
      if (Filename.Length != 0) hash ^= Filename.GetHashCode();
      if (revision_ != null) hash ^= Revision.GetHashCode();
      if (Info.Length != 0) hash ^= Info.GetHashCode();
      if (nodes_ != null) hash ^= Nodes.GetHashCode();
      if (edges_ != null) hash ^= Edges.GetHashCode();
      if (faces_ != null) hash ^= Faces.GetHashCode();
      if (cells_ != null) hash ^= Cells.GetHashCode();
      if (data_ != null) hash ^= Data.GetHashCode();
      hash ^= sparseData_.GetHashCode();
      if (gridControl_ != null) hash ^= GridControl.GetHashCode();
      if (meshControl_ != null) hash ^= MeshControl.GetHashCode();
      if (treeControl_ != null) hash ^= TreeControl.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (Name.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Name);
      }
      if (Type != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(Type);
      }
      if (Ndim != 0) {
        output.WriteRawTag(24);
        output.WriteUInt32(Ndim);
      }
      if (Basis != 0) {
        output.WriteRawTag(32);
        output.WriteUInt32(Basis);
      }
      if (Filename.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(Filename);
      }
      if (revision_ != null) {
        output.WriteRawTag(50);
        output.WriteMessage(Revision);
      }
      if (Info.Length != 0) {
        output.WriteRawTag(58);
        output.WriteString(Info);
      }
      if (nodes_ != null) {
        output.WriteRawTag(82);
        output.WriteMessage(Nodes);
      }
      if (edges_ != null) {
        output.WriteRawTag(90);
        output.WriteMessage(Edges);
      }
      if (faces_ != null) {
        output.WriteRawTag(98);
        output.WriteMessage(Faces);
      }
      if (cells_ != null) {
        output.WriteRawTag(106);
        output.WriteMessage(Cells);
      }
      if (data_ != null) {
        output.WriteRawTag(122);
        output.WriteMessage(Data);
      }
      sparseData_.WriteTo(output, _repeated_sparseData_codec);
      if (gridControl_ != null) {
        output.WriteRawTag(162, 1);
        output.WriteMessage(GridControl);
      }
      if (meshControl_ != null) {
        output.WriteRawTag(170, 1);
        output.WriteMessage(MeshControl);
      }
      if (treeControl_ != null) {
        output.WriteRawTag(178, 1);
        output.WriteMessage(TreeControl);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (Name.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(Name);
      }
      if (Type != 0) {
        output.WriteRawTag(16);
        output.WriteUInt32(Type);
      }
      if (Ndim != 0) {
        output.WriteRawTag(24);
        output.WriteUInt32(Ndim);
      }
      if (Basis != 0) {
        output.WriteRawTag(32);
        output.WriteUInt32(Basis);
      }
      if (Filename.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(Filename);
      }
      if (revision_ != null) {
        output.WriteRawTag(50);
        output.WriteMessage(Revision);
      }
      if (Info.Length != 0) {
        output.WriteRawTag(58);
        output.WriteString(Info);
      }
      if (nodes_ != null) {
        output.WriteRawTag(82);
        output.WriteMessage(Nodes);
      }
      if (edges_ != null) {
        output.WriteRawTag(90);
        output.WriteMessage(Edges);
      }
      if (faces_ != null) {
        output.WriteRawTag(98);
        output.WriteMessage(Faces);
      }
      if (cells_ != null) {
        output.WriteRawTag(106);
        output.WriteMessage(Cells);
      }
      if (data_ != null) {
        output.WriteRawTag(122);
        output.WriteMessage(Data);
      }
      sparseData_.WriteTo(ref output, _repeated_sparseData_codec);
      if (gridControl_ != null) {
        output.WriteRawTag(162, 1);
        output.WriteMessage(GridControl);
      }
      if (meshControl_ != null) {
        output.WriteRawTag(170, 1);
        output.WriteMessage(MeshControl);
      }
      if (treeControl_ != null) {
        output.WriteRawTag(178, 1);
        output.WriteMessage(TreeControl);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (Name.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
      }
      if (Type != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Type);
      }
      if (Ndim != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Ndim);
      }
      if (Basis != 0) {
        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Basis);
      }
      if (Filename.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Filename);
      }
      if (revision_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Revision);
      }
      if (Info.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Info);
      }
      if (nodes_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Nodes);
      }
      if (edges_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Edges);
      }
      if (faces_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Faces);
      }
      if (cells_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Cells);
      }
      if (data_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Data);
      }
      size += sparseData_.CalculateSize(_repeated_sparseData_codec);
      if (gridControl_ != null) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(GridControl);
      }
      if (meshControl_ != null) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(MeshControl);
      }
      if (treeControl_ != null) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(TreeControl);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(Topology other) {
      if (other == null) {
        return;
      }
      if (other.Name.Length != 0) {
        Name = other.Name;
      }
      if (other.Type != 0) {
        Type = other.Type;
      }
      if (other.Ndim != 0) {
        Ndim = other.Ndim;
      }
      if (other.Basis != 0) {
        Basis = other.Basis;
      }
      if (other.Filename.Length != 0) {
        Filename = other.Filename;
      }
      if (other.revision_ != null) {
        if (revision_ == null) {
          Revision = new global::Messages.Revision();
        }
        Revision.MergeFrom(other.Revision);
      }
      if (other.Info.Length != 0) {
        Info = other.Info;
      }
      if (other.nodes_ != null) {
        if (nodes_ == null) {
          Nodes = new global::Messages.Elements();
        }
        Nodes.MergeFrom(other.Nodes);
      }
      if (other.edges_ != null) {
        if (edges_ == null) {
          Edges = new global::Messages.Elements();
        }
        Edges.MergeFrom(other.Edges);
      }
      if (other.faces_ != null) {
        if (faces_ == null) {
          Faces = new global::Messages.Elements();
        }
        Faces.MergeFrom(other.Faces);
      }
      if (other.cells_ != null) {
        if (cells_ == null) {
          Cells = new global::Messages.Elements();
        }
        Cells.MergeFrom(other.Cells);
      }
      if (other.data_ != null) {
        if (data_ == null) {
          Data = new global::Messages.Record64();
        }
        Data.MergeFrom(other.Data);
      }
      sparseData_.Add(other.sparseData_);
      if (other.gridControl_ != null) {
        if (gridControl_ == null) {
          GridControl = new global::Messages.GridControl();
        }
        GridControl.MergeFrom(other.GridControl);
      }
      if (other.meshControl_ != null) {
        if (meshControl_ == null) {
          MeshControl = new global::Messages.MeshControl();
        }
        MeshControl.MergeFrom(other.MeshControl);
      }
      if (other.treeControl_ != null) {
        if (treeControl_ == null) {
          TreeControl = new global::Messages.TreeControl();
        }
        TreeControl.MergeFrom(other.TreeControl);
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            Name = input.ReadString();
            break;
          }
          case 16: {
            Type = input.ReadUInt32();
            break;
          }
          case 24: {
            Ndim = input.ReadUInt32();
            break;
          }
          case 32: {
            Basis = input.ReadUInt32();
            break;
          }
          case 42: {
            Filename = input.ReadString();
            break;
          }
          case 50: {
            if (revision_ == null) {
              Revision = new global::Messages.Revision();
            }
            input.ReadMessage(Revision);
            break;
          }
          case 58: {
            Info = input.ReadString();
            break;
          }
          case 82: {
            if (nodes_ == null) {
              Nodes = new global::Messages.Elements();
            }
            input.ReadMessage(Nodes);
            break;
          }
          case 90: {
            if (edges_ == null) {
              Edges = new global::Messages.Elements();
            }
            input.ReadMessage(Edges);
            break;
          }
          case 98: {
            if (faces_ == null) {
              Faces = new global::Messages.Elements();
            }
            input.ReadMessage(Faces);
            break;
          }
          case 106: {
            if (cells_ == null) {
              Cells = new global::Messages.Elements();
            }
            input.ReadMessage(Cells);
            break;
          }
          case 122: {
            if (data_ == null) {
              Data = new global::Messages.Record64();
            }
            input.ReadMessage(Data);
            break;
          }
          case 130: {
            sparseData_.AddEntriesFrom(input, _repeated_sparseData_codec);
            break;
          }
          case 162: {
            if (gridControl_ == null) {
              GridControl = new global::Messages.GridControl();
            }
            input.ReadMessage(GridControl);
            break;
          }
          case 170: {
            if (meshControl_ == null) {
              MeshControl = new global::Messages.MeshControl();
            }
            input.ReadMessage(MeshControl);
            break;
          }
          case 178: {
            if (treeControl_ == null) {
              TreeControl = new global::Messages.TreeControl();
            }
            input.ReadMessage(TreeControl);
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            Name = input.ReadString();
            break;
          }
          case 16: {
            Type = input.ReadUInt32();
            break;
          }
          case 24: {
            Ndim = input.ReadUInt32();
            break;
          }
          case 32: {
            Basis = input.ReadUInt32();
            break;
          }
          case 42: {
            Filename = input.ReadString();
            break;
          }
          case 50: {
            if (revision_ == null) {
              Revision = new global::Messages.Revision();
            }
            input.ReadMessage(Revision);
            break;
          }
          case 58: {
            Info = input.ReadString();
            break;
          }
          case 82: {
            if (nodes_ == null) {
              Nodes = new global::Messages.Elements();
            }
            input.ReadMessage(Nodes);
            break;
          }
          case 90: {
            if (edges_ == null) {
              Edges = new global::Messages.Elements();
            }
            input.ReadMessage(Edges);
            break;
          }
          case 98: {
            if (faces_ == null) {
              Faces = new global::Messages.Elements();
            }
            input.ReadMessage(Faces);
            break;
          }
          case 106: {
            if (cells_ == null) {
              Cells = new global::Messages.Elements();
            }
            input.ReadMessage(Cells);
            break;
          }
          case 122: {
            if (data_ == null) {
              Data = new global::Messages.Record64();
            }
            input.ReadMessage(Data);
            break;
          }
          case 130: {
            sparseData_.AddEntriesFrom(ref input, _repeated_sparseData_codec);
            break;
          }
          case 162: {
            if (gridControl_ == null) {
              GridControl = new global::Messages.GridControl();
            }
            input.ReadMessage(GridControl);
            break;
          }
          case 170: {
            if (meshControl_ == null) {
              MeshControl = new global::Messages.MeshControl();
            }
            input.ReadMessage(MeshControl);
            break;
          }
          case 178: {
            if (treeControl_ == null) {
              TreeControl = new global::Messages.TreeControl();
            }
            input.ReadMessage(TreeControl);
            break;
          }
        }
      }
    }
    #endif

  }

  #endregion

}

#endregion Designer generated code
