Thank you very much!

 

The “rb_con.load_rb_solution()” is the answer I want.

 

I have not seen RB examples because I mistakenly thought that there was only 
content with exodus extension in examples.

So I have only looked at LibMesh documentation and have searched a “solution” 
keyword.

 

Thanks again for your kind answers to minor questions.

 

Regards,

SKang

 

From: David Knezevic <david.kneze...@akselos.com> 
Sent: Tuesday, July 10, 2018 9:52 AM
To: 강신성 <ss.k...@pusan.ac.kr>
Cc: libmesh-users <libmesh-users@lists.sourceforge.net>
Subject: Re: [Libmesh-users] [RB] Print solution vector as ".txt"

 

On Mon, Jul 9, 2018 at 8:43 PM, <ss.k...@pusan.ac.kr 
<mailto:ss.k...@pusan.ac.kr> > wrote:

Thank you for your reply, David

 

I think my question was unclear.

 

My final goal is the same as the question.

However, before I print solutions using “cout” or “I/O,” I do not know which 
variable the solution vector is stored in.

In other words, which variable can I use to load solutions of a PDE in RB codes?

I also want to know which variable stores nodes that match the above solutions.

 

I look forward your reply.

 

 

I'm not sure I understand what you're asking, but in general I'd suggest you 
review the reduced_basis examples carefully since that should cover what you're 
asking about. For example, see the "online stage" of reduced_basis_ex1, where 
we do "rb_con.load_rb_solution()". This loads the RB solution into the 
"solution" vector of the RBConstruction object.

 

Best,

David

 

 

 

From: David Knezevic <david.kneze...@akselos.com 
<mailto:david.kneze...@akselos.com> > 
Sent: Monday, July 9, 2018 9:12 PM
To: 강신성 <ss.k...@pusan.ac.kr <mailto:ss.k...@pusan.ac.kr> >
Cc: libmesh-users <libmesh-users@lists.sourceforge.net 
<mailto:libmesh-users@lists.sourceforge.net> >
Subject: Re: [Libmesh-users] [RB] Print solution vector as ".txt"

 

On Sun, Jul 8, 2018 at 10:53 PM, <ss.k...@pusan.ac.kr 
<mailto:ss.k...@pusan.ac.kr> > wrote:

Hello, all.



To find the maximum solution value, I try to print a solution vector, e.g.,
displacement vector in linear elasticity, as text extension.

However, I was able to find only the solution with the exodus extension. 



This exodus extension is useful to visualize with a program like "ParaView,"
but it is complicated to compare results directly.

So I want to print solution with ".txt" as follows: 



(node)          (solution)

1                  0.1122

2                  0.5454

.

3224             0.5722



If there are multiple solutions such as 2D elasticity (displacements for x
and y directions), I want to print a text file as



(node)           (x)                (y)

1                  0.1122           0.5556

2                  0.5454           0.5878

.

3224             0.5722           0.4125



Could you please tell me some ways or ideas?

If it is impossible, I want to print the maximum solution value in
"Terminal"  using "std::cout << . << std::endl" at least.



I always thank you for your help.

 

 

I gather you're asking how to write to a .txt file? That is a C++ question, not 
specifically related to libMesh. I suggest you look on the web for a tutorial 
for I/O, e.g. http://www.cplusplus.com/doc/tutorial/files/

 

Best,
David

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to