/*
// Do Not Remove this Comment:
//
// MESSAGES™ by XPLICIT COMPUTING, INC
// GOOGLE PROTOCOL BUFFER 3 DEFINITIONS
//
// Copyright 2020-2023 Xplicit Computing, Inc.
//
// Please see file README.md for usage and license info. README.md must be copied along
// with these *.proto as part of the license agreement. Direct questions or concerns to:
// info@xplicitcomputing.com
//
// SPDX-License-Identifier: BSD-3-Clause
// OSI-License-URL: https://opensource.org/licenses/BSD-3-Clause
*/ 



syntax = "proto3";

package Messages;

import "vector.proto";



message Zone                                                                                            // compatible with xcompute Region (aka zone or patch)
{
    string name = 1;
    int32 id = 2;
    uint32 dimensionality = 3;//0:node-group, 1:edge-loop, 2:face-surface, 3:cell-volume
    Revision revision = 4;
    repeated uint32 elements = 5;//optional set of element indices (else, all by this id)
    uint32 element_count = 6;
    string comments = 7;
    string info = 8;
    string resource_name = 9;
    Extrema bounds = 10;
    repeated float terminal_coord = 11;//in symbol icon's coordinates [0,1]
}





message GridControl                                                                                    
{
    uint32 basis = 1;
    repeated uint32 size = 2;
    repeated double spacing = 3;
    repeated double grading = 4;
    uint32 length_units = 8;					// 0-7: mm, cm, m, km, in, ft, yd, mi (defined in common/space.h)       
    uint64 target_n = 9;
    Extrema bounds = 10;
    repeated bool symmetries = 11;
    bool interior = 12;
    bool exterior = 13;
    bool shell = 14;
}



message MeshControl                                                                     
{
    uint64 target_n = 1;
    uint32 max_iterations = 2;
    double size_ratio = 3;
    double size_decay = 4;
    double size_exponent = 5;
    double curv_ratio = 6;
    double curv_decay = 7;
    double curv_exponent = 8;
    double node_radius = 9;
    Extrema bounds = 10;
    uint32 length_units = 11;					// 0-7: mm, cm, m, km, in, ft, yd, mi (defined in common/space.h)       
    bool interior = 12;
    bool exterior = 13;
    bool shell = 14;
    bool equalize = 15;
    bool smooth = 16;
    //reserved
    bool include_background = 18;
    bool keep_existing_points = 19;
    bool auto_fit_domain = 20;
    //reserved
    double boundary_layer_thickness = 23;
    repeated bool symmetries = 24;
    //reserved
    uint64 background_n = 30;
}


message TreeControl                                                                       
{
    uint32 min_depth = 1;
    uint32 max_depth = 2;
    uint64 max_size = 3;
    //reserved
    uint32 ref_dimensionality = 7;                  //reference mesh element dimensionality: build from nodes(0), edges(1), faces(2), or cells(3)
    uint32 length_units = 8;					// 0-7: mm, cm, m, km, in, ft, yd, mi (defined in common/space.h)       
    //reserved
    Extrema bounds = 10;
}

message Topology                                                                                        // compatible with xcompute Geometry
{                                                                                                       // Note:  message 'Elements' is defined in vector.proto to utilize arena/packed allocation
    string name = 1;
    uint32 type = 2;
    uint32 ndim = 3;
    uint32 basis = 4;
    string filename = 5;
    Revision revision = 6;
    string info = 7;                                                                        // as defined in common/space.hpp: mm=0, cm=1, m=2, km=3, in=4, ft=5, yd=6, mi=7
    //reserved
    Elements nodes = 10;
    Elements edges = 11;
    Elements faces = 12;
    Elements cells = 13;
    Record64 data = 15;
    repeated SparseMatrix sparse_data = 16;
    //reserved
    GridControl grid_control = 20;
    MeshControl mesh_control = 21;
    TreeControl tree_control = 22;

}
