On May 15, 2013, at 5:44 PM, Roy Stogner <[email protected]> wrote:

> 
> On Wed, 15 May 2013, Ataollah Mesgarnejad wrote:
> 
>> Unless I'm missing something, I don't think that would solve the problem.
>> 
>> Maybe I'm not explaining my problem clear enough: I have parameters in 
>> my_equation_system.parameters like "boundary_type_01" with a value like 
>> "ramp"  and "noundary_amp_01" with a value like 10.0 that is my way to 
>> implement a ramp  dirichlet bc 10*time on boundary_id=1. And there are bunch 
>> of different types. So if I want a WrappedFunction to construct a 
>> DirichletBoundary I need both the boundary_id and parameters.
> 
> You don't need the boundary_id because you already know the boundary
> id - if you initialize DirichletBoundary bdy_a with the set {1} of
> boundary ids, and you initialized DirichletBoundary bdy_b with the set
> {2} of boundary ids, then whenever the function attached to bdy_a gets
> called you know it was called for a point on boundary_id 1 and whenever the
> function attached to bdy_b gets called you know it was called for a
> point on boundary_id 2.  You use two different function objects.
> 

I understand.

> Your function would still need the parameters; for that you either
> need to use ugly global variables or you need to create your own
> FunctionBase subclass which stores an EquationSystems reference.  I'd
> recommend the latter.  WrappedFunction is mostly about backwards
> compatibility and easier prototyping of simple applications, not a
> recommended class for complex designs.

That's exactly is what I was wondering. 

As always many thanks for the help,
Ata

> ---
> Roy


------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to