Skip to content

Commit

Permalink
traslado
Browse files Browse the repository at this point in the history
  • Loading branch information
nick0413 committed Dec 4, 2023
1 parent b85592e commit be3708d
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 14 deletions.
12 changes: 6 additions & 6 deletions proyecto/fores_fire_model/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
all: run
@echo "Corriendo el programa"

compile:
run: main.exe
@echo "Running the program"
./main.exe

main.exe: forest_model.cpp
@echo "Compiling the program"
g++ -o main.exe forest_model.cpp -O3

run: compile
@echo "Running the program"
./main.exe


clean:
for %%X in (datos\*.bin) do del /Q "%%X"
Expand Down
92 changes: 88 additions & 4 deletions proyecto/fores_fire_model/animate.ipynb

Large diffs are not rendered by default.

21 changes: 17 additions & 4 deletions proyecto/fores_fire_model/forest_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
#include <string>

std::ofstream datos;
std::ofstream datos_new;
std::ofstream config;

std::string folder="datos";

const int N_cells=4;

const int N_cells=200;
int t_max=500;
/*
El valor de una celda lo vamos a definir asi:
c = 0: vacio
Expand Down Expand Up @@ -169,15 +169,28 @@ class Forest_model

};

void write_config(void)
{
config<<N_cells<<","<<t_max<< std::endl;

}


int main(void)
{

Crandom rand64(1);
Forest_model forest(rand64,0.5,0.5);

config.open(folder+"/config.csv");
write_config();
config.close();






int t_max=100;
for(int time=0;time<t_max;time++)
{

Expand Down
Binary file modified proyecto/fores_fire_model/main.exe
Binary file not shown.

0 comments on commit be3708d

Please sign in to comment.