Skip to content

Fixed a bug in face integration - #91

Merged
wenqing merged 3 commits into
ufz:masterfrom
wenqing:fixing
Mar 23, 2018
Merged

wenqing merged 3 commits into
ufz:masterfrom
wenqing:fixing

Conversation

@wenqing

@wenqing wenqing commented Mar 19, 2018

Copy link
Copy Markdown
Member

This PR fixes a bug in face integration for Neumann BC. If curved surface is applied with Neumann BC, the current code cannot compute the face integration correctly.

@wenqing

wenqing commented Mar 19, 2018

Copy link
Copy Markdown
Member Author

@norihiro-w If you have time, please take a look. I have tested it by using a curved surface with a Neumann BC of 1. In the test, the sum of the computed node values by this PR is exactly the area of the curved surface.

@norihiro-w

Copy link
Copy Markdown
Contributor

@wenqing ok. i will take a look

Comment thread MSH/msh_elem.cpp Outdated
06/2005 WW Implementation
**************************************************************************/
void CElem::FillTransformMatrix()
void CElem::FillTransformMatrix(const bool reuse_matrix_cache)

@norihiro-w norihiro-w Mar 20, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please add a description about the new argument? If I understand it correctly, the flag is used to recompute the transformation matrix. then, recompute_matrix (or something like that) may be a better name.

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.

Added a description and changed the name.

@norihiro-w

norihiro-w commented Mar 20, 2018 •

Copy link
Copy Markdown
Contributor

Wenqing, are you assuming the elements are also curved? or you want to use a curve surface to find nodes of planar elements?

I mean that surface is curved, e.g. cylinder surface.

Comment thread FEM/rf_st_new.cpp
// CB THMBM
// this->getProcess()->CheckMarkedElement(); // CB added to remove bug with deactivated Subdomains
// Already added to Set(..)
std::vector<long> vec_possible_elements;

@norihiro-w norihiro-w Mar 20, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it really necessary to remove this part? Without this, the computation can be quite slow for large problems.

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.

Recovered but enabled all elements to be searched because that surface can be defined inside a domain. The following condition is for the case of surface being defined inside domain.

			// Not a surface face
			if (elem->GetDimension() == e_nei->GetDimension())
				fac = 0.5;

Comment thread FEM/rf_st_new.cpp
for (i = 0; i < (long)msh->ele_vector.size(); i++)
{
elem = msh->ele_vector[vec_possible_elements[i]];
if (!elem->GetMark())

@norihiro-w norihiro-w Mar 20, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is if (!elem->GetMark()) not necessary?

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.

As explained above, It is to enable all elements to be searched.

@wenqing

wenqing commented Mar 20, 2018

Copy link
Copy Markdown
Member Author

Two benchmark reference files have been updated. For the reason, please see the description of PR ufz/ogs5-benchmarks_ref#21.

@norihiro-w

Copy link
Copy Markdown
Contributor

@wenqing i'm ok if the benchmarking is green

@wenqing
wenqing merged commit e778590 into ufz:master Mar 23, 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