コード例 #1
0
ファイル: SingleCellLayout.c プロジェクト: bmi-forum/bmi-pyre
SingleCellLayout* SingleCellLayout_New( Name name, const Bool dimExists[3], const XYZ min, const XYZ max ) { 
	SingleCellLayout* self = (SingleCellLayout*) _SingleCellLayout_DefaultNew( name );

	_CellLayout_Init( (CellLayout*)self );
	_SingleCellLayout_Init( self, dimExists, min, max );
	return self;
}
コード例 #2
0
ElementCellLayout* ElementCellLayout_New( Name name, AbstractContext* context, void* mesh ) { 
	ElementCellLayout* self = _ElementCellLayout_DefaultNew( name );

	self->isConstructed = True;
	_CellLayout_Init( (CellLayout*)self, context );
	_ElementCellLayout_Init( self, mesh );

	return self;
}
コード例 #3
0
TriSingleCellLayout* TriSingleCellLayout_New( Name name, AbstractContext* context, int dim, Dictionary* dictionary ) { 
	TriSingleCellLayout* self = _TriSingleCellLayout_DefaultNew( name );

	self->isConstructed = True;
	_CellLayout_Init( (CellLayout*)self, context );
	_TriSingleCellLayout_Init( self, dictionary, dim );

	return self;
}
コード例 #4
0
void _CellLayout_AssignFromXML( void* cellLayout, Stg_ComponentFactory *cf, void* data ) {
	CellLayout*			self = (CellLayout*)cellLayout;
	AbstractContext*	context;

	context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data );
   if( !context  )
      context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data  );

	_CellLayout_Init( self, context );
}
コード例 #5
0
ファイル: SingleCellLayout.c プロジェクト: bmi-forum/bmi-pyre
void _SingleCellLayout_Construct( void* singleCellLayout, Stg_ComponentFactory* cf, void* data ){
	SingleCellLayout* self              = (SingleCellLayout*)singleCellLayout;
	Bool              dimExists[]       = { False, False, False };
	Dimension_Index   dim;
	XYZ               min;
	XYZ               max;

	dim = Stg_ComponentFactory_GetRootDictUnsignedInt( cf, "dim", 0 );

	dimExists[ I_AXIS ] = Stg_ComponentFactory_GetBool( cf, self->name, "dimExistsI", True );
	dimExists[ J_AXIS ] = Stg_ComponentFactory_GetBool( cf, self->name, "dimExistsJ", True );
	dimExists[ K_AXIS ] = Stg_ComponentFactory_GetBool( cf, self->name, "dimExistsK", (dim == 3) );

	min[ I_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "minX", -1.0 );
	min[ J_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "minY", -1.0 );
	min[ K_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "minZ", -1.0 );

	max[ I_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "maxX", 1.0 );
	max[ J_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "maxY", 1.0 );
	max[ K_AXIS ] = Stg_ComponentFactory_GetDouble( cf, self->name, "maxZ", 1.0 );

	_CellLayout_Init( (CellLayout*)self );
	_SingleCellLayout_Init( self, dimExists, min, max );
}
コード例 #6
0
ファイル: CellLayout.c プロジェクト: dansand/underworld2
void _CellLayout_AssignFromXML( void* cellLayout, Stg_ComponentFactory *cf, void* data ) {
	CellLayout*			self = (CellLayout*)cellLayout;

	_CellLayout_Init( self );
}