CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

iPoint, iMarker, and iVertex; and problem with MPI

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 4, 2021, 00:51
Default iPoint, iMarker, and iVertex; and problem with MPI
  #1
Member
 
Zhen ZHANG
Join Date: Jun 2018
Location: Beijing, China
Posts: 56
Rep Power: 7
Zhen ZHANG is on a distinguished road
Hi all,

I got a problem when setting values at the boundary to the volume data container.

I created a VectorType member sens_inlet in the CEulerSolver class and resized it to nPoint.

I then registered the Tt of all vertices at the inlet boundary. After extracting the sensitivity, I set them to the sens_inlet using the following codes:
Code:
for(unsigned short iMarker=0; iMarker < config->GetnMarker_All(); iMarker++) {
  for (unsigned long iVertex = 0; iVertex < geometry->GetnVertex(iMarker); iVertex++) {
    unsigned long iPoint = geometry->nodes->GetGlobalIndex(geometry->vertex[iMarker][iVertex]->GetNode());
    nodes->SetSens_Inlet_T(iPoint,SU2_TYPE::GetDerivative(Inlet_Ttotal[iMarker][iVertex]))}}
The orders of registration and extraction are the same.

However, in the result file, the non-zero values of the sens_inlet do not appear at the inlet boundary (see the attached figure). If running with MPI, it returns an error "Assertion `i>=0 && i<m_rows' failed".

Could anybody give me some clues why this problem happen? Thanks in advance!
Attached Images
File Type: png figure.png (7.6 KB, 9 views)
Zhen ZHANG is offline   Reply With Quote

Old   August 4, 2021, 02:10
Default
  #2
Member
 
Zhen ZHANG
Join Date: Jun 2018
Location: Beijing, China
Posts: 56
Rep Power: 7
Zhen ZHANG is on a distinguished road
Well, I changed the iPoint calculation to
Code:
unsigned long iPoint = geometry->vertex[iMarker][iVertex]->GetNode();
and it works.
What is the difference between these two calculations?

Thanks,
Zhen
Zhen ZHANG is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 06:52.