Scaffold Application
When to Use
Use this skill when the user asks to create a brand-new Kratos application under applications/.
Procedure
Do not hand-write the skeleton.
kratos/python_scripts/application_generator/already generates it:createApplication.py(andlaplacian_application_example.py) show theApplicationGeneratorAPI —AddVariables(...),AddElements(...),AddConditions(...), then.Generate().Copy one of those scripts, set the application name and the requested variables/elements/ conditions, and run it (
python <your_script>.py) fromkratos/python_scripts/application_generator/. This produces the fullapplications/<ApplicationName>/tree: CMakeLists.txt, application header/source, variables header, pybind module, and test suite stub.Register the application for the build. Applications are not wired into the root
CMakeLists.txt— it only loops over theKRATOS_APPLICATIONSenvironment variable (CMakeLists.txt:713-730) and callsadd_subdirectoryfor each entry. Add the new application's path toKRATOS_APPLICATIONSinbuild/configure.sh(or.bat).Review the generated files against a small existing application (e.g.
ConvectionDiffusionApplication) if anything looks off, and fill in real Elements/Conditions/Processes in place of the generator's placeholders.Summary — report the files generated, the
KRATOS_APPLICATIONSentry added, and remind the user to rebuild viascripts/standard_configure.*and to add the application to the CI JSON files under.github/workflows/if it needs CI coverage.