<commit_before>// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2019 projectchrono.org
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of the distribution and at
// http://projectchrono.org/license-chrono.txt.
//
// =============================================================================
// Authors: <NAME>
// =============================================================================

#include "chrono_granular/physics/ChGranular.h"
#include "chrono_granular/ChGranularDefines.h"
#include "chrono_thirdparty/rapidjson/filereadstream.h"
#include "chrono_thirdparty/rapidjson/document.h"

#include <string>
#include <iostream>

using std::string;
using std::cout;
using std::endl;

using namespace rapidjson;

namespace chrono {
namespace granular {
typedef struct sim_param_holder {
    float sphere_radius;
    float sphere_density;
    float box_X;
    float box_Y;
    float box_Z;
    GRAN_TIME_INTEGRATOR time_integrator;
    float step_size;
    float time_end;
    float grav_X;
    float grav_Y;
    float grav_Z;
    double normalStiffS2S;
    double normalStiffS2W;
    double normalStiffS2M;
    double normalDampS2S;
    double normalDampS2W;
    double normalDampS2M;
    double tangentDampS2S;
    double tangentDampS2W;
    double tangentDampS2M;
    double tangentStiffS2S;
    double tangentStiffS2W;
    double tangentStiffS2M;
    GRAN_FRICTION_MODE friction_mode;
    float static_friction_coeffS2S;
    float static_friction_coeffS2W;
    float static_friction_coeffS2M;
    GRAN_ROLLING_MODE rolling_mode;
    float rolling_friction_coeffS2S;
    float rolling_friction_coeffS2W;
    float rolling_friction_coeffS2M;
    float cohesion_ratio;
    float adhesion_ratio_s2w;
    float adhesion_ratio_s2m;
    GRAN_VERBOSITY verbose;
    int run_mode;
    unsigned int psi_T;
    unsigned int psi_L;
    string output_dir;
    string checkpoint_file;
    GRAN_OUTPUT_MODE write_mode;
} sim_param_holder;

void ShowJSONUsage() {
    cout << "JSON fields:" << endl;
    cout << "sphere_radius" << endl;
    cout << "sphere_density" << endl;
    cout << "box_X" << endl;
    cout << "box_Y" << endl;
    cout << "box_Z" << endl;
    cout << "time_integrator (forward_euler|chung|centered_difference|extended_taylor)" << endl;
    cout << "step_size" << endl;
    cout << "time_end" << endl;
    cout << "grav_X" << endl;
    cout << "grav_Y" << endl;
    cout << "grav_Z" << endl;
    cout << "normalStiffS2S" << endl;
    cout << "normalStiffS2W" << endl;
    cout << "normalStiffS2M" << endl;
    cout << "normalDampS2S" << endl;
    cout << "normalDampS2W" << endl;
    cout << "normalDampS2M" << endl;
    cout << "tangentDampS2S" << endl;
    cout << "tangentDampS2W" << endl;
    cout << "tangentDampS2M" << endl;
    cout << "tangentStiffS2S" << endl;
    cout << "tangentStiffS2W" << endl;
    cout << "tangentStiffS2M" << endl;
    cout << "friction_mode (frictionless|single_step|multi_step)" << endl;
    cout << "static_friction_coeffS2S" << endl;
    cout << "static_friction_coeffS2W" << endl;
    cout << "static_friction_coeffS2M" << endl;
    cout << "rolling_mode (no_resistance|constant_torque|viscous)" << endl;
    cout << "rolling_friction_coeffS2S" << endl;
    cout << "rolling_friction_coeffS2W" << endl;
    cout << "rolling_friction_coeffS2M" << endl;
    cout << "cohesion_ratio" << endl;
    cout << "adhesion_ratio_s2w" << endl;
    cout << "adhesion_ratio_s2m" << endl;
    cout << "verbose" << endl;
    cout << "psi_T" << endl;
    cout << "psi_L" << endl;
    cout << "output_dir" << endl;
    cout << "checkpoint_file" << endl;
    cout << "write_mode (csv|binary|none)" << endl;
}
<commit_msg>Fixes JSON parser help ordering<commit_after>// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2019 projectchrono.org
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of the distribution and at
// http://projectchrono.org/license-chrono.txt.
//
// =============================================================================
// Authors: <NAME>
// =============================================================================

#include "chrono_granular/physics/ChGranular.h"
#include "chrono_granular/ChGranularDefines.h"
#include "chrono_thirdparty/rapidjson/filereadstream.h"
#include "chrono_thirdparty/rapidjson/document.h"

#include <string>
#include <iostream>

using std::string;
using std::cout;
using std::endl;

using namespace rapidjson;

namespace chrono {
namespace granular {
typedef struct sim_param_holder {
    float sphere_radius;
    float sphere_density;
    float box_X;
    float box_Y;
    float box_Z;
    GRAN_TIME_INTEGRATOR time_integrator;
    float step_size;
    float time_end;
    float grav_X;
    float grav_Y;
    float grav_Z;
    double normalStiffS2S;
    double normalStiffS2W;
    double normalStiffS2M;
    double normalDampS2S;
    double normalDampS2W;
    double normalDampS2M;
    double tangentDampS2S;
    double tangentDampS2W;
    double tangentDampS2M;
    double tangentStiffS2S;
    double tangentStiffS2W;
    double tangentStiffS2M;
    GRAN_FRICTION_MODE friction_mode;
    float static_friction_coeffS2S;
    float static_friction_coeffS2W;
    float static_friction_coeffS2M;
    GRAN_ROLLING_MODE rolling_mode;
    float rolling_friction_coeffS2S;
    float rolling_friction_coeffS2W;
    float rolling_friction_coeffS2M;
    float cohesion_ratio;
    float adhesion_ratio_s2w;
    float adhesion_ratio_s2m;
    GRAN_VERBOSITY verbose;
    int run_mode;
    unsigned int psi_T;
    unsigned int psi_L;
    string output_dir;
    string checkpoint_file;
    GRAN_OUTPUT_MODE write_mode;
} sim_param_holder;

void ShowJSONUsage() {
    cout << "JSON fields:" << endl;
    cout << "sphere_radius" << endl;
    cout << "sphere_density" << endl;
    cout << "box_X" << endl;
    cout << "box_Y" << endl;
    cout << "box_Z" << endl;
    cout << "time_integrator (forward_euler|chung|centered_difference|extended_taylor)" << endl;
    cout << "step_size" << endl;
    cout << "time_end" << endl;
    cout << "grav_X" << endl;
    cout << "grav_Y" << endl;
    cout << "grav_Z" << endl;
    cout << "normalStiffS2S" << endl;
    cout << "normalStiffS2W" << endl;
    cout << "normalStiffS2M" << endl;
    cout << "normalDampS2S" << endl;
    cout << "normalDampS2W" << endl;
    cout << "normalDampS2M" << endl;
    cout << "tangentStiffS2S" << endl;
    cout << "tangentStiffS2W" << endl;
    cout << "tangentStiffS2M" << endl;
    cout << "tangentDampS2S" << endl;
    cout << "tangentDampS2W" << endl;
    cout << "tangentDampS2M" << endl;
    cout << "friction_mode (frictionless|single_step|multi_step)" << endl;
    cout << "static_friction_coeffS2S" << endl;
    cout << "static_friction_coeffS2W" << endl;
    cout << "static_friction_coeffS2M" << endl;
    cout << "rolling_mode (no_resistance|constant_torque|viscous)" << endl;
    cout << "rolling_friction_coeffS2S" << endl;
    cout << "rolling_friction_coeffS2W" << endl;
    cout << "rolling_friction_coeffS2M" << endl;
    cout << "cohesion_ratio" << endl;
    cout << "adhesion_ratio_s2w" << endl;
    cout << "adhesion_ratio_s2m" << endl;
    cout << "verbose" << endl;
    cout << "psi_T" << endl;
    cout << "psi_L" << endl;
    cout << "output_dir" << endl;
    cout << "checkpoint_file" << endl;
    cout << "write_mode (csv|binary|none)" << endl;
}

{'fraction_non_alphanumeric': 0.17491578129048976, 'fraction_numerical': 0.011401917595231926, 'mean_word_length': 3.9703799098518995, 'pattern_counts': {'":': 0, '<': 337, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '247468', 'n_tokens_mistral': 2744, 'n_tokens_neox': 2657, 'n_words': 574}