Hi Michael This was quite useful. I'll have a look at TriaAccessor::veterx_index like you suggested. Also, yes, could you send me your code that implements it for boundaries. It'll be quite useful to peruse it and extend it to my needs. Thanks. Regards Ted
--- On Fri, 22/1/10, Michael Rapson <[email protected]> wrote: From: Michael Rapson <[email protected]> Subject: Re: [deal.II] Binding an Object to Each Node in a Triangulation To: "dealii" <[email protected]> Date: Friday, 22 January, 2010, 10:23 Hi there, I do something similar by associating objects implementing state space equations to either nodes or quadrature points on the boundary of my domain. In the case of nodes my process is: Walk over the triangulation finding the location of specific points to create objects with parameters based on their location. For each location also associate it with its global dof index, which is available from the library.. (I believe that I currently use a std::map <unsigned int, object_type> where first is the dof index and second is my object.) I have a two layer structure of a class that handles a 'compilation' of my objects, i.e. creates them, knows where they are in the dof handler and manages input and output from them, and object classes that simply take input, implement the state space model and provide output. My compilation class reads data in from the standard solution vector, since it stores the dof indicies to access. For data output you could simply write the data you need back into Vector <double>s arranged as the solution vector is, in which case you can use the standard cell->get_dof_indices (local_dof_indices) to find the values when you are assembling. I usually request data cell by cell from my compilation during assembly, but this is more complex to implement. The summary: If I have understood you right you can definitely do what you are interested in with deal.II. I don't work with the location much but rather with the dof index which is available from the library. This works well but limits adaptive mesh refinement, which I presume you are not particularly interested in if you have objects with states. Check out the function TriaAccessor::vetrex_index. If you are interested I can send you some of my code that implements it for boundaries. Regards, Michael On Fri, Jan 22, 2010 at 11:50 AM, Ted Kord <[email protected]> wrote: Hello I was wondering if the following is possible using deal.II. My main concern is the order of evaluation of the nodes in a triangulation. 1. I'd like to create an object for every vertex in a triangulation. While (time < stop_time) { 2. For every vertex, a series of actions will be carried out on the attached object. The state of each object must be maintained till the end of the program. 3. The solution from every object at each vertex will be gathered into a solution vector. 4. This solution will be set as the initial condition for a parabolic pde. 5. The solution from the parabolic pde will be set as initial condition again for the objects at the vertices. Here, I'd need to extract each nodal solution and pass it to the 'correct' object based on its coordinates in the triangulation. 6. Same actions as in step 2. 7. Same action as in step 3.. 8. Save solution.} What I'm most worried about is how to pass the correct solution at the correct vertex to the object and vice-versa. This is also regardless of what type of element used, i.e., Q1, Q2, etc. Your advice is much appreciated. Regards Ted P.S: Also sent this to the mailing list via my gmail address but not sure if it made it. If it did, apologies for the duplicate. _______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii -----Inline Attachment Follows----- _______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
_______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
