Unknown error when simulation begins

I’m working on a forced convection heat transfer simulation for porous flow so I’ve been mashing together the Thermal Boussinesq and Permeability example codes. I put one together today that seems to compile just fine, but when it starts to run, I get this error:

/home/jon/Programs/palabos-v1.4r1/src/core/cell.h:144: T* plb::Cell<T, Descriptor>::getExternal(plb::plint) [with T = double, Descriptor = plb::descriptors::D3Q19Descriptor, plb::plint = long int]: Assertion `offset < Descriptor::ExternalField::numScalars’ failed.

and the simulation crashes.

Does anyone have a clue as to what the problem might be? I can’t decipher the error from that.

Many thanks.


/// Get a pointer to an external field
T* getExternal(plint offset) {
	PLB_PRECONDITION( offset < Descriptor<T>::ExternalField::numScalars );
	return external.get(offset);
}

It basically says that you try to access a position in the external field that does not exist. Make sure that you use a correct descriptor (such as descriptors::ForcedShanChenD3Q19Descriptor)

You’re exactly right. I forgot to change my descriptor to the ForcedD3Q19Descriptor when I copied some of the RayleighBenard syntax. Thanks!

Now it’s running but the temperature field seems completely uncoupled from the momentum field. Back to the drawing board…