    

 ## On this page

  

 

 # CouplingInterface

 Last update: 17.07.2025 

<a id="l00001" name="l00001"></a> 1/\*

<a id="l00002" name="l00002"></a> 2 \* Copyright 2023 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

<a id="l00003" name="l00003"></a> 3 \*/

<a id="l00004" name="l00004"></a> 4 

<a id="l00005" name="l00005"></a> 5\#pragma once

<a id="l00006" name="l00006"></a> 6 

<a id="l00007" name="l00007"></a> 7\#include "SystemCouplingParticipant/LibraryType.hpp"

<a id="l00008" name="l00008"></a> 8 

<a id="l00009" name="l00009"></a> 9\#include "SystemCouplingParticipant/DataTransfer.hpp"

<a id="l00010" name="l00010"></a> 10\#include "SystemCouplingParticipant/Region.hpp"

<a id="l00011" name="l00011"></a> 11 

<a id="l00012" name="l00012"></a> 12\#include &lt;string&gt;

<a id="l00013" name="l00013"></a> 13\#include &lt;vector&gt;

<a id="l00014" name="l00014"></a> 14 

<a id="l00015" name="l00015"></a> 15namespace sysc {

<a id="l00016" name="l00016"></a> 16 

<a id="l00028" name="l00028"></a>[ 28](classsysc_1_1CouplingInterface.xhtml)class SYSTEM_COUPLING_PARTICIPANT_DLL [CouplingInterface](classsysc_1_1CouplingInterface.xhtml) {

<a id="l00029" name="l00029"></a> 29public:

<a id="l00035" name="l00035"></a>[ 35](classsysc_1_1CouplingInterface.xhtml#a606ddfa3113e3e0bf1ee7eee2b58793d) [CouplingInterface](classsysc_1_1CouplingInterface.xhtml#a606ddfa3113e3e0bf1ee7eee2b58793d)([CouplingInterfaceName](group__SystemCouplingParticipantAPIs.xhtml#ga8a62847c55d192b835faff927dbf41a3) interfaceName);

<a id="l00036" name="l00036"></a> 36 

<a id="l00054" name="l00054"></a>[ 54](classsysc_1_1CouplingInterface.xhtml#ab7a385065f0fde034baa88a88f274946) void [addSideOneRegion](classsysc_1_1CouplingInterface.xhtml#ab7a385065f0fde034baa88a88f274946)(const [Region](classsysc_1_1Region.xhtml)&amp; region);

<a id="l00055" name="l00055"></a> 55 

<a id="l00074" name="l00074"></a>[ 74](classsysc_1_1CouplingInterface.xhtml#a5afdb8ffa5c06d66fe30e6f150230b67) void [addSideTwoRegion](classsysc_1_1CouplingInterface.xhtml#a5afdb8ffa5c06d66fe30e6f150230b67)(const [Region](classsysc_1_1Region.xhtml)&amp; region);

<a id="l00075" name="l00075"></a> 75 

<a id="l00077" name="l00077"></a>[ 77](classsysc_1_1CouplingInterface.xhtml#ac9975e59d9c18d893af5b153211e2635) const [CouplingInterfaceName](group__SystemCouplingParticipantAPIs.xhtml#ga8a62847c55d192b835faff927dbf41a3)&amp; [getName](classsysc_1_1CouplingInterface.xhtml#ac9975e59d9c18d893af5b153211e2635)() const;

<a id="l00078" name="l00078"></a> 78 

<a id="l00080" name="l00080"></a>[ 80](classsysc_1_1CouplingInterface.xhtml#a84873c1535d70a88096d44242c97a1b7) std::size_t [getNumSideOneRegions](classsysc_1_1CouplingInterface.xhtml#a84873c1535d70a88096d44242c97a1b7)() const;

<a id="l00081" name="l00081"></a> 81 

<a id="l00083" name="l00083"></a>[ 83](classsysc_1_1CouplingInterface.xhtml#a03a32678f212092a83149ea2b0c54f20) std::size_t [getNumSideTwoRegions](classsysc_1_1CouplingInterface.xhtml#a03a32678f212092a83149ea2b0c54f20)() const;

<a id="l00084" name="l00084"></a> 84 

<a id="l00086" name="l00086"></a>[ 86](classsysc_1_1CouplingInterface.xhtml#a540b82fcd3f5aa6c5e3726e429960d35) const [Region](classsysc_1_1Region.xhtml)&amp; [getSideOneRegion](classsysc_1_1CouplingInterface.xhtml#a540b82fcd3f5aa6c5e3726e429960d35)(std::size_t index) const;

<a id="l00087" name="l00087"></a> 87 

<a id="l00089" name="l00089"></a>[ 89](classsysc_1_1CouplingInterface.xhtml#a824ed032106d36fd0202a8b6f92a8a20) const [Region](classsysc_1_1Region.xhtml)&amp; [getSideTwoRegion](classsysc_1_1CouplingInterface.xhtml#a824ed032106d36fd0202a8b6f92a8a20)(std::size_t index) const;

<a id="l00090" name="l00090"></a> 90 

<a id="l00092" name="l00092"></a>[ 92](classsysc_1_1CouplingInterface.xhtml#ab1230f4b0c7dc52fff73d1ddcd67f03e) void [addDataTransfer](classsysc_1_1CouplingInterface.xhtml#ab1230f4b0c7dc52fff73d1ddcd67f03e)(const [DataTransfer](classsysc_1_1DataTransfer.xhtml)&amp; dataTransfer);

<a id="l00093" name="l00093"></a> 93 

<a id="l00095" name="l00095"></a>[ 95](classsysc_1_1CouplingInterface.xhtml#a9ac1bf66c466b9567e26fdf5c2108c05) std::size_t [getNumDataTransfers](classsysc_1_1CouplingInterface.xhtml#a9ac1bf66c466b9567e26fdf5c2108c05)() const noexcept;

<a id="l00096" name="l00096"></a> 96 

<a id="l00098" name="l00098"></a>[ 98](classsysc_1_1CouplingInterface.xhtml#aeff28058491eb4a52d5833f38b4214c7) const [DataTransfer](classsysc_1_1DataTransfer.xhtml)&amp; getDataTransfer(std::size\_t index) const;

<a id="l00099" name="l00099"></a> 99 

<a id="l00100" name="l00100"></a> 100private:

<a id="l00101" name="l00101"></a> 101 [CouplingInterfaceName](group__SystemCouplingParticipantAPIs.xhtml#ga8a62847c55d192b835faff927dbf41a3) m_name;

<a id="l00102" name="l00102"></a> 102 

<a id="l00103" name="l00103"></a> 103 std::vector&lt;[Region](classsysc_1_1Region.xhtml)&gt; m_sideOneRegions;

<a id="l00104" name="l00104"></a> 104 std::map&lt;[RegionName](group__SystemCouplingParticipantAPIs.xhtml#gad700042fb75659f4591c4dae6560a62d), std::size\_t&gt; m_sideOneRegionsNameToIndex;

<a id="l00105" name="l00105"></a> 105 

<a id="l00106" name="l00106"></a> 106 std::vector&lt;[Region](classsysc_1_1Region.xhtml)&gt; m_sideTwoRegions;

<a id="l00107" name="l00107"></a> 107 std::map&lt;[RegionName](group__SystemCouplingParticipantAPIs.xhtml#gad700042fb75659f4591c4dae6560a62d), std::size\_t&gt; m_sideTwoRegionsNameToIndex;

<a id="l00108" name="l00108"></a> 108 

<a id="l00109" name="l00109"></a> 109 std::vector&lt;[DataTransfer](classsysc_1_1DataTransfer.xhtml)&gt; m_dataTransfers;

<a id="l00110" name="l00110"></a> 110};

<a id="l00111" name="l00111"></a> 111 

<a id="l00112" name="l00112"></a> 112} // namespace sysc

[sysc::CouplingInterface](classsysc_1_1CouplingInterface.xhtml)

Provide a class for a coupling interface.

**Definition:** [CouplingInterface.hpp:28](CouplingInterface_8hpp_source.xhtml#l00028)



[sysc::CouplingInterface::getNumSideTwoRegions](classsysc_1_1CouplingInterface.xhtml#a03a32678f212092a83149ea2b0c54f20)

std::size_t getNumSideTwoRegions() const

Get the number of regions on side two of the interface.



[sysc::CouplingInterface::getSideOneRegion](classsysc_1_1CouplingInterface.xhtml#a540b82fcd3f5aa6c5e3726e429960d35)

const Region &amp; getSideOneRegion(std::size_t index) const

Get the region on side one, given an index.



[sysc::CouplingInterface::addSideTwoRegion](classsysc_1_1CouplingInterface.xhtml#a5afdb8ffa5c06d66fe30e6f150230b67)

void addSideTwoRegion(const Region &amp;region)

Add region to side two of the interface.



[sysc::CouplingInterface::CouplingInterface](classsysc_1_1CouplingInterface.xhtml#a606ddfa3113e3e0bf1ee7eee2b58793d)

CouplingInterface(CouplingInterfaceName interfaceName)

Provide a constructor for the CouplingInterface class.



[sysc::CouplingInterface::getSideTwoRegion](classsysc_1_1CouplingInterface.xhtml#a824ed032106d36fd0202a8b6f92a8a20)

const Region &amp; getSideTwoRegion(std::size_t index) const

Get the region on side two, given an index.



[sysc::CouplingInterface::getNumSideOneRegions](classsysc_1_1CouplingInterface.xhtml#a84873c1535d70a88096d44242c97a1b7)

std::size_t getNumSideOneRegions() const

Get the number of regions on side one of the interface.



[sysc::CouplingInterface::getNumDataTransfers](classsysc_1_1CouplingInterface.xhtml#a9ac1bf66c466b9567e26fdf5c2108c05)

std::size_t getNumDataTransfers() const noexcept

Get the number of data transfers.



[sysc::CouplingInterface::addDataTransfer](classsysc_1_1CouplingInterface.xhtml#ab1230f4b0c7dc52fff73d1ddcd67f03e)

void addDataTransfer(const DataTransfer &amp;dataTransfer)

Add a data transfer.



[sysc::CouplingInterface::addSideOneRegion](classsysc_1_1CouplingInterface.xhtml#ab7a385065f0fde034baa88a88f274946)

void addSideOneRegion(const Region &amp;region)

Add region to side one of the interface.



[sysc::CouplingInterface::getName](classsysc_1_1CouplingInterface.xhtml#ac9975e59d9c18d893af5b153211e2635)

const CouplingInterfaceName &amp; getName() const

Get coupling interface name.



[sysc::DataTransfer](classsysc_1_1DataTransfer.xhtml)

Provide a class for a data transfer.

**Definition:** [DataTransfer.hpp:21](DataTransfer_8hpp_source.xhtml#l00021)



[sysc::Region](classsysc_1_1Region.xhtml)

Provide a class for a System Coupling region.

**Definition:** [Region.hpp:30](Region_8hpp_source.xhtml#l00030)



[sysc::CouplingInterfaceName](group__SystemCouplingParticipantAPIs.xhtml#ga8a62847c55d192b835faff927dbf41a3)

std::string CouplingInterfaceName

**Definition:** [CommonTypes.hpp:224](CommonTypes_8hpp_source.xhtml#l00224)



[sysc::RegionName](group__SystemCouplingParticipantAPIs.xhtml#gad700042fb75659f4591c4dae6560a62d)

std::string RegionName

**Definition:** [CommonTypes.hpp:222](CommonTypes_8hpp_source.xhtml#l00222)