====== Creating an MFM Element ====== **You will need to have the MFM ready to build from source to do this.** Follow the instructions at [[Dev:clone_from_github|Cloning from Github]] if you have not done so yet. This tutorial highlights making a density regulating element which regulates nearby density based on some configurable parameters. The source for the final element is located at MFMv2/src/elements/include/Element_Creg.h ===== Copy the Element Template ===== First, copy: MFMv2/src/elements/include/Element_Template.h to MFMv2/src/elements/include/Element_Creg.h ===== Create the C++ Compilation file ===== In order for the compiler to be able to create a compiled version of this Element, you will need to create a small C++ file which associates with it. Create the file: MFMv2/src/elements/src/Element_Creg.cpp Add the line: #include "Element_Creg.h" to the top. This compiles the header in its entirety. ===== Renaming ===== Many things in the template need to be renamed to reflect the new Element. There are comments throughout the C++ template labeled: <