<commit_before>// Main.cpp
//============================

//===========================
// Include Dependencies
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
#include <fstream>

#include "phys.h"
#include "coord.h"
//#include "node.h"
#include "cell.h"
#include "tissue.h"
//==============================

using namespace std;

//============================

int main() {

	string init_tissue = "cell_start.txt";
	//make a new cell object

	Tissue growing_Tissue(init_tissue);

	cout << "Finished creating Cell" << endl;
	//parameters for time step
    double numSteps = 1;

	// Variable for dataoutput
	int digits;
	string format = ".vtk";
	string Number;
	string initial = "Animation/Plant_Cell_";
	string Filename;
	ofstream ofs;
	int out = 0; //counter for creating output/vtk files

	//loop for time steps
	for(int Ti = 0; Ti*dt < numSteps; Ti++) {
		//loop through all cells
		//for now only one cell

		//Print to dataOutput and VTK files

		if (Ti % 250 == 0) {
	
			digits = ceil(log10(out + 1));
			if (digits == 1 || digits == 0) {
				Number = "0000" + to_string(out);
			}
			else if (digits == 2) {
				Number = "000" + to_string(out);
			}
			else if (digits == 3) {
				Number = "00" + to_string(out);
			}
			else if (digits == 4) {
				Number = "0" + to_string(out);
			}

			Filename = initial + Number + format;

			ofs.open(Filename.c_str());
			growing_Tissue.print_VTK_File(ofs);
			ofs.close();
		
			out++;
		}

		if (Ti % 1000 == 0) {
			cout << "Simulation still running. Ti: " << Ti << endl;
		}
		
		// Update Each cell's neighboring cells
		if (Ti % 5000 == 0) {
			growing_Tissue.update_Neighbor_Cells();
		}

		cout << "Done updating neighbors. " << endl;

		//New Tissue GRowth
		cout << "Growing cells ... ";
		growing_Tissue.grow_Cells(Ti);
		cout << "done. " << endl;

		cout << "Calculating forces ... ";
		//Calculate new forces on cells and nodes
		growing_Tissue.calc_New_Forces();
		cout << "done." << endl;
		//Update node positions
		cout << "Updating Positioning ... ";
		growing_Tissue.update_Cell_Locations();<commit_msg>program stops running<commit_after>// Main.cpp
//============================

//===========================
// Include Dependencies
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
#include <fstream>

#include "phys.h"
#include "coord.h"
//#include "node.h"
#include "cell.h"
#include "tissue.h"
//==============================

using namespace std;

//============================

int main() {

	string init_tissue = "cell_start.txt";
	//make a new cell object

	Tissue growing_Tissue(init_tissue);

	cout << "Finished creating Cell" << endl;
	//parameters for time step
    double numSteps = 1;

	// Variable for dataoutput
	int digits;
	string format = ".vtk";
	string Number;
	string initial = "Animation/Plant_Cell_";
	string Filename;
	ofstream ofs;
	int out = 0; //counter for creating output/vtk files

	//loop for time steps
	for(int Ti = 0; Ti*dt < numSteps; Ti++) {
		//loop through all cells
		//for now only one cell

		//Print to dataOutput and VTK files

		if (Ti % 250 == 0) {
	
			digits = ceil(log10(out + 1));
			if (digits == 1 || digits == 0) {
				Number = "0000" + to_string(out);
			}
			else if (digits == 2) {
				Number = "000" + to_string(out);
			}
			else if (digits == 3) {
				Number = "00" + to_string(out);
			}
			else if (digits == 4) {
				Number = "0" + to_string(out);
			}

			Filename = initial + Number + format;

			ofs.open(Filename.c_str());
			growing_Tissue.print_VTK_File(ofs);
			ofs.close();
		
			out++;
		}

		if (Ti % 1000 == 0) {
			cout << "Simulation still running. Ti: " << Ti << endl;
		}
		
		// Update Each cell's neighboring cells
		if (Ti % 5000 == 0) {
			growing_Tissue.update_Neighbor_Cells();
		}

		cout << "Done updating neighbors. " << endl;

		//New Tissue GRowth
		growing_Tissue.grow_Cells(Ti);
		cout << "Calculating forces: ";
		
		//Calculate new forces on cells and nodes

		growing_Tissue.calc_New_Forces();
		cout << "done." << endl;
		//Update node positions
		cout << "Updating Positioning: ";
		growing_Tissue.update_Cell_Locations();
{'fraction_non_alphanumeric': 0.198502777106979, 'fraction_numerical': 0.01690412943733398, 'mean_word_length': 3.2179226069246436, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 13, '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': '3237397', 'n_tokens_mistral': 1670, 'n_tokens_neox': 1385, 'n_words': 399}