From: Windsor, B. <B.W...@wa...> - 2016-08-25 11:40:28
|
Dear Rafa Thank you so much for the detailed reply, that will definitely get me started in the C^0 and C^1 cases. The project will remain on curves it seems so that should keep things a bit simpler. Many thanks for the help, all the best Ben ________________________________ From: Rafael Vazquez <va...@im...> Sent: 25 August 2016 12:05:53 To: geo...@li... Subject: Re: [Geopdes-users] Periodic NURBS space Dear Ben, periodic boundary conditions are not implemented yet, and I don't think I will implement them shortly. But all what you need should be already in GeoPDEs. Let me start with the simple C^0 periodic case and an open knot vector. In this case you only need to identify the first and last functions, changing the ID array. In Matlab I suggest you not to change the connectivity array, but to change the array for matrix construction. First, notice that the operators (op_gradu_gradv_tp, and so on) can give you as the output the rows, columns and values to construct a sparse matrix. You can impose periodicity in this way (only valid for curves): [rows, cols, vals] = op_gradu_gradv_tp (space, space, msh); rows(rows == space.ndof) = 1; cols(cols == space.ndof) = 1; mat = sparse (rows, cols, vals, space.ndof-1, space.ndof-1); You must also modify the right-hand side: rhs = op_f_v_tp (space, msh, coeff); rhs(1) = rhs(1) + rhs(end); rhs(space.ndof) = []; And after you solve the system, to be able to use all the GeoPDEs functionality, you must also modify the computed solution: u = mat \ rhs; % A vector of length space.ndof-1 u(space.ndof) = u(1); % A vector of length space.ndof, that you can now use for post-processing That was the easy case. For the more difficult C^1 (or higher case), you need to do two things: 1. Unclamp the open knot vector, to get basis functions as in Fig. 1(b) of the article, with the correct weights. 2. Impose the periodicity in the matrix and right-hand side, considering more than one index. For the first part, you can call the function nrbunclamp of the NURBS toolbox. This will give you the same parametrization with a non-open knot vector, and with the correct weights. You can now use the new knot vector and weights to construct the space with sp_nurbs. Unfortunately, some of the functions of the toolbox (like nrbderiv) do not work with non-open knot vectors, so you will have to call nrbunclamp *after geo_load*. In other words, the geometry is created with the open knot vector, but the space is defined with the non-open knot vector. The second part is very similar to the C^0 case, and you can do it with a loop from 1 to k, where C^{k-1} is the aimed continuity, identifying now the indices 1:k with space.ndof-k+1:space.ndof. Some comments: 1. I have not studied the paper you cited, so I'm not completely sure that the approach is completely equivalent. 2. With this approach, you must have periodicity also in the parametrization, like in Fig. 17(a) of the paper. If you move one of the control points, without moving the corresponding control point on the other side, you would lose C^1 continuity in the physical domain. I'm not sure if this is the same in their approach. 3. If you are trying to solve a high order PDE, like Cahn-Hilliard, you will need to avoid C^0 functions. Using nrbcirc, C^0 functions appear if you use an angle greater than pi/2. That's probably the reason why they used one sixth of the ring (Fig. 9). 4. I explained how to impose the periodic conditions for curves. For surfaces and volumes one can use the indices in boundary.dofs (C^0 case) and boundary.adjacent_dofs (C^1 case). 5. I think that periodic conditions may be already implemented in PetIGA (written in C). Best, Rafa On 24/08/2016 18:09, Windsor, Ben wrote: > Apologies, I actually meant the paper: > > 'Isogeometric analysis of the advective Cahn–Hilliard equation: Spinodal decomposition under shear flow' > > Sorry about that, > Ben > > > > ________________________________ > From: Windsor, Ben <B.W...@wa...> > Sent: 24 August 2016 16:38:12 > To: geo...@li... > Subject: [Geopdes-users] Periodic NURBS space > > Dear geoPDEs users, > > > I am a second year mathematics student at Warwick university on a summer research placement. For this project we have been using the geoPDEs library with MATLAB to solve a PDE on a closed curve (just first using the nrbcirc function to start with). However to do this it would be most useful to have a periodic function space to search instead of the normal nurbs space. > > > I was just wondering if this periodic basis space was something implemented in the libary? > > > I have had a look through the sp_nurbs and the @sp_scalar code and most of the library but cant see an option to add conditions onto the functions that make up the basis space or to somehow alter the underlying basis functions. I have seen such functions discussed in papers like 'Isogeometric Finite Element Data Structures based on Bezier Extraction of NURBS' by Michael J. Borden, Michael A. Scott, John A. Evans, and Thomas J.R. Hughes but have yet to see any code implementation of these periodic functions that is available, though apologies if I have overlooked some functionality in the library! > > > Many thanks, > > Ben > ------------------------------------------------------------------------------ > _______________________________________________ > Geopdes-users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geopdes-users > ------------------------------------------------------------------------------ > _______________________________________________ > Geopdes-users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geopdes-users ------------------------------------------------------------------------------ _______________________________________________ Geopdes-users mailing list Geo...@li... https://lists.sourceforge.net/lists/listinfo/geopdes-users |