Skip to content
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

Merged
merged 4 commits into from
Dec 14, 2018

Conversation

Thomas-TK
Copy link
Member

This gives the opportunity to specify the tolerance in ST directly. Taking the default value or using the tolerance from GLI is still enabled.

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.
@@ -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)
Copy link
Member

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)

Copy link
Member

@wenqing wenqing left a 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.

@@ -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);
Copy link
Member

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.


/*
SetSurfaceNodeVector(m_sfc, sfc_nod_vector);
SetSurfaceNodeVector(m_sfc, sfc_nod_vector,m_st);
Copy link
Member

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.

}

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)
Copy link
Member

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.

{
double computed_search_length = m_msh->getSearchLength();
if (st->epsilon != -1)
Copy link
Member

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)

{
double computed_search_length = m_msh->getSearchLength();
if (st->epsilon != -1)
Copy link
Member

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)

Copy link
Member Author

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;

@Thomas-TK
Copy link
Member Author

so I leave the epsilon change the everything according to your suggestions. Thank you very much.

@wenqing wenqing merged commit f665c83 into ufz:master Dec 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants