Skip to content

Enable $EPSILON for ST that is is consistent with BCs - #120

Merged
wenqing merged 4 commits into
ufz:masterfrom
Thomas-TK:debug_master
Dec 14, 2018
Merged

wenqing merged 4 commits into
ufz:masterfrom
Thomas-TK:debug_master

Conversation

@Thomas-TK

Copy link
Copy Markdown
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.
Comment thread FEM/rf_st_new.cpp Outdated
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
Copy Markdown
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)

@wenqing wenqing left a comment

Copy link
Copy Markdown
Member

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.

Comment thread FEM/rf_st_new.cpp Outdated
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
Copy Markdown
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.

Comment thread FEM/rf_st_new.cpp Outdated

/*
SetSurfaceNodeVector(m_sfc, sfc_nod_vector);
SetSurfaceNodeVector(m_sfc, sfc_nod_vector,m_st);

Copy link
Copy Markdown
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.

Comment thread 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)

Copy link
Copy Markdown
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.

Comment thread FEM/rf_st_new.cpp Outdated
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)

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

Comment thread FEM/rf_st_new.cpp Outdated
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)

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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