FeResPost Web Site                     FeResPost Online User Manual

X.F.2 Transformation of modules into classes

Two post-processing classes are defined: "PostCauchy" and "PostConnect". Each of these classes has been obtained by modifying slightly the corresponding post-processing modules of Chapter X.E. Note that for connections, new criteria have been defined.

Both classes inherit the generic post-processing class "GenPost". This class is very short, and its main purpose is to manage a list of all the post-processing objects that shall be created when the data are defined (see below). The programming of the class looks as follows:

class GenPost  
 
    @@postList = []  
 
    public  
 
    def initialize  
        @@postList << self  
    end  
 
    def GenPost::each  
        @@postList.each do |current|  
            yield current  
        end  
    end  
 
end # class Post

The class also defines an iterator that loops on all the instances of the class that have been stored in class member data "@@postList".

  X.F.2.1 Post-processing of Cauchy stress tensor
  X.F.2.2 A composite post-processing