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

ReplaceFemSpace.spaces and FemField.fields with more specific attributes #459

Open
yguclu opened this issue Feb 21, 2025 · 0 comments · May be fixed by #468
Open

ReplaceFemSpace.spaces and FemField.fields with more specific attributes #459

yguclu opened this issue Feb 21, 2025 · 0 comments · May be fixed by #468
Labels
Next Release Must be in next release

Comments

@yguclu
Copy link
Member

yguclu commented Feb 21, 2025

Let Vh be a FemSpace. Currently Vh.spaces may return different types of spaces, which makes the code not always easy to read, and hampers the single/multi-patch compatibility. Instead of this attribute, we should provide more specific helper attributes:

  • Vh.patch_spaces[i]:
    if Vh is a multi-patch space (ie ProductFemSpace), return FEM space on patch i
    if Vh is single-patch (anything else) return itself (and raise Error if i>0 ?)

  • Vh.component_spaces[i]:
    if Vh is a multi-patch space (ie ProductFemSpace), raise error
    if Vh is single-patch, vector-valued (ie VectorFemSpace) return space of component i
    if Vh is single-patch, scalar-valued (ie TensorFemSpace) return itself (or error? only if i>0?)

  • Vh.axis_spaces[i]:
    if Vh is single-patch, scalar-valued tensor-product (ie TensorFemSpace), return space for axis i
    else raise Error ?


A similar problem occurs for a multipatch/vector-valued FemField uh (uh.fields may correspond to patch or component fields). Instead of this attribute, we should provide more specific helper attributes:

  • uh.patch_fields[i]:
    if uh is a multi-patch field returns FEM field on patch i
    else returns itself (raise error if i>0 ?)

  • Vh.component_fields[i]:
    mimic behavior of Vh.component_spaces?

@yguclu yguclu changed the title Provide specific helper attributes instead of FemSpace.spaces Provide specific helper attributes instead of FemSpace.spaces and FemField.fields Feb 21, 2025
@yguclu yguclu changed the title Provide specific helper attributes instead of FemSpace.spaces and FemField.fields ReplaceFemSpace.spaces and FemField.fields with more specific attributes Feb 21, 2025
@yguclu yguclu added the Next Release Must be in next release label Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Next Release Must be in next release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant