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
The last commit (commit f063d85c9a8df) removed the last of inner boundary from ContainedComp. For a long time ContainedComp tried to do two jobs. It held a HeadRule (boundary) which was used for intersecting things internally and held a rule for the outer surface. This causes confusion and if a user wants a HeadRule for intersection use ExternalCut or a linkPt/Surf (depending on situtation).
Purpose of ContainedComp
The stated purpose of ContainedComp is to provide the outer boundary/surface of an object (or group of objects). If an object doesn't have a clean outer boundary because it is a multiple of bits (i.e. consider a coffee mug, it has a handle and a main cup, it might make sense to call that two ContainedComp s (Cup/Handle) and make the object a ContainedGroup. Then it can be treated as a whole object (e.g. insertAllInCell(...) etc.) or as parts (e.g. insertInCell("Cup"...)
The complication was that early on I added an inner boundary for an object. This made a mess. What to do when there is multiple inner boundaries and one outer, or via-versa. Why carry abound the inner boundary code (and cause confusion) when it is not needed. Later, a much better way to do inner boundaries was implemented (ExternalCut) but the legacy code remained.
Dealing with legacy use of boundary
If you have some old code that uses getBoundary etc.. from ContainedComp (or you are writing an object that you would like to have the idea of both an outer surface and a boundary. The fastest way to do this is to make your object an ExternalCut e.g.
class Widget : public attachSystem::FixedRotate, public attachSystem::ContainedComp public attachSystem::ExternalCut {... }
Then you can use it as you wish (note: it doesn't need to be constant etc) .
This allows for cases where you have two or more boundaries. You can test if the boundary is set, you can have named boundaries etc.
Summary
Removal of inner boundary from ContainedComp/ Group has been done for all Models in the current branch and they have been checked to be valid (it is possible I have made mistakes but please report them). This included TS2/TS1 and all target options, (RAL),
Delft (reactor), Max IV and the ESS model.
I think this is an improvement.... as usual, if you find errors, have comments, like or don't like this ... I will be delighted if you add comments (or email me).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Introduction
Purpose of ContainedComp
The stated purpose of ContainedComp is to provide the outer boundary/surface of an object (or group of objects). If an object doesn't have a clean outer boundary because it is a multiple of bits (i.e. consider a coffee mug, it has a handle and a main cup, it might make sense to call that two ContainedComp s (Cup/Handle) and make the object a ContainedGroup. Then it can be treated as a whole object (e.g.
insertAllInCell(...)
etc.) or as parts (e.g.insertInCell("Cup"...)
The complication was that early on I added an inner boundary for an object. This made a mess. What to do when there is multiple inner boundaries and one outer, or via-versa. Why carry abound the inner boundary code (and cause confusion) when it is not needed. Later, a much better way to do inner boundaries was implemented (ExternalCut) but the legacy code remained.
Dealing with legacy use of boundary
If you have some old code that uses getBoundary etc.. from ContainedComp (or you are writing an object that you would like to have the idea of both an outer surface and a boundary. The fastest way to do this is to make your object an ExternalCut e.g.
class Widget :
public attachSystem::FixedRotate,
public attachSystem::ContainedComp
public attachSystem::ExternalCut
{... }
Now in the code you can write this:
Widget X(keyName);
HeadRule HR=ModelSupport::getHeadRule(SMap,buldIndex,"1 -2 3 -4");
X.setCutSurf("Boundary",HR);
Then later in X (for example in createObject() ) you can do this:
void Widget::createObject(Simulation& System)
{
// ...
const HeadRule& boundary=getRule("Boundary");
Then you can use it as you wish (note: it doesn't need to be constant etc) .
This allows for cases where you have two or more boundaries. You can test if the boundary is set, you can have named boundaries etc.
Summary
Removal of inner boundary from ContainedComp/ Group has been done for all Models in the current branch and they have been checked to be valid (it is possible I have made mistakes but please report them). This included TS2/TS1 and all target options, (RAL),
Delft (reactor), Max IV and the ESS model.
I think this is an improvement.... as usual, if you find errors, have comments, like or don't like this ... I will be delighted if you add comments (or email me).
Beta Was this translation helpful? Give feedback.
All reactions