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 declare an empty 2d array in xml input file #2814

Closed
tbeltzun opened this issue Nov 10, 2023 · 0 comments · Fixed by #2818
Closed

cannot declare an empty 2d array in xml input file #2814

tbeltzun opened this issue Nov 10, 2023 · 0 comments · Fixed by #2818
Assignees
Labels
type: bug Something isn't working type: new A new issue has been created and requires attention

Comments

@tbeltzun
Copy link
Contributor

tbeltzun commented Nov 10, 2023

Describe the bug

This used to work before in #2557, but xml / xsd schema validation is now broken in #2813 's CI.

Error

/tmp/GEOSX/inputFiles/wavePropagation/acouselas3D.xml:24: element ElasticSEM: Schemas validity error : Element 'ElasticSEM', attribute 'sourceCoordinates': [facet 'pattern'] The value '*** ***' is not accepted by the pattern '.*[\[\]`$].*|\***\s*(\***\s*(([+-]?[\d]*([\d]\.?|\.[\d])[\d]*([eE][-+]?[\d]+|\s*),\s*)*[+-]?[\d]*([\d]\.?|\.[\d])[\d]*([eE][-+]?[\d]+|\s*))?\s*\***,\s*)*\***\s*(([+-]?[\d]*([\d]\.?|\.[\d])[\d]*([eE][-+]?[\d]+|\s*),\s*)*[+-]?[\d]*([\d]\.?|\.[\d])[\d]*([eE][-+]?[\d]+|\s*))?\s*\***\s*\***'.
/tmp/GEOSX/inputFiles/wavePropagation/acouselas3D.xml:24: element ElasticSEM: Schemas validity error : Element 'ElasticSEM', attribute 'sourceCoordinates': '*** ***' is not a valid value of the atomic type 'real64_array2d'.
/tmp/GEOSX/inputFiles/wavePropagation/acouselas3D.xml fails to validate
XML validation failed. See details in xml_validation_results.log

Expected behavior

Be able to declare / initialize an empty 2D array from the xml input file.

Subset of xml (problematic line: sourceCoordinates="{ }"):

... 
<Problem>
  <Solvers>
    <ElasticSEM
      name="elasticSolver"
      discretization="FE1"
      targetRegions="{ Solid }"
      sourceCoordinates="{ }"
      outputSeismoTrace="1"
      dtSeismoTrace="1e-3"
      receiverCoordinates="{ { 3752.2936, 2400, 1866.6667 } }"/>
  </Solvers>
  ...
</Problem>

It makes sense in my coupled solver to have a single source in the acoustic domain and no source in the elastic sub-domain.

An alternative would be to make the source and receivers optional in a specific domain.

@tbeltzun tbeltzun added type: bug Something isn't working type: new A new issue has been created and requires attention labels Nov 10, 2023
@tbeltzun tbeltzun self-assigned this Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working type: new A new issue has been created and requires attention
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant