File: modify-formfactor.md

package info (click to toggle)
bornagain 23.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 103,936 kB
  • sloc: cpp: 423,131; python: 40,997; javascript: 11,167; awk: 630; sh: 318; ruby: 173; xml: 130; makefile: 51; ansic: 24
file content (45 lines) | stat: -rw-r--r-- 1,654 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#### How to make an API change that involves a form factor

This note shall help when you
* add a form factor
* remove a form factor
* change a form factor's argument list

After adding or removing a form factor, the following files need to be updated:
* Core/Basics/BornAgainNamespace.h
* Core/Parametrization/INodeVisitor.h (in two places)
* Core/includeIncludes/HardParticles.h
* Wrap/swig/libBornAgainCore.i (in two places: #include and %include)

Possibly, the form factor appears in
* Tests/UnitTests/Core/Sample/FormfactorBasicTest.cpp
* Core/StandardSamples/SampleComponents.cpp
* Core/StandardSamples/...

Examples and tests, e.g.:
* Examples/python/simulation/ex01_BasicParticles/AllFormfactorsAvailable.py
* Examples/python/simulation/...
* Tests/UnitTests/Core/Sample/FormfactorBasicTest.cpp
* Tests/UnitTests/GUI/TestGUICoreObjectCorrespondence.cpp
* Tests/ReferenceData/Core/Formfactors_*
* Tests/ReferenceData/Core/FormfactorsWithAbsorption_*

If the form factor is supported by the GUI, then also:
* GUI/Models/GroupInfoCatalogue.cpp
* GUI/Models/item_constants.h
* GUI/Models/FormfactorItems.h and .cpp
* GUI/Models/GUIDomainSampleVisitor.h and .cpp
* GUI/Models/ItemCatalogue.cpp
* GUI/Models/item_constants.h
* GUI/Views/RealSpaceWidgets/RealSpaceMesoCrystalUtils.cpp
* GUI/Views/widgetbox/widgetbox.qrc
* GUI/Views/widgetbox/widgetbox.xml

If there is a real-space view:
* GUI/Models/item_constants.h
* GUI/ba3d/ba3d/model/model.cpp
* GUI/ba3d/ba3d/model/particles.h and .cpp
* GUI/Views/RealSpaceWidgets/RealSpaceMesoCrystalUtils.cpp
* GUI/Views/RealSpaceWidgets/TransformTo3D.cpp

Recreate bindings with `cmake -DAUTOGENERATE=ON ..`