@@ -338,7 +338,7 @@ int ShowGraph::main(FILE* in, FILE*out,Communicator& pc) {
338338 if ( a->getName ()==" DOMAIN_DECOMPOSITION" || a->getLabel ()==" posx" || a->getLabel ()==" posy" || a->getLabel ()==" posz" || a->getLabel ()==" Masses" || a->getLabel ()==" Charges" ) {
339339 continue ;
340340 }
341- ActionToPutData* ap=dynamic_cast <ActionToPutData*>(a );
341+ ActionToPutData* ap=a-> castToActionToPutData ( );
342342 if ( ap ) {
343343 ofile.printf (" %s(\" label=%s \n %s \n\" )\n " , getLabel (a).c_str (), getLabel (a,true ).c_str (), a->writeInGraph ().c_str () );
344344 continue ;
@@ -347,12 +347,13 @@ int ShowGraph::main(FILE* in, FILE*out,Communicator& pc) {
347347 if ( as ) {
348348 continue ;
349349 }
350- ActionWithValue* av=dynamic_cast <ActionWithValue*>(a);
351- ActionWithArguments* aaa=dynamic_cast <ActionWithArguments*>(a);
352- ActionAtomistic* at=dynamic_cast <ActionAtomistic*>(a);
350+
353351 // Print out the connections between nodes
352+ ActionAtomistic* at=a->castToActionAtomistic ();
354353 printAtomConnections ( at, linkcount, false , ofile );
354+ ActionWithArguments* aaa=a->castToActionWithArguments ();
355355 printArgumentConnections ( aaa, linkcount, false , ofile );
356+ ActionWithValue* av=a->castToActionWithValue ();
356357 // Print out the nodes
357358 if ( !av ) {
358359 ofile.printf (" %s(\" label=%s \n %s \n\" )\n " , getLabel (a).c_str (), getLabel (a,true ).c_str (), a->writeInGraph ().c_str () );
0 commit comments