Skip to content

Commit a93dbde

Browse files
committed
Changes related to get mesh code
1 parent b4a67a7 commit a93dbde

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-3
lines changed

advanced/advanced_topics.rst

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
Advanced Topics
22
===============
33

4-
To Do:
4+
Upcoming:
55

6-
* How to generate SDK code from an existing simulation
7-
* How to generate SDK code from an existing mesh
86
* How to postprocess VTK using Pyvista
97
* How to postprocess VTK using Paraview
108
* Manual mesh sizing

tutorial/meshing.rst

+28
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,31 @@ so the platform knows that it should use it as part of the simulation computatio
107107
108108
Now our simulation is ready for computation, with its physics model and a mesh
109109
completely defined.
110+
111+
Generating Code for Mesh Model
112+
------------------------------
113+
114+
In the same fashion as a simulation model, SDK code can be generated from an existing
115+
mesh that was set up in the Workbench for convenience (for example, to easily assign
116+
refinements to geometry faces). To achieve this, we make use of the
117+
``MeshOperationsApi.get_mesh_operation_sdk_code`` method:
118+
119+
120+
.. code-block:: python
121+
122+
mesh_skd_code = mesh_operation_api.get_mesh_opeartion_sdk_code(
123+
project_id,
124+
mesh_operation_id,
125+
)
126+
127+
128+
The ``mesh_operation_id`` can be obtained in a similar fashion to the way is
129+
done for a simulation:
130+
131+
132+
.. code-block:: python
133+
134+
print(mesh_operation_api.get_mesh_operations(project_id)
135+
136+
137+
Then identifying the proper mesh and noting down its ``mesh_operation_id``.

0 commit comments

Comments
 (0)