[Smtk-developers] New Feature for Attribute Definitions - inheritable association rules
Robert Michael O'Bara
bob.obara at kitware.com
Wed Oct 25 17:33:37 EDT 2017
Hi Guys,
Like Haocheng, I’m leaning towards the subset criteria. David, you bring up a good use case that I can see happening, through I don’t think independent rules will solve the problem in an elegant way. Let’s assume the 2d template was using rule inheritance so that all boundary conditions can be assigned to edges come from a common boundary condition definition. Similarly, all surface conditions are derived from a common definition that has a face association rule.
Now, to reuse the template and change edges to faces and faces to volumes would require all of the leaf definitions to have a new definition derived from them to change the inherited association rule since you couldn’t simply change the base definition rules. It would certainly be doable but cumbersome.
I would probably suggest that instead, the entire template get copied for the 3D case and physically change the base definition rules.
One way to avoiding the copying of the template would be to somehow abstract out the topology information. Way back we had talked about having more abstract/conceptual model entity references like boundary and domain. Based on the dimension of the model, the interpretation of boundary and domain w/r actual topological elements would be determined. I’m not saying we should implement this approach but it would solve it the use case.
Does that make sense?
Sent from my iPad
On Oct 25, 2017, at 2:31 PM, David Thompson <david.thompson at kitware.com> wrote:
>> ...
>> For Example assume a base definition foo can be applied to edges and faces
>> A definition bar is derived from foo and is going to have a local association rule
>>
>> Which of the following are allowed?
>>
>> 1. bar can be associated with just faces (its rule is a subset of foo’s rule)
>> 2. bar can be associated with edges, faces, and volumes (its rule is a superset)
>> 3. bar can be associated with volumes (its rule is independent)
>>
>> The question boils down to if bar can be treated as a foo then should it be associated to at least all things foo? - then the we do superset
>> or is it a specialization of foo - in that case its a subset
>>
>> I think case 3 (independent) is probably not allowed?
>
> I can think of a use case you may not like, but which I can imagine a user attempting:
>
> Imagine a solver that can handle both 2D and 3D simulations.
> User A has develops an attribute system for 2D simulations using the solver and contributes it to the community.
> Now user B takes user A's system and wants to inherit its definitions but change the model associations so it will work with 3D systems.
> That is case 3 (independent rules) because boundary conditions and materials need to be different dimensions in the 3D case.
>
> David
More information about the Smtk-developers
mailing list