> This is almost right.  Instead of adding an additional variable to
> your system (which would then have to be taken into account in your
> implicit solves), create a separate ExplicitSystem with a variable
> there to store the data.  Then write a postprocessing loop that
> computes the flux of your main system and sets it into those variables
> in the secondary system.  If you're using FIRST order variables and
> you want the same approximation for your fluxes look at
> Zienkiewicz-Zhu.
> ---
> Roy
>
Can I use the add_vector function instead of add_variable to make the 
code neat,  shown as below:

// by add an "ExplicitSystem" to the EquationSystems object
  equation_systems.add_system<ExplicitSystem> ("Flux_System");
  equation_systems.get_system("Flux_System").add_vector ("gradT", FIRST);

instead of

  equation_systems.add_system<ExplicitSystem> ("Flux_System");
  equation_systems.get_system("Flux_System").add_variable ("gradT_x", 
FIRST);
  equation_systems.get_system("Flux_System").add_variable ("gradT_y", 
FIRST);
  equation_systems.get_system("Flux_System").add_variable ("gradT_z", 
FIRST);


If so, I found this "add_vector" function also is called at the element 
assembly part, which usually goes like "force.add_vector (Fe, 
dof_indices)" at the end of the element code. I don't know if the both 
"add_vector" are the same?

Thanks!

Liang






------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to