PrintEqns Procedure
Jump to navigation
Jump to search
Use this procedure to list all materials (including contacts, which are treated as materials), then print all the equations defined for those materials. Does not print interface equations that are not contacts because these are not defined as separate materials (you can print these, it's just that this procedure doesn't do it for you). You can delete the warning from the procedure if you don't like it.
# will print all the equations proc PrintEqns {} { set solution_list [solution list] set mater_list "[mater list][contact list]" foreach sol $solution_list { foreach mat $mater_list { if {[pdbIsAvailable $mat $sol Equation]} { set out "\n$sol in $mat: [pdbGetString $mat $sol Equation]" set str [append str $out] } } } set warning "\n\nCHECK THIS PRINTEQNS OUTPUT!!! CONTACT CANNOT DO VARIABLE EXPANSION ON CONST variables. If your contact equations have any letters in them besides 'DevPsi, Elec, Hole, or the contact name' then you are not substituting sufficiently by hand in your contact code." set str [append str $warning] return $str }