    

 ## On this page

  

 

 # CouplingInterface

 Last update: 17.07.2025 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<a 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 name="l00055"></a> 55 

<a 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 name="l00075"></a> 75 

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

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

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

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

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

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

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

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

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

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

<a 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 name="l00093"></a> 93 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<a 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#a1191a096450bd4569325be7bef6cb1f6)

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

Get the region on side one, given an index.



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

const CouplingInterfaceName &amp; getName() const

Get coupling interface name.



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

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

Get the region on side two, 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::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::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:233](CommonTypes_8hpp_source.xhtml#l00233)



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

std::string RegionName

**Definition:** [CommonTypes.hpp:231](CommonTypes_8hpp_source.xhtml#l00231)