Be careful about that conclusion. libMesh suppresses stdout from all ranks
except the master. If you want to see how many times something is printing
(not the best way to debug) add "--keep-cout" on the command line.

Cody

On Wed, Aug 17, 2016 at 11:13 PM Jayaraman, Vegnesh <vjayr...@illinois.edu>
wrote:

> I checked by printing a statement in the constructor. And I guess, the
> answer is there one copy of the ARRAY variable for the entire system.
>
> I am planning to declare another equation systems object (with a different
> mesh) within the foo system and hence I asked the question as I didnt want
> the declaration to be repeated for every element.
>
> Thank you.
>
> Regards
> Vegnesh
> ________________________________
> From: Jayaraman, Vegnesh
> Sent: Wednesday, August 17, 2016 11:31 PM
> To: libmesh-users@lists.sourceforge.net
> Subject: Memory used by a System Object.
>
> Hi
>
> I have a basic question on the memory used :
>
> I am creating a custom system class like :
>
> class foo : public System
> {
>   foo(EquationSystems& es,
>                        const std::string& name_in,
>                                   const unsigned int number_in):
>             :System(es, name_in, number_in),mesh(2),eq(mesh){}
>
> int VARIABLE;
> char ARRAY[100];
>
> };
>
> Now when I do the following:
>
> Mesh mesh(2);
> mesh.read("A_very_large_mesh.msh");
> EquationSystems es(mesh);
>
> es.add_system<foo>("Test");
> es.init();
>
>
> Now, is there one copy of ARRAY or variable for all the elements or if
> there are N elements or K nodes , there are N/K copies of ARRAY?
>
> Thank you,
> Vegnesh
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Libmesh-users mailing list
> Libmesh-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libmesh-users
>
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to