-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
FEM/rf_st_new.cpp
Outdated
@@ -3371,16 +3379,25 @@ void CSourceTerm::SetNOD() | |||
11/2007 JOD | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
FEM/rf_st_new.cpp
Outdated
@@ -3284,10 +3292,10 @@ void CSourceTermGroup::SetSFC(CSourceTerm* m_st, const int ShiftInNodeVector) | |||
{ | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here change m_st
to st->epsilon
.
FEM/rf_st_new.cpp
Outdated
|
||
/* | ||
SetSurfaceNodeVector(m_sfc, sfc_nod_vector); | ||
SetSurfaceNodeVector(m_sfc, sfc_nod_vector,m_st); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here change m_st to st->epsilon.
FEM/rf_st_new.cpp
Outdated
} | ||
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace CSourceTerm* st
with const double tolerance
.
FEM/rf_st_new.cpp
Outdated
{ | ||
double computed_search_length = m_msh->getSearchLength(); | ||
if (st->epsilon != -1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace if (st->epsilon != -1)
with if ( tolerance !=-1)
FEM/rf_st_new.cpp
Outdated
{ | ||
double computed_search_length = m_msh->getSearchLength(); | ||
if (st->epsilon != -1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace if (st->epsilon != -1) with if ( tolerance !=-1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.