Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot bind different component to facilityArray #1

Open
baagaard-usgs opened this issue May 24, 2018 · 1 comment
Open

Cannot bind different component to facilityArray #1

baagaard-usgs opened this issue May 24, 2018 · 1 comment

Comments

@baagaard-usgs
Copy link
Contributor

The factory keyword is used to bind a default component to a facilityArray. Within a .cfg file or on the command line, we can assign an array of components, but we cannot assign a single component acting as the array.

Example

A materials array with a default factory creating an array with one facility.

Ok: Use the default

materials.homogeneous = materials.Elastic

Ok: Create array of two materials.

materials = [one, two]
materials.one = materials.Elastic
materials.two = materials.Plastic

Fails: Replace default factory with another factory.

materials = materials.ElasticPlastic

# This is interpreted as materials = [materials.ElasticPlastic]
@baagaard-usgs
Copy link
Contributor Author

Workaround is to create a derived class for the object holding the facility array and change the default factory for the facility array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant