Re: [Libmesh-users] Complex boundary

2009-10-13 Thread Roy Stogner
On Tue, 13 Oct 2009, Roy Stogner wrote: > Anyway, the solution is probably to, after you've looped over all > nodes, loop over all constraint equations in the dof map and apply > them to nodes' xyz coordinates. Thinking about it again, this is an oversimplification. For it to work, you'd need

Re: [Libmesh-users] Complex boundary

2009-10-13 Thread Roy Stogner
On Tue, 13 Oct 2009, Joa Ljungvall wrote: > #5 0x7fff81116bfc in __cxa_throw () > #6 0x00010512afa4 in RemoteElem::n_nodes () > #7 0x00010510acf4 in DofMap::dof_indices () > #8 0x00010510e2d9 in DofMap::add_neighbors_to_send_list () > > This I don't understand at all... Hmm..

Re: [Libmesh-users] Complex boundary

2009-10-13 Thread Joa Ljungvall
The problem with a negative jacobian seems solved. It was indeed a node that was moved in the wrong way by my code. Now the program iterates two times but then I get (running in gdb) EquationSystems n_systems()=1 System "Laplace" Type "LinearImplicit" Variables="u" Finite Elemen

Re: [Libmesh-users] Complex boundary

2009-10-13 Thread Roy Stogner
On Tue, 13 Oct 2009, Joa Ljungvall wrote: > As for getting inverted element, this means I've moved a node to the other > side of the opposite face of my tet? This could very well be a bug in my > code. I can, and will, check that I don't move nodes in an unreasnoble way. If you're sticking to f

Re: [Libmesh-users] Complex boundary

2009-10-13 Thread Joa Ljungvall
Hi again, Ok. Seems sensible to me. Now, I'm a nuclear physicist so FEM is not quite what I do for a living, but presently I'm giving it a try to see if it can improve some detector simulations we are doing, presently done with finite difference solvers, so bare with me even if I'm not 100% on tar

Re: [Libmesh-users] Complex boundary

2009-10-13 Thread Roy Stogner
On Tue, 13 Oct 2009, Joa Ljungvall wrote: > If I change the locations of the new nodes when they are made, i.e. somewhere > deep down in the MeshRefinement class, can I do what I would like to do? I don't think that would make any difference. If moving nodes eventually gives you an inverted ele

Re: [Libmesh-users] Complex boundary

2009-10-13 Thread Joa Ljungvall
Hmmm... If I change the locations of the new nodes when they are made, i.e. somewhere deep down in the MeshRefinement class, can I do what I would like to do? If I've understood everything correct a tet is subdivided by adding vertices halfway between the old ones. But there is nothing magic abou

Re: [Libmesh-users] Complex boundary

2009-10-13 Thread Roy Stogner
> 3) Copies all active elements to a new mesh, i.e. my new mesh have the right > nodes locations etc. but no "refinement" (is this true if I do it right?) This won't work if there's any adaptive refinement in the original mesh - libMesh relies on the parent element hierarchy to figure out hangi

Re: [Libmesh-users] Complex boundary

2009-10-13 Thread Joa Ljungvall
Hi again, If I: 0) Solve the equations one time... 1) Refine my mesh 2) Move my nodes 3) Copies all active elements to a new mesh, i.e. my new mesh have the right nodes locations etc. but no "refinement" (is this true if I do it right?) 4) I change mesh in my equation system 5) build my matrix

Re: [Libmesh-users] Complex boundary

2009-10-13 Thread Roy Stogner
On Tue, 13 Oct 2009, John Peterson wrote: > On Tue, Oct 13, 2009 at 11:40 AM, Joa Ljungvall wrote: >> It is quite possible that I move the wrong nodes the wrong way, but is my >> problem ;). The general question is, is this a possible route to take? I call >> this routine after refinement and c

Re: [Libmesh-users] Complex boundary

2009-10-13 Thread John Peterson
On Tue, Oct 13, 2009 at 11:40 AM, Joa Ljungvall wrote: > It is quite possible that I move the wrong nodes the wrong way, but is my > problem ;). The general question is, is this a possible route to take? I call > this routine after refinement and coursening, before > equation_systems.reinit(). I

Re: [Libmesh-users] Complex boundary

2009-10-13 Thread Joa Ljungvall
Hi again, during the day I been working a bit on the problem: Currently I have the exact geometry inside my program (implemented via CGS and GEANT4). What I have tried is to, after the refinement move the new boundary points using a code like this one (it tries to move all nodes on a boundary to

Re: [Libmesh-users] Complex boundary

2009-10-13 Thread John Peterson
On Tue, Oct 13, 2009 at 10:36 AM, Joa Ljungvall wrote: > Hi, > > The problem is that I have to solve my equation on the same domain with > very different boundary conditions, making a uniform refinement very > inefficient and a waste of time, and worse in my case, RAM. So I do need > to start with

Re: [Libmesh-users] Complex boundary

2009-10-13 Thread Joa Ljungvall
Hi, The problem is that I have to solve my equation on the same domain with very different boundary conditions, making a uniform refinement very inefficient and a waste of time, and worse in my case, RAM. So I do need to start with a very course mesh and refine. cheers Joa On Tue, Oct 13, 2

Re: [Libmesh-users] Complex boundary

2009-10-13 Thread Joa Ljungvall
Hi, I'm not sure I understood the answer. I want to start with a very course mesh, and refine it based on the solution on the course(r) mesh, i.e. adaptive refinment. So using gmsh I would have to communicate the solution in each step and tell gmsh which regions to refine, or? And if so, how? Fu

Re: [Libmesh-users] Complex boundary

2009-10-13 Thread David Knezevic
If you generate a mesh in gmsh that is sufficiently fine that a mesh of second order elements captures the geometry well enough, then you can read that mesh into libMesh, and just use libMesh's adaptive refinement as in the examples. In that situation, libMesh's adaptive refinement will interpo

Re: [Libmesh-users] Complex boundary

2009-10-13 Thread David Knezevic
I think the simplest thing to do is use second order elements in gmsh. Then when you refine the new nodes will interpolate the quadratic approximation to the boundary of your domain. - Dave Joa Ljungvall wrote: > Hi all, > > I would like to use libmesh to solve a rather simple equation > (Lap

[Libmesh-users] Complex boundary

2009-10-13 Thread Joa Ljungvall
Hi all, I would like to use libmesh to solve a rather simple equation (Laplace/poisson) but in a domain with a somewhat funny shape of the boundary. To do this I created a mesh using gmsh, modified example 14 a bit so it reads my mesh instead of the l-shaped domain. My problem is that when I refi