## Re: [Libmesh-users] additional degree of freedom

 Re: [Libmesh-users] additional degree of freedom From: Michael Povolotsky - 2005-08-13 19:53:08 ```> Michael, Would it be reasonable to pre-eliminate them from the matrix? > You could just build a std::vector or two for each DoF that way, solve > for just the global DoFs, and use them to modify the right hand sides > for the local DoFs. Roy, your solution sounds great. In my case "global" DOFs are coupled to almost every mesh DOF. But how to implement it? As far as I understand, in order to pre-eliminate them, I have to solve a system like Ax = b, where A is a non-square matrix of N*M size, with N being number of the global DOFs and M - the total number of DOFs. What kind of tools of Libmesh should I use (if any) in order to solve it? Thank you, Michael. ```

 RE: [Libmesh-users] additional degree of freedom From: KIRK, BENJAMIN (JSC-EG) (NASA) - 2005-08-11 15:47:00 Attachments: Message as HTML ```So, your linear system includes some other unknowns that are not associated with typical nodes or elements? All that really needs to happen is for additional DOFs to get accounted for in the matrix and vector. Problem is, as it stands now the DofMap loops over nodes & elements when it does its indexing. Sounds like what is needed is some mechanism to account for "other" DOFs? The quick & dirty way would be to create an additional variable in the system that is of type, say constant order monomial. This will give you one DOF per element to play with. You can pack your N "global" variables into the first N elements and then set the remainder to 0 as a standard Dirichlet constraint. By default the discontinuous DOFs have no implicit coupling with their neighbors, so the memory penalty for this approach should be minimal. That is, the sparse matrix entries for all these additional DOFs should be simply diagonal. -Ben -----Original Message----- From: libmesh-users-admin@... [mailto:libmesh-users-admin@...] On Behalf Of Michael Povolotskyi Sent: Wednesday, August 10, 2005 7:47 AM To: libmesh-users@... Subject: [Libmesh-users] additional degree of freedom Dear Libmesh developers, I 'd like to solve a linear system with Libmesh. The problem is that in addition to the DOFs that are defined on the mesh, I have to consider some other variables. These variables are, in some sence, global for the whole similation domain and can not be connected with a particular node or cell. So, I have add a new "global" DOF to the system. Is this possible? Thank you, Michael. ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Libmesh-users mailing list Libmesh-users@... https://lists.sourceforge.net/lists/listinfo/libmesh-users ```
 Re: [Libmesh-users] additional degree of freedom From: Michael Povolotsky - 2005-08-12 16:13:29 ```Dear Ben, yes, my problem is exactly what you have stated. Really, it would be very nice to be able to account for "other" DOFs. As for the "quick" solution that you have suggested, I think that I can try to use it, because number of "other" DOFs is certanly smaller than number of elements. Thank you, Michael. ```
 Re: [Libmesh-users] additional degree of freedom From: Michael Povolotsky - 2005-08-12 09:42:13 ```MessageDear Ben, yes, my problem is exactly what you have stated. Really, it would be very nice to be able to account for "other" DOFs. As for the "quick" solution that you have suggested, I think that I can try to use it, because number of "other" DOFs is certanly smaller than number of elements. Thank you, Michael. So, your linear system includes some other unknowns that are not associated with typical nodes or elements? All that really needs to happen is for additional DOFs to get accounted for in the matrix and vector. Problem is, as it stands now the DofMap loops over nodes & elements when it does its indexing. Sounds like what is needed is some mechanism to account for "other" DOFs? The quick & dirty way would be to create an additional variable in the system that is of type, say constant order monomial. This will give you one DOF per element to play with. You can pack your N "global" variables into the first N elements and then set the remainder to 0 as a standard Dirichlet constraint. By default the discontinuous DOFs have no implicit coupling with their neighbors, so the memory penalty for this approach should be minimal. That is, the sparse matrix entries for all these additional DOFs should be simply diagonal. -Ben -----Original Message----- From: libmesh-users-admin@... [mailto:libmesh-users-admin@...] On Behalf Of Michael Povolotskyi Sent: Wednesday, August 10, 2005 7:47 AM To: libmesh-users@... Subject: [Libmesh-users] additional degree of freedom Dear Libmesh developers, I 'd like to solve a linear system with Libmesh. The problem is that in addition to the DOFs that are defined on the mesh, I have to consider some other variables. These variables are, in some sence, global for the whole similation domain and can not be connected with a particular node or cell. So, I have add a new "global" DOF to the system. Is this possible? Thank you, Michael. ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Libmesh-users mailing list Libmesh-users@... https://lists.sourceforge.net/lists/listinfo/libmesh-users ```
 Re: [Libmesh-users] additional degree of freedom From: Roy Stogner - 2005-08-12 15:38:35 ```On Fri, 12 Aug 2005, Michael Povolotsky wrote: > As for the "quick" solution that you have suggested, I think that I can try > to use it, because number of "other" DOFs is certanly smaller than number of > elements. I assume these "global" DoFs are coupled to every other DoF in the mesh, right? In that case: Michael, Would it be reasonable to pre-eliminate them from the matrix? You could just build a std::vector or two for each DoF that way, solve for just the global DoFs, and use them to modify the right hand sides for the local DoFs. Ben, if he does use that "quick & dirty" trick, will there be any problems with the matrix sparsity pattern? I'm still used to Deal.II non-Petsc matrices, which used the mesh connectivity to build up the sparsity pattern explicitly and which made doing things like boundary element methods and global DoFs trickier. --- Roy ```
 Re: [Libmesh-users] additional degree of freedom From: Michael Povolotsky - 2005-08-13 19:53:08 ```> Michael, Would it be reasonable to pre-eliminate them from the matrix? > You could just build a std::vector or two for each DoF that way, solve > for just the global DoFs, and use them to modify the right hand sides > for the local DoFs. Roy, your solution sounds great. In my case "global" DOFs are coupled to almost every mesh DOF. But how to implement it? As far as I understand, in order to pre-eliminate them, I have to solve a system like Ax = b, where A is a non-square matrix of N*M size, with N being number of the global DOFs and M - the total number of DOFs. What kind of tools of Libmesh should I use (if any) in order to solve it? Thank you, Michael. ```
 [Libmesh-users] pre-elimination of additional degree of freedom From: Michael Povolotsky - 2005-08-14 06:21:00 ```> I assume these "global" DoFs are coupled to every other DoF in the > mesh, right? In that case: > > Michael, Would it be reasonable to pre-eliminate them from the matrix? > You could just build a std::vector or two for each DoF that way, solve > for just the global DoFs, and use them to modify the right hand sides > for the local DoFs. > Hello Roy, I see one weak point in your suggestion. Due to the fact that "global" DOFs are coupled to almost every other DOF, after the pre-elimination of them the system matrix becomes very dense. I wonder if this method can be realized effectively. What do you think? Michael. ```
 [Libmesh-users] Re: pre-elimination of additional degree of freedom From: Roy Stogner - 2005-08-14 06:59:02 ```On Sun, 14 Aug 2005, Michael Povolotsky wrote: >> I assume these "global" DoFs are coupled to every other DoF in the >> mesh, right? In that case: >> >> Michael, Would it be reasonable to pre-eliminate them from the matrix? >> You could just build a std::vector or two for each DoF that way, solve >> for just the global DoFs, and use them to modify the right hand sides >> for the local DoFs. > > Hello Roy, > I see one weak point in your suggestion. Due to the fact that "global" DOFs > are coupled > to almost every other DOF, after the pre-elimination of them the system > matrix becomes very dense. I wonder if this method can be realized > effectively. > What do you think? I think you're probably right. I made this suggestion based on having seen an interesting solver algorithm for such a "sparse except for a couple dense rows" matrix, but the problem was 1-D and so the sparse part was actually a narrow band. I don't know if there's anything similar you can do for more general sparse matrices. --- Roy ```
 Re: [Libmesh-users] additional degree of freedom From: Michael Povolotskyi - 2005-09-16 11:31:36 ```Dear Ben, now I'm implementing you suggestion. I have defined a new variable of type constant monomial in order to store additional DOFs. My question: If I use adaptive mesh refinement, I have apply constraints: dof_map.constrain_element_matrix_and_vector(Ke, Fe, dof_indices); Does this constraint perturb DOFs of a variable that is of type constant monomial? Thank you, Michael. KIRK, BENJAMIN (JSC-EG) (NASA) wrote: > So, your linear system includes some other unknowns that are not > associated with typical nodes or elements? > > All that really needs to happen is for additional DOFs to get > accounted for in the matrix and vector. Problem is, as it stands > now the DofMap loops over nodes & elements when it does its > indexing. Sounds like what is needed is some mechanism to account > for "other" DOFs? > > The quick & dirty way would be to create an additional variable in > the system that is of type, say constant order monomial. This > will give you one DOF per element to play with. You can pack your > N "global" variables into the first N elements and then set the > remainder to 0 as a standard Dirichlet constraint. > > By default the discontinuous DOFs have no implicit coupling with > their neighbors, so the memory penalty for this approach should be > minimal. That is, the sparse matrix entries for all these > additional DOFs should be simply diagonal. > > -Ben > > > > > > -----Original Message----- > *From:* libmesh-users-admin@... > [mailto:libmesh-users-admin@...] *On Behalf Of > *Michael Povolotskyi > *Sent:* Wednesday, August 10, 2005 7:47 AM > *To:* libmesh-users@... > *Subject:* [Libmesh-users] additional degree of freedom > > Dear Libmesh developers, > I 'd like to solve a linear system with Libmesh. The problem is > that in addition to the DOFs that are defined on the mesh, I have > to consider some other variables. These variables are, in some > sence, global for the whole similation domain and can not be > connected with a particular node or cell. > > So, I have add a new "global" DOF to the system. Is this possible? > > Thank you, > Michael. > > ------------------------------------------------------- SF.Net > email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > Practices Agile & Plan-Driven Development * Managing Projects & > Teams * Testing & QA Security * Process Improvement & Measurement > * http://www.sqe.com/bsce5sf > _______________________________________________ Libmesh-users > mailing list Libmesh-users@... > https://lists.sourceforge.net/lists/listinfo/libmesh-users > -- ------------------------------------------------------------ Michael Povolotskyi, Ph.D. University of Rome "Tor Vergata" Department of Electronic Engineering Viale Politecnico, 1 - 00133 Rome - Italy Phone + 39 06 72597367 Fax + 39 06 2020519 http://www.optolab.uniroma2.it/pages/moshe/moshe.html ------------------------------------------------------------- ```
 Re: [Libmesh-users] additional degree of freedom From: Roy Stogner - 2005-09-16 13:03:30 ```On Fri, 16 Sep 2005, Michael Povolotskyi wrote: > If I use adaptive mesh refinement, I have apply constraints: > dof_map.constrain_element_matrix_and_vector(Ke, Fe, dof_indices); > Does this constraint perturb DOFs of a variable that is of type constant > monomial? No; constraints only affect variables with nodal and/or edge degrees of freedom. Mesh refinement is going to cause your constant monomial variables to be moved from course onto fine cells, though. If you've originally got two cells with value 1 on element 0 and value 2 on element 1, then a uniform refinement will leave you with value 1 on elements 2-5 and value 2 on elements 6-9. --- Roy ```
 Re: [Libmesh-users] additional degree of freedom From: Michael Povolotskyi - 2005-09-20 10:45:33 ```Dear Libmesh developers, now I'm trying to implement your suggestion on additional DOFs. In doing so, I have to couple DOFs that belong to different elements of the mesh. Does it mean that have to use method virtual void SparseMatrix <; T >::add_matrix ( const DenseMatrix <; T > & /dm/, const std::vector< unsigned int > & /rows/, const std::vector< unsigned int > & /cols/ ) in order to be able to do this? Michael. || KIRK, BENJAMIN (JSC-EG) (NASA) wrote: > So, your linear system includes some other unknowns that are not > associated with typical nodes or elements? > > All that really needs to happen is for additional DOFs to get > accounted for in the matrix and vector. Problem is, as it stands > now the DofMap loops over nodes & elements when it does its > indexing. Sounds like what is needed is some mechanism to account > for "other" DOFs? > > The quick & dirty way would be to create an additional variable in > the system that is of type, say constant order monomial. This > will give you one DOF per element to play with. You can pack your > N "global" variables into the first N elements and then set the > remainder to 0 as a standard Dirichlet constraint. > > By default the discontinuous DOFs have no implicit coupling with > their neighbors, so the memory penalty for this approach should be > minimal. That is, the sparse matrix entries for all these > additional DOFs should be simply diagonal. > > -Ben > > > > > > -----Original Message----- > *From:* libmesh-users-admin@... > [mailto:libmesh-users-admin@...] *On Behalf Of > *Michael Povolotskyi > *Sent:* Wednesday, August 10, 2005 7:47 AM > *To:* libmesh-users@... > *Subject:* [Libmesh-users] additional degree of freedom > > Dear Libmesh developers, > I 'd like to solve a linear system with Libmesh. The problem is > that in addition to the DOFs that are defined on the mesh, I have > to consider some other variables. These variables are, in some > sence, global for the whole similation domain and can not be > connected with a particular node or cell. > > So, I have add a new "global" DOF to the system. Is this possible? > > Thank you, > Michael. > > ------------------------------------------------------- SF.Net > email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > Practices Agile & Plan-Driven Development * Managing Projects & > Teams * Testing & QA Security * Process Improvement & Measurement > * http://www.sqe.com/bsce5sf > _______________________________________________ Libmesh-users > mailing list Libmesh-users@... > https://lists.sourceforge.net/lists/listinfo/libmesh-users > -- ------------------------------------------------------------ Michael Povolotskyi, Ph.D. University of Rome "Tor Vergata" Department of Electronic Engineering Viale Politecnico, 1 - 00133 Rome - Italy Phone + 39 06 72597367 Fax + 39 06 2020519 http://www.optolab.uniroma2.it/pages/moshe/moshe.html ------------------------------------------------------------- ```