Repository navigation
Enable $EPSILON for ST that is is consistent with BCs - #120
Conversation
new: memory for array for maximum size.
new: memory for array for maximum size.
Consisten with BC: The user is getting a choice to specify the tolreance in ST or taking the default or using the one from GLI.
| last modification: | ||
| **************************************************************************/ | ||
| void CSourceTermGroup::SetSurfaceNodeVector(Surface* m_sfc, std::vector<long>& sfc_nod_vector) | ||
| void CSourceTermGroup::SetSurfaceNodeVector(Surface* m_sfc, std::vector<long>& sfc_nod_vector, CSourceTerm* st) |
There was a problem hiding this comment.
You can use a double argument here instead of CSourceTerm* For example,
::SetSurfaceNodeVector(Surface* m_sfc, std::vector<long>& sfc_nod_vector, const double tolerance)
wenqing
left a comment
There was a problem hiding this comment.
Looks good except the type of the newly added argument.
One error message occurred in benchmarking but it is not caused by this PR. The error should be gone after removed a spurious file in the benchmark reference directory.
| GEOLIB::Surface const& sfc(*(dynamic_cast<GEOLIB::Surface const*>(m_st->getGeoObj()))); | ||
| std::cout << "Surface " << m_st->geo_name << ": " << sfc.getNTriangles() << "\n"; | ||
| SetSurfaceNodeVector(&sfc, sfc_node_ids); | ||
| SetSurfaceNodeVector(&sfc, sfc_node_ids, m_st); |
There was a problem hiding this comment.
Here change m_st to st->epsilon.
|
|
||
| /* | ||
| SetSurfaceNodeVector(m_sfc, sfc_nod_vector); | ||
| SetSurfaceNodeVector(m_sfc, sfc_nod_vector,m_st); |
There was a problem hiding this comment.
Here change m_st to st->epsilon.
| } | ||
|
|
||
| void CSourceTermGroup::SetSurfaceNodeVector(GEOLIB::Surface const* sfc, std::vector<std::size_t>& sfc_nod_vector) | ||
| void CSourceTermGroup::SetSurfaceNodeVector(GEOLIB::Surface const* sfc, std::vector<std::size_t>& sfc_nod_vector, CSourceTerm* st) |
There was a problem hiding this comment.
replace CSourceTerm* st with const double tolerance.
| void CSourceTermGroup::SetSurfaceNodeVector(GEOLIB::Surface const* sfc, std::vector<std::size_t>& sfc_nod_vector, CSourceTerm* st) | ||
| { | ||
| double computed_search_length = m_msh->getSearchLength(); | ||
| if (st->epsilon != -1) |
There was a problem hiding this comment.
replace if (st->epsilon != -1) with if ( tolerance !=-1)
| void CSourceTermGroup::SetSurfaceNodeVector(Surface* m_sfc, std::vector<long>& sfc_nod_vector, CSourceTerm* st) | ||
| { | ||
| double computed_search_length = m_msh->getSearchLength(); | ||
| if (st->epsilon != -1) |
There was a problem hiding this comment.
replace if (st->epsilon != -1) with if ( tolerance !=-1)
There was a problem hiding this comment.
Why should we make it different to the BC. There we already included double epsilon;
|
so I leave the epsilon change the everything according to your suggestions. Thank you very much. |
This gives the opportunity to specify the tolerance in ST directly. Taking the default value or using the tolerance from GLI is still enabled.