1. Why name it Phalanx?
2. Why does the evaluation type exist?
3. Why do evaluation types have arbitrary data types. Shouldn't all fields of an evaluation type require the same scalar type?
4. Why are the evaluators templated on the evaluation type?
5. Why is the MDALayout object not templated on the ArrayOrder type?
6. My code seems to be running slow. How can I speed it up?
7. Compilation take a long time when minor changes are made to an evaluator. How can I speed this up?
The phalanx was one of the most dominant military formations of the Greek armies in the classical period. It was a strictly ordered formation. The Phalanx software library figures out ordered dependencies of field evaluators. A second more obscure reference relates to the US Navy. The Phalanx software package was designed to provide nonlinear functionality for the Intrepid itegration library. Intrepid was the name of an aircraft carrier during in WW II. Modern US aircraft carriers are protected by a Close-In Weapons System (CIWS) named the Phalanx. Finally, the PI of this project is an avid strategy warfare gamer and leans towards military references.
This allows for multiple evaluations that used the same Scalar type, but different evaluators specific to the CalculationType. For example, evaluating the Jacobian (derivative of the residual with respect to the degrees of freedom) and the parameter sensitivities (derivative of the residual with respect to the parameters) both use the same Sacado data type. They both want derivatives but with respect to a different set of entities.
In 99% of the use cases, the answer is yes! By changing the scalar type for a specific type of computation, you can break the dependency chain and get incorrect answers. For example, if computing a Jacobian, you would use a FAD scalar type instead of a double scalar type for the evaluation. By mixing FAD and double fields in an evaluation type, you will lose derivative components and get incorrect sensitivities. But there are some use cases where one might want to use different data types. If the user knows that certain evaluation routines have no derivative components, they can bypass the AD chain by switching to doubles for that part of the computation. The is an expert only user mode, but we allow for it.
Each evaluator must be templated on the evaluation type to be able to (1) allow for the expert use mode described in FAQ 3. Why do evaluation types have arbitrary data types. Shouldn't all fields of an evaluation type require the same scalar type?; (2) use the automated factory class (PHX::EvaluatorFactory) to build the evaluator for each evalution type.
This introduces many complications in the comparison operator (operator==) during a comparison of a reverse and natural data layout with the same (but reversed index types). Should these objects be the same? Probably, but this might introduce some confusion. So in an effort to keep things as clean as possible, there is no differentiation based on forward or reverse (Fortran) array ordering. If we were to introduce this, then we would have to add another method to the DataLayout base class to allow for checking the ordering. If mixing natural and reverse ordering becomes common, we may revisit this decision.
See the section on Performance in the Users Guide that gives recomendations on how to maximize the efficiency of your code.
See the section on Performance in the Users Guide. Explicit template instantiation can be used.
Generated on Wed May 12 21:46:23 2010 for Phalanx by