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

Even more general one ;) #1

Merged
merged 12 commits into from
Jun 30, 2016
Merged

Even more general one ;) #1

merged 12 commits into from
Jun 30, 2016

Conversation

mdzik
Copy link

@mdzik mdzik commented Jun 29, 2016

I dont think we need to check vectors, NaNs propagates fast ;)
I've added way to set region and quantities to check

@mdzik
Copy link
Author

mdzik commented Jun 29, 2016

Oi :) I have first PR in your repo :p

@mdzik mdzik mentioned this pull request Jun 30, 2016
@shkodm
Copy link
Owner

shkodm commented Jun 30, 2016

@mdzik, I will read and review it closer to today's afternoon. Be patient.

@mdzik
Copy link
Author

mdzik commented Jun 30, 2016

OK

}
}
if (go || n_components == 0 ) {
notice("... checking <?%s q$name ?>");
Copy link
Owner

Choose a reason for hiding this comment

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

notice("Checking <?%s q$name ?> ..."); will look better.

Copy link
Owner

Choose a reason for hiding this comment

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

But in general, I don't think this kind of output in necessary. We should output only if something goes wrong. Maybe in the end of loop body, at line 981 for instance:

if (cond) notice("NaN value occured at <?%s q$name?>...");

will be better


pugi::xml_attribute comp = node.attribute("what");
std::vector<std::string> components;
std::vector<real_t*> buffers;
Copy link
Owner

Choose a reason for hiding this comment

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

I think, default components should have one element with value "ALL". So, that basic Failcheck Iterations="1000/> will be just checking all quantities.

But, as a matter of fact, we already have class for operating with quantities/names in Handlers, namely name_set in utills.
So it is much easier to do:

nameset s;
pugi::xml_attribute comp = node.attribute("what");
if (comp) {
        s.add_from_string(attr.value(),',');
  }
 else {
     s.add_from_string("all",',');
 }

and in then in the loop, do stuff only for quantities specified,as :

<?R for (q in rows(Quantities)) { ifdef(q$adjoint); ?> 
if (s->in("<?%s q$name ?>")) 
{
// do stuff 
}
<?R }; ifdef(); ?>

This looks much nicer, eliminate raw string manipulation and also "go" variable will no longer be needed.

int ret = 0;
int cond,fin;
int ret = 0;
int cond,fin,go;
Copy link
Owner

Choose a reason for hiding this comment

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

"go" is no longer used. Remove it.

@shkodm shkodm merged commit 0b874ac into shkodm:develop Jun 30, 2016
shkodm pushed a commit that referenced this pull request Oct 17, 2016
Some updating of d2q9_adj and example
shkodm pushed a commit that referenced this pull request Apr 8, 2021
 intall.sh  v2 -auto OS detection
shkodm pushed a commit that referenced this pull request Apr 8, 2021
shkodm pushed a commit that referenced this pull request Apr 8, 2021
+ Addition of (final) 3D thermal particle model from the PhD work of …
shkodm pushed a commit that referenced this pull request Jan 10, 2024
Adding asserts on the piece regions in compare
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