Skip to content

Re: Operate the whole vector field

#2632
steed188
Participant

Dear Albert,
Thank you a lot for keeping going my problems.

I’ve tried the AnalticalF functors. I do not use the L2 norm velocities. Adversely, I tried to operate with the x,y,z components. I tried like below:

//


SuperLatticePhysVelocity3D<T, DESCRIPTOR> Velocity1( sLattice1, converter );
SuperLatticePhysVelocity3D<T, DESCRIPTOR> Velocity2( sLattice2, converter );

AnalyticalFfromSuperF3D<T> AnalVel1( Velocity1, true, 1 );
AnalyticalFfromSuperF3D<T> AnalVel2( Velocity2, true, 1 );
AnalyticalConst3D<T,T> Number1( T( 1.- 1./5. ) );
AnalyticalConst3D<T,T> Number2( T( 1. / 5.) );

AnalyticalIdentity3D<T,T> Calc_Temp1( AnalVel1 * Number1);
AnalyticalIdentity3D<T,T> Calc_Temp2( AnalVel2 * Number1);
AnalyticPlus3D<T,T> NewVel( Calc_Temp1 , Calc_Temp2);

SuperLatticeFfromAnalyticalF3D< T, DESCRIPTOR> NewVelToLattice(NewVel, lattice3);

SuperLatticePhysVelocity3D<T, DESCRIPTOR> velocity( lattice3, converter );
//


I hope I can create a new velocity field by doing some algebraic calulation with two velocities from two lattice by x,y,z components separately and store it to new lattice3 . But AnalyticalF didn’t works. There are no velocity values in lattice3.

In addition, as you mentioned that “transform it first to an analytical functor and then apply the algebraic operations. Afterwards transform the functor back to a lattice functor” so that I can write it with VTK. Do I have to translate a analytical functor into lattice before I write it to VTK? Because I may have some field results calcuated by analytical functors and then write to VTK files. If that , I need a lattice for every analytical result? That will be a lot of lattices. lol

Thank you again for your patience.

yours sincerely
steed188