## [Libmesh-users] the problem about system matrix and solution

 [Libmesh-users] the problem about system matrix and solution From: Yujie - 2007-08-29 16:25:18 Attachments: Message as HTML ```Hi, I have found that Pan has a question about system matrix and solution as follows: "hi, at this point I would like to ask, how many system matrix and solution will be generated. I mean if I run parallel code in a cluster, does it mean there is one system matrix and system solution? And each node manages one part of the matrix and solution vector? thanx pan" I want to know whether I may generate multiple system matrixes and obtain multiple solutions? In addition, if the problem to be solved includes several PDEs (they are coupled), whether is libmesh avalible? If it ok, how to deal with them? thanks, Yujie ```

 [Libmesh-users] the problem about system matrix and solution From: Yujie - 2007-08-29 16:25:18 Attachments: Message as HTML ```Hi, I have found that Pan has a question about system matrix and solution as follows: "hi, at this point I would like to ask, how many system matrix and solution will be generated. I mean if I run parallel code in a cluster, does it mean there is one system matrix and system solution? And each node manages one part of the matrix and solution vector? thanx pan" I want to know whether I may generate multiple system matrixes and obtain multiple solutions? In addition, if the problem to be solved includes several PDEs (they are coupled), whether is libmesh avalible? If it ok, how to deal with them? thanks, Yujie ```
 Re: [Libmesh-users] the problem about system matrix and solution From: Roy Stogner - 2007-08-29 16:48:49 ```On Wed, 29 Aug 2007, Yujie wrote: > I want to know whether I may generate multiple system matrixes and obtain > multiple solutions? Yes. Each subclass of System has its own solution vector; each subclass of ImplicitSystem has its own matrix. If you want to add additional matrices the same system, use System::add_matrix() as in example 7. If you want to solve for different variables with independent matrices, use EquationSystems::add_system() to add multiple systems. > In addition, if the problem to be solved includes several PDEs (they > are coupled), whether is libmesh avalible? If it ok, how to deal > with them? Yes. If you want the coupling to be strong, you add additional variables to the same System object; if you want the coupling to be weak you add additional systems to the same EquationSystems object. For example if you're solving an incompressible flow and transport problem, you might have one system with velocity components u,v,w and pressure p, and a second system with concentration c. --- Roy ```
 Re: [Libmesh-users] the problem about system matrix and solution From: Yujie - 2007-08-30 06:45:08 Attachments: Message as HTML ```Dear Roy: In the system with multiple matrixes and multiple variables, in view of adaptive mesh refinment, how to make several variables guide adaptive mesh refinement? in view of parallel computation, what is the distribution of the matrixes in computer cluster when the user solves its problem? Whether does the user need to add some codes for dealling with the above problems? How can the user check the corresponding information? Thanks a lot. Regards, Yujie On 8/30/07, Roy Stogner wrote: > > On Wed, 29 Aug 2007, Yujie wrote: > > > I want to know whether I may generate multiple system matrixes and > obtain > > multiple solutions? > > Yes. Each subclass of System has its own solution vector; each > subclass of ImplicitSystem has its own matrix. If you want to add > additional matrices the same system, use System::add_matrix() as in > example 7. If you want to solve for different variables with > independent matrices, use EquationSystems::add_system() to add > multiple systems. > > > In addition, if the problem to be solved includes several PDEs (they > > are coupled), whether is libmesh avalible? If it ok, how to deal > > with them? > > Yes. If you want the coupling to be strong, you add additional > variables to the same System object; if you want the coupling to be > weak you add additional systems to the same EquationSystems object. > > For example if you're solving an incompressible flow and transport > problem, you might have one system with velocity components u,v,w and > pressure p, and a second system with concentration c. > --- > Roy > ```
 Re: [Libmesh-users] the problem about system matrix and solution From: Roy Stogner - 2007-08-30 13:12:31 ```On Thu, 30 Aug 2007, Yujie wrote: > In the system with multiple matrixes and multiple variables, in view of > adaptive mesh refinment, > how to make several variables guide adaptive mesh refinement? By combining error estimates from multiple variables. If you use the same type of estimator for all variables, you may just need to set ErrorEstimator::component_scale to normalize them. If not, you'll need to combine multiple ErrorVector results by hand. > in view of parallel computation, what is the distribution of the > matrixes in computer cluster when the user solves its problem? The Degree of Freedom numbering is contiguous on each processor, and each processor stores the matrix rows for each DoF it "owns". > How can the user check the corresponding information? You ought to look through the Class Docs pages. I know I'm more user friendly, but you can find answers there faster. --- Roy ```
 Re: [Libmesh-users] the problem about system matrix and solution From: Yujie - 2007-08-30 16:33:03 Attachments: Message as HTML ``` Dear Roy: > ~The Degree of Freedom numbering is contiguous on each processor, and > ~each processor stores the matrix rows for each DoF it "owns". That is, generally, the user don't need to consider this problem although his problem includes multiple matrices and multiple variables. Regarding what you said, I guess that each processor will store the rows of multiple matrices, not store the whole or part rows of the single matrix in the multiple matrices and variables situation. thanks, Yujie > In the system with multiple matrixes and multiple variables, in view of > > adaptive mesh refinment, > > how to make several variables guide adaptive mesh refinement? > > By combining error estimates from multiple variables. If you use the > same type of estimator for all variables, you may just need to set > ErrorEstimator::component_scale to normalize them. If not, you'll > need to combine multiple ErrorVector results by hand. > > > in view of parallel computation, what is the distribution of the > > matrixes in computer cluster when the user solves its problem? > How can the user check the corresponding information? > > You ought to look through the Class Docs pages. I know I'm more user > friendly, but you can find answers there faster. > --- > Roy > ```