Thanks for your advice.
However, the problem is still not solved.
Here, I attach a part of my code.
system_eb.solve();
for(unsigned int n_dofs=0;n_dofs<(*system_eb.solution).size();n_dofs++)
if(system_eb.current_solution(n_dofs)<(D_MIN*T_MIN)){
std::cout<<"pid = "<<libMesh::processor_id()<<std::endl<<n_dofs<<"
before = "<<system_eb.current_solution(n_dofs)<<std::endl;
(*system_eb.solution).set(n_dofs, D_MIN*T_MIN);
(*system_eb.solution).close();
std::cout<<"after =
"<<system_eb.current_solution(n_dofs)<<std::endl;
}
system_eb.update();
And a part of my results in single processor also attach.
pid = 0
3985 before = -5.765574668e+17
after = -5.765574668e+17
As you can see, vector value is not changed.
When using multiple process, it stops and not any message is shown.
In this case, entering for loop may occured in non-root processor.
What can I change my code?
________________________________
보낸 사람 : "[email protected]"
<[email protected]>
보낸 날짜 : 2017-05-20 21:04:42 ( +09:00 )
받는 사람 : [email protected]
<[email protected]>
참조 :
제목 : Libmesh-users Digest, Vol 132, Issue 18
Send Libmesh-users mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/libmesh-users
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Libmesh-users digest..."
Today's Topics:
1. Parallel solution access (Roy Stogner)
----------------------------------------------------------------------
Message: 1
Date: Fri, 19 May 2017 09:52:31 -0500 (CDT)
From: Roy Stogner
Subject: [Libmesh-users] Parallel solution access
To: "Chang, Hyonu"
Cc: [email protected]
Message-ID:
Content-Type: text/plain; charset="iso-8859-15"
On Fri, 19 May 2017, Chang, Hyonu wrote:
> Thank you for your answer.
You're welcome. Please use "Reply to all" - we want answers on the
public mailing list where they're searchable for future users.
> I just?changed current_local_solution to solution, but it?makes error message
> like this:
> [0]PETSC ERROR: Object is in wrong state!
> [0]PETSC ERROR: Not for unassembled vector!
>
> When I run this on single process, it?works well.
>
> What is I have to do?
You need to call "close()" on the vector in between assembly and use,
or in between different kinds (assignment vs accumulation) of
assembly. After your set() calls, but before the update(), I think.
Sorry that slipped my mind; I was assuming that update() also calls
close() on the source vector.
---
Roy
------------------------------
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users
End of Libmesh-users Digest, Vol 132, Issue 18
**********************************************
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users