Hi all,

Say I want to solve the poisson equation, but with different material 
properties in the domain, a heterogeneous material. This heterogeneous material 
is piecewise constant in each element. So far I can define it with an 
ExplicitSystem and adding a variable that is CONSTANT and MONOMIAL, let’s name 
Densities to this ExplicitSystem. To solve the Poisson equation, I define the 
PoissonSystem, derived from FEMSystem.

I want to have access to Densities within PoissonSystem. I could call 
EquationSystems::get_system() every time I needed it, but I think it would be 
better if PoissonSystem had a pointer to Densities  and most importantly, I 
would prefer if adding the DensitySystem to the EquationSystems were done 
within PoissonSystem, so I can hide it from the user and PoissonSystem could 
perform other operations without depending on whether Densities has been added 
or not. I have tried the following: Add an ExplicitSystem pointer to 
PoissonSystem and add this system in the PoissonSystem constructor:

ExplicitSystem * densities

PoissonSystem(EquationSystems& es, const std::string& name_in,const unsigned 
int number_in):  FEMSystem(es, name_in, number_in) {
   densities = &(es.add_system<ExplicitSystem>("Densities"));
}

but when I try to access “Densities” outside of the constructor, it seems to be 
gone. I don’t understand this because this object is held by the 
EquationSystems. I get this error:


ERROR: no system number 1 found!

In any case, is there a better way to implement this functionality? Are there 
examples that are similar?

Thanks
Miguel

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to