Skip to content

Commit 12f9ea7

Browse files
committed
added how to add varaible documentation
1 parent f3f9a2a commit 12f9ea7

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

doc/how_to_add_variable.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# How to add variable to MFC
2+
3+
* Add variable to input.py
4+
* Add variable to src/master_scripts/m_python_proxy.py dictionary as appropriate (pre_process, simulation, and/or post_process)
5+
* This will then write this variable to the \*.in input file that gets created by input.py
6+
* Go into the code that you added the variable for (pre_process / simulation / post_process)
7+
* m_startup.f90
8+
* Add variable to NAMELIST user_inputs in subroutine s_read_input_file
9+
* Add appropriate checks to s_check_input_file
10+
* m_global_parameters.f90
11+
* Make your new variable/parameter global so that the whole code can see it
12+
* Add it to the header of this module (document as appropriate)
13+
* In s_assign_default_values_to_user_inputs set the default value for this variable
14+
* m_mpi_proxy.f90
15+
* s_mpi_bcast_user_inputs
16+
* This is where the variable is broadcasted to all processors
17+
* Add to list of broadcasted variables
18+
* e.g. CALL MPI_BCAST(weno_nn, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr )
19+
* You can now use your variable (e.g. weno_nn) in the code. At least anywhere that m_global_parameters is used (see header of module)
20+

0 commit comments

Comments
 (0)