From: John P. <jwp...@gm...> - 2008-06-12 21:02:14
|
On Thu, Jun 12, 2008 at 3:46 PM, Derek Gaston <fri...@gm...> wrote: > Note that we don't have a matrix to condense in our matrix free scheme ;-) > > I ultimately think that we're going to use a BoundaryMesh to do > this... we'll just loop over the nodes in the boundary mesh and set > their residual as a post-processing step.... and avoid all of these > problems (including the triangle/tet problem). I know this is still in the idea stage, but I thought I would mention -- currently when you use the BoundaryInfo object to sync() with a BoundaryMesh, the BoundaryMesh makes its own *copy* of the nodes from the original mesh. (The reason for this was so that the BoundaryMesh could survive on its own, even if the original Mesh was destroyed. Also you can alter the BoundaryMesh independently of the original if you desire.) A better approach might be to define a boundary node_iterator in the style of the other node iterators... but I'm sure you will cross this bridge when you come to it. -J > > Derek > > On Thu, Jun 12, 2008 at 2:24 PM, Benjamin Kirk <ben...@na...> wrote: >> Many, many ages ago we did Lagrange BCs ('cus there weren't any other types >> of elements yet!) strongly. The trick is to do it at the element >> matrix/vector level before inserting into the global matrix. >> >> There is actually a member function in DenseMatrix to do this: >> >> Ke.condense(i,j,val,Fe); >> >> is what you want. This will impose val strongly by doing the right thing at >> the element level. Of course you can add these and instead of getting >> >> val=foo >> >> at the linear system level you get >> >> N*val = N*foo >> >> >> There is another, important issue though that John learned via suboptimal >> convergence on triangular meshes... Usually we only concern ourselves with >> BCs on elements whose sides intersect the boundary, e.g. NULL neighbors... >> If you are going to impose the value strongly through the element matrix >> approach you have to do it for all elements which touch the DOF. >> >> >> Finally, you can effectively accomplish the same thing with penalty using >> add() instead of set(), just add 1e30 to the global matrix diagonal and >> 1e30*value to the RHS, all the other entries will "go away" in floating >> point. >> >> -Ben >> >> >> >> On 6/12/08 3:12 PM, "Derek Gaston" <fri...@gm...> wrote: >> >>> It's kind of hard to see how to go from dofs_on_side back to the >>> mapping to Re()... you have to know what "node number" those dofs map >>> to for the current element. Or am I missing something? >>> >>> Derek >>> >>> On Thu, Jun 12, 2008 at 2:08 PM, Roy Stogner <ro...@st...> wrote: >>>> >>>> On Thu, 12 Jun 2008, Derek Gaston wrote: >>>> >>>>> Of course putting all my thoughts together in an email made me realize >>>>> what I needed to do... all I need to do is use the usual side >>>>> assembly... and call elem->is_node_on_side(i,side)... and if it is >>>>> then that dof is on the side... then I can just set >>>>> Re(i)=soln(dof_indices[i])-bc_value like I want to... overriding >>>>> whatever values were assembled into Re before I ever add it into the >>>>> residual... >>>> >>>> This looks good, but you might find it easier in the long run to use >>>> FE::dofs_on_side() rather than Elem::is_node_on_side; the latter might >>>> make it too easy to write code that only works on isoparametric >>>> Lagrange elements. >>>> --- >>>> Roy >>>> >>> >>> ------------------------------------------------------------------------- >>> Check out the new SourceForge.net Marketplace. >>> It's the best place to buy or sell services for >>> just about anything Open Source. >>> http://sourceforge.net/services/buy/index.php >>> _______________________________________________ >>> Libmesh-users mailing list >>> Lib...@li... >>> https://lists.sourceforge.net/lists/listinfo/libmesh-users >> >> > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Libmesh-users mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libmesh-users > |