#
# Copyright 2015 ANSYS Inc. All Rights Reserved
#


#########################################################################
# PhysicsCoupling data model rules 
#########################################################################

DATAMODEL: PhysicsCouplingModel
    SINGLETON: ROOT
        Description = The top level object for all datamodel.
        Child List = FLUX                       
    END 
 
    SINGLETON: FLUX           
        Description = Placeholder for the PC data model    
        Entity List = Library, PhysicsCoupling
    END

    SINGLETON: Library
        Description = Placeholder for the PC data model library state (expressions)
        Entity Level = Internal
        Entity List =  Expressions
    END

    SINGLETON: Expressions
        Entity Level = Internal
        Entity List = PCExpression
    END

    OBJECT: PCExpression
        Entity Level = Internal
        Parameter List = ExpressionName, ExpressionString
        PARAMETER: ExpressionName
          Parameter Type = String
          Default Value = 
          Allow With Blank Values = True 
        END
        PARAMETER: ExpressionString
          Parameter Type = String
          Default Value =
          Allow With Blank Values = True 
        END
    END


    
    
    SINGLETON: PhysicsCoupling        
        Entity Level = Internal
        Entity List = CouplingParticipant, CouplingInterface  
        Parameter List = Mode
        Context Rule = Mode
        Allowed Option List = \                              
            Mapping           
           
            
        PARAMETER: Mode
            Parameter Type = String                     
        END                                                       
    END     
        
    PHYSICS:
        CHECK: isSCModeCosim       
            Type = Composite
            Result = !isSCModeMapping        
        END    

        CHECK: isSCModeMapping
            Type = Dependency
            Parameter Path = /FLUX/PhysicsCoupling/Mode
            Value List = Mapping
        END   
        
        CHECK: isTrue
            Type = Fixed Value
            Result Value = True
        END
    END    
END
