Fluid Dynamics Library
|class||fdl::Gaussian< scalar_t >|
|Gaussian field . More...|
|class||fdl::Spherical< scalar_t >|
|Indicator function, , on radially symmetric set . More...|
|class||fdl::Cylindrical< scalar_t >|
|Indicator function, , on a Cylindrical . More...|
|template<typename scalar_t >|
|static ScalarBase< scalar_t > *||fdl::ScalarCatalog (TiXmlNode *node)|
|Returns a new scalar class using a node of XML data. |
Scalar fields, such as temperature, density, etc., appear as coefficients in the PDE or possibly as initial conditions. Inevitably the definitions will become spread over several files, and this group is a way to index the fields by their documentation.
Each scalar field needs to be initialized with its own set of parameters, typically passed through the constructor. This has the potential to spawn inconsistent, or at best confusingly similar, type signatures of constructors as the catalog of functions grows. One way to manage this is to move it to the user-facing side: the initialization parameters are passed via an XML element that is read from a file and documented (!) for each scalar field class.
With a reasonably uniform XML format for all scalar fields in the library, key elements can be changed without needing to edit or recompile source code. An XML element of the following form contains all information needed to allocate and construct a given field.
<ScalarField> <Definition>ClassName</Definition> <Parameters param1="3" param2="0.14" ... /> </ScalarField>
The names of the "<Parameter>" attributes can be chosen at the class author's discretion and must(!) be documented.