I was playing around with that, but the function still gets called for each
variable. Essentially, doing the calculations twice or three times in 3D.
This seems far to inefficient. Is there no way around this?
void initial_velocity(DenseVector<Number>& output, const Point&, const
Real){
output.resize(2);
output(0) = 1; // x-direction velocity
output(1) = 2; // y-direction velocity
printf("hello\n"); // you get 8 of these (4 is expected)
}
On Wed, Jun 27, 2012 at 2:30 PM, John Peterson <[email protected]> wrote:
> On Wed, Jun 27, 2012 at 12:25 PM, Andrew E Slaughter
> <[email protected]> wrote:
> >
> > // A function for initializing, this d
> > void initial_velocity(DenseVector<Number>& output, const Point&, const
> > Real){
> > output(0) = 1; // x-dir
> > // output(1) = 2; // y-dir (this causes an error, but this is what seems
> > logical)
> > }
>
> I think you are on the right track here. It's just that output is not
> resized for you, so output.resize(2); and try again?
>
> --
> John
>
--
Andrew E. Slaughter, PhD
[email protected]
Materials Process Design and Control Laboratory
Sibley School of Mechanical and Aerospace Engineering
169 Frank H. T. Rhodes Hall
Cornell University
Ithaca, NY 14853-3801
(607) 229-1829
http://aeslaughter.github.com/
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users