<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="CouplingDataSchema" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <!--
                  targetNamespace="http://tempuri.org/CouplingDataSchema.xsd"
                  xmlns="http://tempuri.org/CouplingDataSchema.xsd"
                  xmlns:mstns="http://tempuri.org/CouplingDataSchema.xsd"
-->
    <!-- Content -->
    <xs:element name="Participant">
        <xs:complexType>
            <xs:choice>
                <xs:element name="SystemCouplingSteadyStaticDataParticipant" type="SystemCouplingSteadyStaticDataParticipant" />
                <xs:element name="SystemCouplingTransientStaticDataParticipant" type="SystemCouplingTransientStaticDataParticipant" />
                <xs:element name="SystemCouplingSteadyCoSimulationParticipant" type="SystemCouplingSteadyCoSimulationParticipant" />
                <xs:element name="SystemCouplingTransientCoSimulationParticipant" type="SystemCouplingTransientCoSimulationParticipant" />
            </xs:choice>
        </xs:complexType>
    </xs:element>

    <!-- Base Type -->
    <xs:complexType name="SystemCouplingParticipant" abstract="true">
        <xs:sequence>
            <xs:element name="Region" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="Output" minOccurs="0" maxOccurs="unbounded">
                            <xs:simpleType>
                                <xs:restriction base="xs:string" />
                            </xs:simpleType>
                        </xs:element>
                        <xs:element name="Input" minOccurs="0" maxOccurs="unbounded">
                            <xs:simpleType>
                                <xs:restriction base="xs:string" />
                            </xs:simpleType>
                        </xs:element>
                    </xs:sequence>
                    <xs:attribute name="Name" type="xs:string" use="required" />
                    <xs:attribute name="DisplayName" type="xs:string" use="required" />
                    <xs:attribute name="Topology" use="required">
                        <xs:simpleType>
                            <xs:restriction base="xs:string">
                                <xs:enumeration value="Point" />
                                <xs:enumeration value="Curve" />
                                <xs:enumeration value="Surface" />
                                <xs:enumeration value="Volume" />
                            </xs:restriction>
                        </xs:simpleType>
                    </xs:attribute>
                </xs:complexType>
            </xs:element>
            <xs:element name="Variable" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                    <xs:sequence>
                    </xs:sequence>
                    <xs:attribute name="Name" type="xs:string" use="required" />
                    <xs:attribute name="DisplayName" type="xs:string" use="required" />
                    <xs:attribute name="PhysicalType" type="xs:string" use="required" />
                    <xs:attribute name="DataType" use="required" />
                </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="Name" type="xs:string" use="required" />
        <xs:attribute name="UnitSystem" type="xs:string" use="required" />
    </xs:complexType>
    <!-- Results Types (1 way FSI) -->
    <xs:complexType name="SystemCouplingStaticDataParticipant" abstract="true">
        <xs:complexContent>
            <xs:extension base="SystemCouplingParticipant">
                <xs:attribute name="ResultsFileName" type="xs:string" use="required" />
                <xs:attribute name="ResultsFileType" type="xs:string" use="required" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="SystemCouplingSteadyStaticDataParticipant">
        <xs:complexContent>
            <xs:extension base="SystemCouplingStaticDataParticipant" />
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="SystemCouplingTransientStaticDataParticipant">
        <xs:complexContent>
            <xs:extension base="SystemCouplingStaticDataParticipant">
                <xs:sequence>
                    <xs:element name="Times">
                        <xs:simpleType>
                            <xs:list itemType="xs:double">
                            </xs:list>
                        </xs:simpleType>
                    </xs:element>
                    <xs:element name="Steps">
                        <xs:simpleType>
                            <xs:list itemType="xs:int">
                            </xs:list>
                        </xs:simpleType>
                    </xs:element>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- Coupling Types (2 way FSI) -->
    <xs:complexType name="SystemCouplingCoSimulationParticipant" abstract="true">
        <xs:complexContent>
            <xs:extension base="SystemCouplingParticipant">
                <xs:attribute name="CouplingIterationsSupported" type="xs:boolean" use="required" />
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="SystemCouplingSteadyCoSimulationParticipant">
        <xs:complexContent>
            <xs:extension base="SystemCouplingCoSimulationParticipant" />
        </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="SystemCouplingTransientCoSimulationParticipant">
        <xs:complexContent>
            <xs:extension base="SystemCouplingCoSimulationParticipant" />
        </xs:complexContent>
    </xs:complexType>
</xs:schema>