Include "macro_ddm.idp"

How do I query these commands? Not quite understanding the meaning of these commands, the guide to FreeFEM Documentation
Release 4.8 did not find the meaning of these commands. For example ,

include “macro_ddm.idp”

getARGV("-global", 40) and so on.

include “macro_ddm.idp” loads the domain decomposition subroutines of FreeFEM, the source of which can be found in the GitHub repo or the “idp” directory in your local installation. It’s always crucial to call it after loading the PETSc module (load "PETSc") and defining the “dimension” macro (like macro dimension()3// EOM for 3D cases). you may have a look at the “macro_ddm.idp” file to check what else it can do and what parameters it brings to the code.

generally speaking, getARGV("-global", 40) does nothing but looking for the -global flag in the execution command of FF, returning the provided value if it exists or 40 otherwise. as an example, for a variable definition like int X = getARGV("-global", 40), executing FreeFem++ test.edp -global 10 results to X being 10, while executing ``FreeFem++ test.edp` initializes X to the provided default value, which is 40 in this case. seeing this in lots of HPDDM/PETSc examples in FF is to let the users define the number of mesh partitions via command line arguments, which can be controlled by changing the number of MPI processes as well.

1 Like

If I define a grid partition, do the following two commands yield the same partition?

mesh Th = square(4,4,[-8+16x,-8+16y]);

mesh Th = square(getARGV("-global", 4), getARGV("-global", 4),[-8+16x,-8+16y]);

this doesn’t create any partition, but the result of both scripts is the same mesh, yes, if no -global flag is passed to FF.

1 Like

Thanks for your answer. Is there reference book for this parallel version of FreeFem ++ -mpi ?

there are some explanations for ffddm in the documentation, but if you mean HPDDM, the best reference to refer to at this moment is Pierre’s tutorials on parallel FF, here and here.