Separate input file

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

Moderators: silvia, selimgunay, Moderators

Post Reply
mja165
Posts: 18
Joined: Wed Sep 28, 2011 3:53 pm

Separate input file

Post by mja165 » Thu May 02, 2013 9:39 pm

Separate input file
Last edited by mja165 on Wed Aug 14, 2013 6:37 pm, edited 1 time in total.

fmk
Site Admin
Posts: 5883
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: Separate input file

Post by fmk » Fri May 03, 2013 10:38 am

simply pass the filename to the material constructor. in the constructor open up the file and place the contents into a Matrix or 2 Vectors. google the ways in C or C++ to open, read the data, and close files. In the getCopy() do not make copies of these Matrix and Vector objects, just use pointers (so you don't run out of memory is a lot of materials are created of this type).

Post Reply