You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: framework/doc/content/source/csg/CSGBase.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -225,7 +225,17 @@ For all methods listed below, a unique pointer to the `CSGBase` object(s) create
225
225
- `getCSGBaseByName`: get the `CSGBase` object given a `MeshGeneratorName`
226
226
- `getCSGBasesByName`: get all `CSGBase` objects given a list of `MeshGeneratorName`s
227
227
228
-
For example:
228
+
These functions should be called from the constructor of the MeshGenerator, so that the MeshGenerator system can properly define the dependency tree of all mesh generators in the input file. The returned CSGBase pointers can be stored in a member variable and updated in the `generateCSG()` method in order to make any changes to the CSGBase object.
229
+
230
+
For example, the following member variable stores the pointer to the CSGBase object that is generated by an input mesh generator:
231
+
232
+
!listing TestCSGAxialSurfaceMeshGenerator.h start=Holds the generated CSGBase object end=_build_csg include-end=true
233
+
234
+
This variable is initialized in the constructor as:
Copy file name to clipboardExpand all lines: framework/doc/content/source/csg/CSGSurface.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,10 @@ To help determine the sign of these half-spaces, each surface type should have a
27
27
The type of surface must be set for `_surface_type` in the surface constructor.
28
28
It is recommended that this be done based on the class name using `MooseUtils::prettyCppType<SurfaceClassName>()` so that the surface type automatically matches the class that created it.
29
29
30
+
### Creating a Surface Clone
31
+
32
+
In order to make sure that clones of CSGBase objects are created properly, each derived `CSGSurface` type must implement a `clone()` method, which returns a `std::unique_ptr<CSGSurface>` from the given surface instance. This can typically be done by calling `std::make_unique` on the constructor for the derived surface type.
33
+
30
34
## Example
31
35
32
36
Below shows how `CSGSphere` is implemented as an example.
/// Holds the output CSGBase object for each mesh generator - including duplicates when needed by multiple downstream generators (key is MG name, value list is duplicates)
0 commit comments