On Mon, Aug 22, 2016 at 1:08 PM Mike Marchywka <marchy...@hotmail.com> wrote:
> I tried that and the compiler did not like it because of the way you > designed the classes... > Compiler didn't like what? You have to write C++ that compiles. That has nothing to do with the "class design". Pay attention to the Doxygen pages... they tell you how to use each of the objects: http://libmesh.github.io/doxygen/classes.html > I was curious why you did that so the code would be more solid and > optimization is one possibility > although no one did mention the rationale behind making the size() of > a fixed size vector into a norm - it sounds like you are still deprecating > things as you go. > The library evolves over time... new features are added and some old things deprecated. That's the way with any software project. The rationale behind size() for TypeVector was because TypeVector represents a mathematical vector. The "size" of a mathematical vector is its norm... with the 2 norm (also called the Euclidean Norm) being the most obvious choice. Check the first sentence here: https://en.wikipedia.org/wiki/Norm_(mathematics) Go ask a mathematician how they would measure the size of a vector... and they will directly tell you to use a norm. The number of entries doesn't mean anything mathematically. Not too mention that there is no need for a function to return the number of entries in a TypeVector... because the number of entries is always LIBMESH_DIM. That said, we realized the name could be mistaken for being the number of entires in the array and added the new "norm()" function and we'll remove "size()" soon. This is simply to reduce confusion. You can read the discussion here: https://github.com/libMesh/libmesh/issues/813 > It would be easier to get it working if I could move code around freely > with normal operations being permitted. I'm not sure what you mean here... you can "move around" anything you want... as long as what you write is still valid C++. Maybe I wasn't clear earlier... so let me try again: you are currently not in a position to recommend modifications to libMesh. libMesh is used by hundreds of people every day. The design has been carefully curated and evolved by experts over the last 15 years. Before recommending changes or criticizing things about the library: you are going to need to use it the way it is. After you develop an application (or two... or three) and you understand the current design then you can come back to us with well reasoned design evolutions and we can have a proper discussion. Derek ------------------------------------------------------------------------------ _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users