-
Nils Kohl authored
This commit moves the boilerplate code that has been part of every form to a dedicated place: the IntegrandSymbols class and the process_integrand() function (integrand.py). This change simplifies the construction of new operators/forms. The refactoring is not complete (essentially, the files forms.py, forms_boundary.py, manifold_forms.py, etc. will become unnecessary). But for regression testing, the skeletons are kept for another while. Concrete changes and additions: * implemented the function process_integrand() that processes a symbolic integrand - see docstrings in integrand.py for details * moved symbolic integrand expressions to hog/recipes/integrands - less code and better separation of concerns * the TensorialVectorFunctionSpace can now be restricted to a single component - now the same integrands can be used for full vector forms and component-wise terms * fixing test and trial mix-up in generate_all_operators.py (see #14)
Nils Kohl authoredThis commit moves the boilerplate code that has been part of every form to a dedicated place: the IntegrandSymbols class and the process_integrand() function (integrand.py). This change simplifies the construction of new operators/forms. The refactoring is not complete (essentially, the files forms.py, forms_boundary.py, manifold_forms.py, etc. will become unnecessary). But for regression testing, the skeletons are kept for another while. Concrete changes and additions: * implemented the function process_integrand() that processes a symbolic integrand - see docstrings in integrand.py for details * moved symbolic integrand expressions to hog/recipes/integrands - less code and better separation of concerns * the TensorialVectorFunctionSpace can now be restricted to a single component - now the same integrands can be used for full vector forms and component-wise terms * fixing test and trial mix-up in generate_all_operators.py (see #14)
generate_all_operators.py 26.71 KiB