<?xml version="1.0"?>
<cfsSimulation xmlns="http://www.cfs++.org/simulation"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.cfs++.org/simulation file:/share/programs/cfs_xml_scheme/CFS-Simulation/CFS.xsd">

    <!-- define which files are needed for simulation input & output-->
    <fileFormats>
        <input>
            <cdb fileName="capacitor.cdb"/>          
        </input>
        <output>
            <hdf5/>
            <text id="txt"/>
        </output>
        <materialData file="mat.xml" format="xml"/>
    </fileFormats>
    
    <domain geometryType="3d">
        <variableList>
            <!-- define used varaibles here -->
            <var name="V_top" value="V_TOP"/>
            <var name="V_bottom" value="V_BOTTOM"/>
        </variableList>

        <regionList>
            <region name="V_air" material="air"/>
            <region name="V_elec" material="air"/>
        </regionList>

    </domain>
    
    <fePolynomialList>
        <Lagrange id="lagrange">
            <isoOrder>1</isoOrder>
        </Lagrange>
    </fePolynomialList>

    <!--
      ===========================================================================
                Electrostatic PDE
      ===========================================================================
    -->
    <sequenceStep index="1">
        <analysis>
            <static/>
        </analysis>
        <pdeList>
            <electrostatic>                
                <regionList>
                    <region name="V_air" polyId="lagrange"/>
                    <region name="V_elec" polyId="lagrange"/>
                </regionList>
                <bcsAndLoads>                    
                    <potential name="S_top" value="V_top"/>
                    <potential name="S_bottom" value="V_bottom"/>
                </bcsAndLoads>
                <storeResults>
                    <nodeResult type="elecPotential">
                        <allRegions/>
                        SENSPOS1_NODELIST
                    </nodeResult>
                    <elemResult type="elecFieldIntensity">
                        <allRegions/>
                        SENSPOS1_SENSPOS2_ELEMLIST
                    </elemResult>
                    <regionResult type="elecEnergy">
                        <allRegions outputIds="hdf5"/>
                    </regionResult>
                    <elemResult type="elecFluxDensity">
                    <allRegions/>
                    </elemResult>
                    <surfRegionResult type="elecCharge">
                        <surfRegionList>
                            <surfRegion name="S_top" outputIds="hdf5"/>
                        </surfRegionList>
                    </surfRegionResult>
                </storeResults>
            </electrostatic>
        </pdeList>
    </sequenceStep>
    
</cfsSimulation>
