CodeAster: How to Help Oneself (Topic under construction)
This short tutorial is for those who seek help and are eager to get it quickly; to help themselves. It is primarily written for non French users who sometimes struggle with the intricacies of reading CodeAster's extensive documentation and furthermore understanding it. It suggests some shortcuts to finding command examples and information - fast.
Which Aster Command to Use?
One place to look is the Glossary of Terms on the CodeAster website http://www.code-aster.org/wiki/doku.php?id=en:p01_util:p120_terms. Let's assume you want to model a contact phenomenon with or without friction. Do a word search for 'Friction' using your browser's search text feature. This will lead you to the keyword 'FROTTEMENT'. Thus you need to look for examples (*.comm files) with the word 'FROTTEMENT' in them.
Note: This is not a comprehensive list so feel free to correct or add to it.
How To Word Search *.COMM Files?
There are several ways to do this, 3 of which are listed here:
If Aster has been installed in /opt/aster/STA10.2 use: (otherwise modify the path suitably)
$ grep -l 'FROTTEMENT' /opt/aster/STA10.2/astest/*.comm | less
Which will display a long list and you can examine each comm file. Maybe you should search for two key words instead such as:
$ grep -l 'FROTTEMENT' /opt/aster/STA10.2/astest/*.comm | xargs grep -l 'DYNA_NON_LINE' | less
This will list only the files containing both 'FROTTEMENT' and 'DYNA_NON_LINE' a much shorter list to examine. You can pipe additional 'xargs grep -l' search commands to further refine your search too. Now you can use 'less' or your favourite text editor to display each file.
Another example is counting the number of *.comm files containing both 3D and 3D_SI modelisations.
$ grep -l "'3D_SI'" /opt/aster/NEW10.2/astest/*.comm | xargs grep -l "'3D'" | wc -l
Note: the keywords are deliberately enclosed in embedded levels of quotes because we are looking for single quoted strings ['3D'] as well as ['3D_SI'] which then need to be enclosed in double quotes for grep to work. This should give an output of '3'. Remove the pipe symbol '|' and the 'wc -l' (wordcount) command and you will get a list of the 3 files (with their full path).
This an English translation (by me) of an excellent python script written by (Vincent Magnenet -Thank you) and posted in the CodeAster forums http://www.code-aster.org/forum2/viewtopic.php?id=14162. Behind the scenes it uses shell commands to display search results in a nice GUI. It goes much further than the simple scripts described above. Also when you click on a file that was found, it automatically uses a text editor to display it for you. Unfortunately it is not capable of multiple (AND/OR logic) word searches.
Beagle (now called Desktop Search) is a Google like search tool for your Linux PC! Configure it to index certain directories and now you have power under your search finger tips.
Pros: Fast, extensive, allows multi-word (AND/OR logic) on PDF files too. Can use text editor, Adobe acrobat, etc to display files natively. Cons: Too many files displayed at times depending on what you have asked it to index.
Search the Forums
The CodeAster, CAELinux and Salome forums have a word search capability of varying abilities. Use them to see if somebody else has had a similar problem. Sadly a Bugzilla like problem bug reporting/resolution feature is not available on any of these forums!
Finally Ask the Forum
Finally, post your question on the forum.
This page was made possible by the help and advice of several individuals on the CodeAster, CAElinux and various other forums.
Disclaimer: This page is still evolving and omissions or errors are a regrettable part of such a process. So user beware! -JMB