Exemplo n.º 1
0
FREESTEAM_EXPORT int freesteam_register(){
		int result = 0;

#ifdef BBOX_DEBUG
		CONSOLE_DEBUG("Initialising freesteam...");
#endif
		result += CreateUserFunctionBlackBox("freesteam_Tvsx_ph"
			, NULL /* alloc */
			, Tvsx_ph_calc /* value */
			, Tvsx_ph_calc /* deriv */
			, NULL /* deriv2 */
			, NULL /* free */
			, 2,4 /* inputs, outputs */
			, "[T,v,s,x] = freesteam_Tvsx_ph(p,h) (see http://freesteam.sf.net)"
			, 0.0
		);

		result += CreateUserFunctionBlackBox("freesteam_mukrhocp_pT"
			, NULL /* alloc */
			, mukrhocp_pT_calc /* value */
			, NULL /* deriv */
			, NULL /* deriv2 */
			, NULL /* free */
			, 2,4 /* inputs, outputs */
			, "[mu,k,rho,cp] = freesteam_mukrhocp_pT(p,T) (see http://freesteam.sf.net)"
			, 0.0
		);

		result += CreateUserFunctionBlackBox("freesteam_mu_Tv"
			, NULL /* alloc */
			, mu_Tv_calc /* value */
			, NULL /* deriv */
			, NULL /* deriv2 */
			, NULL /* free */
			, 2,1 /* inputs, outputs */
			, "[mu] = freesteam_mu_Tv(T,v) (see http://freesteam.sf.net)"
			, 0.0
		);

#define X
FREESTEAM_SISO_FUNCS(FREESTEAM_SISO_DECL,X)
#undef X

		return result;
}
Exemplo n.º 2
0
/**
	This is the function called from "IMPORT heatex_pinch"

	It sets up the functions contained in this external library, but doesn't
	actually create any specific external-relation instances.
*/
extern
ASC_EXPORT int heatex_pinch_register(){
	int result = 0;

	ERROR_REPORTER_HERE(ASC_USER_WARNING,"HEATEX is still EXPERIMENTAL.\n");

	result += CreateUserFunctionBlackBox("heatex_DT_phmphmQ"
		,heatex_prepare
		,heatex_calc
		,(ExtBBoxFunc*)NULL /* no derivatives yet */
		,(ExtBBoxFunc*)NULL /* hessian not provided yet */ \
		,(ExtBBoxFinalFunc*)NULL /* finalisation not implemented */ \
		,7, 1 /* inputs, outputs */
		,heatex_help
		,0.0
	);

	if(result){
		ERROR_REPORTER_HERE(ASC_PROG_NOTE,"result = %d\n",result);
	}
	return result;
}