Skip to content

Add compas_3dec solver integration - #23

Open
adellendice wants to merge 5 commits into
BlockResearchGroup:mainfrom
adellendice:3dec-integration-refactor
Open

Add compas_3dec solver integration#23
adellendice wants to merge 5 commits into
BlockResearchGroup:mainfrom
adellendice:3dec-integration-refactor

Conversation

@adellendice

Copy link
Copy Markdown

Summary

Integrate compas_3dec as a solver backend for compas_dem.

Changes

  • Add Solver.ThreeDEC(...) configuration.
  • Dispatch Problem.solve() to the ThreeDEC adapter.
  • Convert a compas_dem.Problem with
    ThreeDECAnalysisBuilder.from_dem_problem(problem).build().
  • Run the prepared analysis with ThreeDECSolver.
  • Convert native 3DEC output through
    raw_results.to_compas_dem_results(analysis).
  • Add solver configuration and dispatch tests.
  • Add an opt-in real 3DEC gravity smoke test.
  • Add a manual arch-gravity example with DEMViewer visualisation.

Verification

  • Ruff formatting and linting pass.
  • Automated adapter tests pass.
  • Real 3DEC arch gravity analysis completes successfully.
  • Converted DEM results display successfully in DEMViewer.

Notes

compas_3dec remains an optional dependency. The real solver smoke test is
skipped unless COMPAS_3DEC_EXECUTABLE is configured.

>>> problem = Problem(model)
>>> problem.add_gravity()
>>> problem.solver(Solver.CRA()) # doctest: +SKIP
>>> _ = problem.add_boundary_condition("gravity").add_gravity()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you add # doctest: +SKIP the awkward _ assignment is not necessary

Comment thread requirements-dev.txt
invoke >=0.14
ruff
sphinx_compas2_theme
myst-parser

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha, i haven't switched this to mkdocs yet...

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants