T_GridFunction deprecated (C++ only)

We used to have the class hierarchy

GridFunction → S_GridFunction → T_GridFunction

where SCAL is real/complex and T is something like double, Vec<3,double>, Vec<9,Complex>

This required a compile-time fixed maximal system dimension. Now we use only S_GridFunction, and the dimension is a runtime variable.

This change may need adaption of user C++ code:
If you use

it throws now a dynamic cast exception.

You have to replace it by

You can wrap it into a VFlatVector<Vec<3>> if you need a member of the BaseVector family.

Sorry for the change, but now you can do a GridFunctions of dimension 21, as some turbulence people asked for.


Thank you for the correction. One small follow up question.

How exactly should we change the definition of the variable “gf_wd”

before we had to do

shared_ptr gf_wd;
gf_wd = make_shared<T_GridFunction<Vec<3> > > (*fes_scalar, “walldistance”, gfflags);
apde->AddGridFunction (“walldistance”, gf_wd);

Now perhaps there has to be a change to be made here.

I (perhaps naively) tried something like:

shared_ptr gf_wd;
gf_wd = make_shared<S_GridFunction >(fes_scalar, “WallDistance”, gfflags);
apde->AddGridFunction (“WallDistance”, gf_wd);

but ended up with a run time error “errmsg: dlopen(./main.so, 9): Symbol not found”

Thanks again!