Hi,

I tried to make this work on platform SUSE Linux 12.1. I (only) 
encountered the following error(s) after installing the necessary 
packages (e.g. sundials):

> yacts.cpp: In memberfunctie ‘bool yacts::initTrajectory(std::string)’:
> yacts.cpp:148:8: fout: ‘CV_SS’ was not declared in this scope
> yacts.cpp:148:38: fout: ‘CVodeMalloc’ was not declared in this scope
> yacts.cpp:150:39: fout: ‘CVodeSetFdata’ was not declared in this scope
> make[3]: *** [yacts.o] Fout 1
> make[3]: Map '/home/aai/jplus-0.4.2/src' wordt verlaten
> make[2]: *** [all] Fout 2
> make[2]: Map '/home/aai/jplus-0.4.2/src' wordt verlaten
> make[1]: *** [all-recursive] Fout 1
> make[1]: Map '/home/aai/jplus-0.4.2' wordt verlaten
> make: *** [all] Fout 2

I changed function

bool yacts::initTrajectory(string prefix)

of file yacts.cc into the following

> bool yacts::initTrajectory(string prefix) {
> string trjname=getTrajectoryFilenameBase(prefix)+".trj";
> trjfile::open(trjname);
> if (!trjfile::hasNextFrame()) {
> // file is new, we need to create and save the initial frame
> saveFrame();
> } else {
> // read the last frame
> trjfile::toFrame(-1);
> loadFrame();
> };
>
> // now we have the first frame inside J+
> // pull it out and feed to the solver
> jarray_of_type<double> jtnext=get("T"); // compute next time
> jarray_of_type<double> jt=jengine::get("T"); // first version of T, 
> curr time
> assert(jt.rank()==0); // assert the time is scalar
>
> jarray_of_type<double> js=get("S");
>
> nvs = N_VNew_Serial(neq); assert(nvs);
> for(int i=0;i<js.size();i++) NV_Ith_S(((N_Vector)nvs),i)=js[i];
> cvode_mem = CVodeCreate(CV_BDF, CV_NEWTON);
> int flag;
> realtype abstol=1.0e-5; /*abstol*/

CHANGES
> flag = CVodeInit(cvode_mem, rhs, jt[0], (N_Vector)nvs); assert(!flag);
> flag = CVodeSStolerances(cvode_mem,1.0e-3 ,abstol);
> // pass pointer to "this" object for rhs
> flag = CVodeSetUserData(cvode_mem, this);
END OF CHANGES

> // specify the solver and subspace dimension
> flag = CVSpgmr(cvode_mem,PREC_NONE,300);
>
> // now we are ready to integrate
> };

Then 'make install' ran without error(s).

Trying out two examples

 > yacts ./examples/0_constant/constant

ok

 > yacts ./examples/1_pendulum/pendulum | gnuplot

Ok





On 28-06-12 18:51, Konstantin L. Metlov wrote:
> For some years I was thinking to do some large-scale numerical mathematics
> with J. It was clear to me from the very beginning that J can be an ideal
> language for this, very concise and efficient. But many important ingredients
> were lacking, like routines for numerical integration, Fourier transforms, ODE
> solving, vector field visualization. There were some, of course, but scattered
> and unsupported.
>
> This time, when I needed to integrate Landau-Lifshitz-Gilbert equation from
> magnetism on finite element mesh (to simulate dynamics of nano-scale magnets),
> I decided to put together some bits and pieces (including my own) in a form of
> simulation language I called J&+ ("with J added", jplus or J+) and an ODE
> solver yacts. You can find the details here:
>
> http://www.fti.dn.ua/~metlov/jplus/
>
> Have a look !
>
> With the best regards,
>                             Konstantin.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

-- 
Met vriendelijke groet,
@@i = Arie Groeneveld



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to