On Wed, 16 Aug 2017, Renato Poli wrote:
if ( mesh.processor_id() == 0) {
MeshSerializer serialize(mesh, true, true);
You actually need a serializer to run on every processor, not just
proc 0, even in the case where you're only serializing onto proc 0.
Even if proc 0 is the only thing receiving mesh information, the other
processors need to know to send it.
This probably isn't a problem for you right now, though - the
default libMesh Mesh is a ReplicatedMesh, serializers are do-nothing
code on already-serialized meshes, and you should stick with
always-serialized ReplicatedMesh until your code is working in that
simpler case.
FEMainWindow *win = new FEMainWindow(mesh, sys);
Pardon the rude question, but just to make sure we're not in the
middle of an XY problem:
You're sure you need your own from-scratch GUI here? You definitely
can't make do with Paraview, VisIt, or some such?
...
libMesh::MeshBase::const_element_iterator el =
_mesh.active_elements_begin();
const libMesh::MeshBase::const_element_iterator end_el =
_mesh.active_elements_end();
for ( ; el != end_el ; ++el)
{ ... sys.point_value(0,pt,elem) ...}
Here I don't see anything obviously wrong. What's the failure?
I also inspected the "wirte_nodal_data" in MeshOutput, and got into
EquationSystems::build_parallell_solution_vector. I couldn't understand
completely what is going on there.
Yeah, there's a lot of complication (multiple systems, multiple
variables per system, vector-valued variables, subdomain-restricted
variables...) in that method which won't be relevant for you right
away.
It seems that each process is adding its local nodes to the
parallell_soln_ptr, using a "_communicator". Is that so?
Adding nodes on its local elements, then averaging by the number of
elements around each node, but yes.
What do you recommend for my case? Should I use the
build_parallell_solution_vector directly?
If you're happy with the compromises it makes (e.g. ignoring
non-vertex/higher-order solution bases, averaging away jumps
in discontinuous solutions) then it's a good way to start.
Even if you're not happy with those compromises, it might be good for
getting proof-of-concept code working.
WIll the sys.point_value work after that?
If you use that, then you won't need sys.point_value at all; you can
just index the solution vector it gives you by the node number you're
interested in.
---
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