Creating new variables in Abaqus - fortran

Here is what I like to do in Abaqus (if possible):
As a minimum working example, let's say I have an elastic specimen that I am applying a load on. When I look at the results I can see S11, S22, S33, etc...
What I would like to see are things like S11-S22, S11-S12 and the like. Is that possible? I know that UMAT is a thing and I have the elastic code from the documentation working. Can I define S11-S22 in there and return it? If so, how?
I know Fortran, it's Abaqus I'm iffy with.

I figured it out! For anyone else looking in the future... In Tools > Create Field Output > From Fields go to the frame you want and scroll down the list to find the stress tensor (will have a name like s1f5_S for stress components). Over on the right side, the drop down menu for functions can be changed to scalars, clicking on s1f5 (or whatever) will give you the option of selecting the component you want.

Related

Hangfire Job Description and Name Customization

I would like, if possible, to have some control on the job description and name. I tried to add the JobDisplayName to the Controller that is activating the job, also to the method that is being called to run in background but no luck.
Also the job description page is very polluted with unnecessary information that i would like to remove, or to format to a readable information.
In the A case, i would like to remove this, or to format it to a more readable format.
In the B case what can i do to output it to a human readable object?
Issue A: there are quite a few bugs that have been opened but most of them suggest there is no way to update the information displayed there, but, you should follow the Best Practices and keep the method and arguments small.
Fix B
Change the return statement of your method that's enqeued to fix the data displayed.

How to set word wrap in OO Basic Macro?

So I am pulling data from an Open Office Database and placing it in my Sheet.
I have this all working. However I would like to set word wrap and autofit on one of the cells to make sure it wraps and expands.
I get my cell like this:
oCell=oSheet.getCellByPosition(2,i)
This is working but I can't find the API to actually set those properties.
Thanks
The documented way seems to be:
oCell.setPropertyValue( "IsTextWrapped", True )

Tensorboard logging non-tensor (numpy) information (AUC)

I would like to record in tensorboard some per-run information calculated by some python-blackbox function.
Specifically, I'm envisioning using sklearn.metrics.auc after having run sess.run().
If "auc" was actually a tensor node, life would be simple. However, the setup is more like:
stuff=sess.run()
auc=auc(stuff)
If there is a more tensorflow-onic way of doing this I am interested in that. My current setup involves creating separate train&test graphs.
If there is a way to complete the task as stated above, I am interested in that as well.
You can make a custom summary with your own data using this code:
tf.Summary(value=[tf.Summary.Value(tag="auc", simple_value=auc)]))
Then you can add that summary to the summary writer yourself. (Don't forget to add a step).

How to list tables in RethinkDb using C++

When I do something in Python or in JavaScript I always have a lot of opportunities, both, to read documentation of a particular library and to try tons of teeny-weeny examples.
Unfortunatelly, in C++ it is not so popular (for what reason?) to provide at least a little ammount of working examples in documentation. Two good examples are C++ clients for MongoDb and RethinkDb.
My question here concerns RethinkDB. In Python I know how to list all table names, not because there is documentation and I'm supposed to dive into the driver code, but just because there is a tiny handy example of doing this:
r.db('test').table_list().run(conn)
And I'm done. In C++ I do not know how to do this - how to list all table names. I do not know even if there is such a method. I wish someone could provide little instructions and share their knowledge.
EDIT
It seems, like I found an appropriate method table_list, but unfortunatelly I do not know how to use it. Besides, it seems that I try to connect to the database in a wrong manner - by this I mean that I connect to the server, but not to a particular database (and again I do not know how to implement this). So, this is what I have now:
std::unique_ptr<R::Connection> conn = R::connect("localhost",28105);
//^^^ I want to connect to a particular database "mydb" - how to do that?
R::Cursor cursor = R::table_list().run(*conn);
for(R::Datum& item : cursor){
do_something(R::write_datum(item).c_str());
// ^^^ is that right???
}
If I do it, like I showed - without specifying the database name, then I get nothing. If, however, I try to connect like this:
R::connect("localhost",28105,"mydb");
then inside for I get an infinite loop. So, I need some help. Thanks!
EDIT
Phew, I found a solution. And I must confess, that it is rather intuitive. I will post it below.
This is the solution:
std::unique_ptr<R::Connection> conn = R::connect("localhost",28105);
R::Cursor cursor = R::db("mydb").table_list().run(*conn);
for(R::Datum& item : cursor){
do_something(R::write_datum(item).c_str());
}
and it works great. I want to thank AtnNn - the sole developper of this great driver.

cakePHP, encoding problem when using find+list, no problem when using find+all

Well, I've configured the database.php file, added the 'encoding'=>'utf8' option.
also added the $this->charset('utf8') to my view.
Now, when I use the find('list') and echo its content I get those known question-marks. But, when I use the find('all) method, the data is delivered correctly.
And my questions are:
Why?
Who is to blame?
How to solve ?(I really prefer the list way..)
Should I drink more coffee?
can you try $this->find('all') and then use set to extract the values, like Set::extract('/Post/title', $posts); and print it out. if the find all was good and the set::extract is bad there could be a bug. If it works like normal then there is something weird as that is what the core does.