Build another "Domain"

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
burnningcat
Posts: 50
Joined: Mon Jun 18, 2007 1:10 am
Location: ROMA

Build another "Domain"

Post by burnningcat »

Dear FMK,

After reading your PHD dissertation, I try to build another “domain” and add one node into it, but I always fail:

static Domain *theTclDomain1 =0;
static TclModelBuilder *theTclBuilder1 =0;
Node *theNode1 = 0;
theNode1 = new Node(9,2,10.0,10.0);
theTclDomain1->addNode(theNode1) ;

I debug and find all these line goes on well except the last one: theTclDomain1->addNode(theNode1) ;

An error occurs saying that “****Memory can not be read” and the program stop.

My orientation is to do an analysis within one element, so I have to build a new domain and add some nodes and loads and use the solver to solve it. In your PHD dissertation page 90 there is an example about “An Element By Element Solvers Interface and solve Method”:

Domain theDomain();
DeltaWing theModelBuilder(theDomain);
theModelBuilder.buildModel();
..........
..........
Of course now the command change a little bit, but would you please tell me if it is possible that within one element, I can build another “domain” using the “model builder”, and add some node and load and constraints?

We can not use the command theModelBuilder.buildModel() anymore, but how to write it correctly now? And how to build a new domain and analysis model correctly? Thank you very much!
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

your domain is a NULL pointer!
burnningcat
Posts: 50
Joined: Mon Jun 18, 2007 1:10 am
Location: ROMA

Post by burnningcat »

So dear FMK, would you please tell me how to build that "domain" correctly? Or how can I write the code?

I think I miss some command, and I still need to learn a lot about the programming. Do you have some suggestions on how to do it correctly? Thank you very much! :)
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

why don't you look at the header file for the Domain class:

/SRC/domain/domain/Domain.h

you need to understand C++ before you can start playing with this framework.
Post Reply