コード例 #1
0
SLE_Solver* _SLE_Solver_New(  SLE_SOLVER_DEFARGS  )
{	
	SLE_Solver*		self;

	/* Allocate memory */
	assert( _sizeOfSelf >= sizeof(SLE_Solver) );
	/* The following terms are parameters that have been passed into this function but are being set before being passed onto the parent */
	/* This means that any values of these parameters that are passed into this function are not passed onto the parent function
	   and so should be set to ZERO in any children of this class. */
	nameAllocationType = NON_GLOBAL;

	self = (SLE_Solver*) _Stg_Component_New(  STG_COMPONENT_PASSARGS  );
	
	/* General info */
	
	/* Virtual info */
	self->_solverSetup = _solverSetup;
	self->_solve = _solve;
	self->_getResidual = _getResidual;

	self->_formResidual = NULL;
	self->_getRhs       = NULL;
	self->_getSolution  = NULL;

	return self;

}
コード例 #2
0
ファイル: Remesher.c プロジェクト: bmi-forum/bmi-pyre
Remesher* _Remesher_New( CLASS_ARGS, 
			 COMPONENT_ARGS, 
			 REMESHER_ARGS )
{
	Remesher*	self;

	/* Allocate memory. */
	self = (Remesher*)_Stg_Component_New( _sizeOfSelf,
					    type,
					    _delete,
					    _print, 
					    _copy, 
					    _defaultConstructor, 
					    _construct, 
					    _build, 
					    _initialise, 
					    _execute, 
					    _destroy, 
					    name, 
					    initFlag );

	/* Virtual functions. */
	self->setMeshFunc = setMeshFunc;

	/* Remesher info */
	if( initFlag ) {
		_Remesher_Init( self );
	}

	return self;
}
コード例 #3
0
MultigridSolver* _MultigridSolver_New(  MULTIGRIDSOLVER_DEFARGS  ) {
	MultigridSolver*	self;

	/* Allocate memory */
	assert( _sizeOfSelf >= sizeof(MultigridSolver) );

	self = (MultigridSolver*)_Stg_Component_New(  STG_COMPONENT_PASSARGS  );

	/* function assignments previously in the MatrixSolver_New func */
	self->setCommFunc = setCommFunc;
	self->setMatrixFunc = setMatrixFunc;
	self->setMaxIterationsFunc = setMaxIterationsFunc;
	self->setRelativeToleranceFunc = setRelativeToleranceFunc;
	self->setAbsoluteToleranceFunc = setAbsoluteToleranceFunc;
	self->setUseInitialSolutionFunc = setUseInitialSolutionFunc;

	self->solveFunc = solveFunc;
	self->setupFunc = setupFunc;

	self->getSolveStatusFunc = getSolveStatusFunc;
	self->getIterationsFunc = getIterationsFunc;
	self->getMaxIterationsFunc = getMaxIterationsFunc;
	self->getResidualNormFunc = getResidualNormFunc;

	/* Virtual info */

	/* MultigridSolver info */
	_MultigridSolver_Init( self );

	return self;
}
コード例 #4
0
VariableCondition* _VariableCondition_New(  VARIABLECONDITION_DEFARGS  ) {
	VariableCondition*	self;
	
	/* Allocate memory/General info */
	assert( _sizeOfSelf >= sizeof(VariableCondition) );
	self = (VariableCondition*)_Stg_Component_New(  STG_COMPONENT_PASSARGS  );
	
	/* Virtual info */
	self->_buildSelf = _buildSelf;
	self->_printConcise = _printConcise;
	self->_readDictionary = _readDictionary;
	self->_getSet = _getSet;
	self->_getVariableCount = _getVariableCount;
	self->_getVariableIndex = _getVariableIndex;
	self->_getValueIndex = _getValueIndex;
	self->_getValueCount = _getValueCount;
	self->_getValue = _getValue;
	self->_apply = _apply;
	self->_isCondition = _isCondition;
	self->_set = NULL;
	self->indexCount = 0;
	self->indexTbl = NULL;
	self->vcVarCountTbl = NULL;
	self->vcTbl = NULL;
	self->valueCount = 0;
	self->valueTbl = NULL;
	self->mapping = NULL;

	/* Stg_Class info */
	
	return self;
}
コード例 #5
0
PETScMGSolver* _PETScMGSolver_New(  PETSCMGSOLVER_DEFARGS  ) {
	PETScMGSolver*	self;

	/* Allocate memory */
	assert( _sizeOfSelf >= sizeof(PETScMGSolver) );
	//self = (PETScMGSolver*)_PETScMatrixSolver_New(  STG_COMPONENT_PASSARGS  );
	self = (PETScMGSolver*)_Stg_Component_New( STG_COMPONENT_PASSARGS );

	/* Virtual info */
	/* from the depreciated MatrixSolver_New func */
	self->setCommFunc = setCommFunc;
	self->setMatrixFunc = setMatrixFunc;
	self->setMaxIterationsFunc = setMaxIterationsFunc;
	self->setRelativeToleranceFunc = setRelativeToleranceFunc;
	self->setAbsoluteToleranceFunc = setAbsoluteToleranceFunc;
	self->setUseInitialSolutionFunc = setUseInitialSolutionFunc;

	self->solveFunc = solveFunc;
	self->setupFunc = setupFunc;

	self->getSolveStatusFunc = getSolveStatusFunc;
	self->getIterationsFunc = getIterationsFunc;
	self->getMaxIterationsFunc = getMaxIterationsFunc;
	self->getResidualNormFunc = getResidualNormFunc;

	/* PETScMGSolver info */
	_PETScMGSolver_Init( self );

	return self;
}
コード例 #6
0
Mesh* _Mesh_New(  MESH_DEFARGS  ) {
	Mesh* self;
	
	/* Allocate memory */
	assert( _sizeOfSelf >= sizeof(Mesh) );
	self = (Mesh*)_Stg_Component_New(  STG_COMPONENT_PASSARGS  );

	self->topo = (MeshTopology*)IGraph_New( "" );
	self->vertices = NULL;
    self->verticesVariable = NULL;
    self->vGlobalIdsVar = NULL;
    self->verticesgid = NULL;
    self->e_n = NULL;
    self->enMapVar = NULL;
    self->elgid = NULL;
    self->eGlobalIdsVar = NULL;

	self->vars = List_New();
	List_SetItemSize( self->vars, sizeof(MeshVariable*) );

	self->minSep = 0.0;
	self->minAxialSep = NULL;
	self->minLocalCrd = NULL;
	self->maxLocalCrd = NULL;
	self->minDomainCrd = NULL;
	self->maxDomainCrd = NULL;
	self->minGlobalCrd = NULL;
	self->maxGlobalCrd = NULL;

	self->algorithms = Mesh_Algorithms_New( "", NULL );
	Mesh_Algorithms_SetMesh( self->algorithms, self );
	self->nElTypes = 0;
	self->elTypes = NULL;
	self->elTypeMap = NULL;

	self->topoDataSizes = UIntMap_New();
	self->topoDataInfos = NULL;
	self->topoDatas = NULL;
	self->info = ExtensionManager_New_OfExistingObject( "mesh_info", self );
	self->vertGridId = (unsigned)-1;
	self->elGridId = (unsigned)-1;
	self->periodicId = (unsigned)-1;
	self->localOriginId = (unsigned)-1;
	self->localRangeId = (unsigned)-1;

	self->generator = NULL;
	self->emReg = NULL;

	self->isDeforming     = False;

	self->isRegular = False;
    self->parentMesh = NULL;

	return self;
}
コード例 #7
0
ファイル: Remesher.c プロジェクト: underworldcode/underworld2
Remesher* _Remesher_New(  REMESHER_DEFARGS  ) {
    Remesher* self;

    /* Allocate memory. */
    self = (Remesher*)_Stg_Component_New(  STG_COMPONENT_PASSARGS  );

    /* Virtual functions. */
    self->remeshFunc = remeshFunc;

    return self;
}
コード例 #8
0
void* _Codelet_New( CODELET_DEFARGS ) {
   /* 
    * The following terms are parameters that have been passed into this function
    * but are being set before being passed onto the parent. 
    * This means that any values of these parameters that are passed into this 
    * function are not passed onto the parent function and so should be set to 
    * ZERO in any children of this class. 
    */
   nameAllocationType = NON_GLOBAL;

   return _Stg_Component_New( STG_COMPONENT_PASSARGS );
}
コード例 #9
0
PeriodicBoundariesManager* _PeriodicBoundariesManager_New(  PERIODICBOUNDARIESMANAGER_DEFARGS  ) {
	PeriodicBoundariesManager* self;
	
	/* Allocate memory */
	self = (PeriodicBoundariesManager*)_Stg_Component_New(  STG_COMPONENT_PASSARGS  );
	
	/* General info */
	
	/* Virtual info */
	
	return self;
}
コード例 #10
0
ファイル: SolutionVector.c プロジェクト: dansand/underworld2
SolutionVector* _SolutionVector_New(  SOLUTIONVECTOR_DEFARGS  ) {
	SolutionVector* self;

	/* Allocate memory */
	assert( _sizeOfSelf >= sizeof(SolutionVector) );
	self = (SolutionVector*)_Stg_Component_New(  STG_COMPONENT_PASSARGS  );

	/* General info */

	/* Virtual info */

	return self;
}
コード例 #11
0
MeshGenerator* _MeshGenerator_New(  MESHGENERATOR_DEFARGS  ) {
	MeshGenerator*	self;

	/* Allocate memory */
	assert( _sizeOfSelf >= sizeof(MeshGenerator) );
	self = (MeshGenerator*)_Stg_Component_New(  STG_COMPONENT_PASSARGS  );

	/* Virtual info */
	self->setDimSizeFunc = setDimSizeFunc;
	self->generateFunc = generateFunc;

	return self;
}
コード例 #12
0
ファイル: Decomp_Sync.c プロジェクト: bmi-forum/bmi-pyre
Decomp_Sync* _Decomp_Sync_New( DECOMP_SYNC_DEFARGS ) {
	Decomp_Sync* self;
	
	/* Allocate memory */
	assert( sizeOfSelf >= sizeof(Decomp_Sync) );
	self = (Decomp_Sync*)_Stg_Component_New( STG_COMPONENT_PASSARGS );

	/* Virtual info */

	/* Decomp_Sync info */
	_Decomp_Sync_Init( self );

	return self;
}
コード例 #13
0
/* Private Constructor */
ShapedMaterial* _ShapedMaterial_New(  SHAPEDMATERIAL_DEFARGS  )
{
	ShapedMaterial* self;
	
	assert( _sizeOfSelf >= sizeof(ShapedMaterial) );
	/* The following terms are parameters that have been passed into this function but are being set before being passed onto the parent */
	/* This means that any values of these parameters that are passed into this function are not passed onto the parent function
	   and so should be set to ZERO in any children of this class. */
	nameAllocationType = NON_GLOBAL;

	self = (ShapedMaterial*) _Stg_Component_New(  STG_COMPONENT_PASSARGS  );

	return self;
}
コード例 #14
0
ファイル: DecompTransfer.c プロジェクト: bmi-forum/bmi-pyre
DecompTransfer* _DecompTransfer_New( DECOMPTRANSFER_DEFARGS ) {
	DecompTransfer* self;
	
	/* Allocate memory */
	assert( sizeOfSelf >= sizeof(DecompTransfer) );
	self = (DecompTransfer*)_Stg_Component_New( STG_COMPONENT_PASSARGS );

	/* Virtual info */

	/* DecompTransfer info */
	_DecompTransfer_Init( self );

	return self;
}
コード例 #15
0
DofLayout* _DofLayout_New(  DOFLAYOUT_DEFARGS  ) {
	DofLayout* self;
	
	/* Allocate memory/General info */
	assert( _sizeOfSelf >= sizeof(DofLayout) );
	self = (DofLayout*)_Stg_Component_New(  STG_COMPONENT_PASSARGS  );
	
	/* Virtual info */
	self->_build = _build;
	self->_initialise = _initialise;
	
	/* Stg_Class info */
	
	return self;
}
コード例 #16
0
Decomp_Sync_Negotiate* _Decomp_Sync_Negotiate_New( DECOMP_SYNC_NEGOTIATE_DEFARGS ) {
	Decomp_Sync_Negotiate* self;
	
	/* Allocate memory */
	assert( sizeOfSelf >= sizeof(Decomp_Sync_Negotiate) );
	self = (Decomp_Sync_Negotiate*)_Stg_Component_New( STG_COMPONENT_PASSARGS );

	/* Virtual info */
	self->selectFunc = selectFunc;

	/* Decomp_Sync_Negotiate info */
	_Decomp_Sync_Negotiate_Init( self );

	return self;
}
コード例 #17
0
JAMBoxExampleComponent* _JAMBoxExampleComponent_New(  JAMBoxEXAMPLECOMPONENT_DEFARGS  )
{
   JAMBoxExampleComponent* self;

   /* Call private constructor of parent - this will set virtual functions of parent and continue up the hierarchy tree. At the beginning of the tree it will allocate memory of the size of object and initialise all the memory to zero. */
   assert( _sizeOfSelf >= sizeof(JAMBoxExampleComponent) );
   /* The following terms are parameters that have been passed into this function but are being set before being passed onto the parent */
   /* This means that any values of these parameters that are passed into this function are not passed onto the parent function
      and so should be set to ZERO in any children of this class. */
   nameAllocationType = NON_GLOBAL;

   self = (JAMBoxExampleComponent*) _Stg_Component_New(  STG_COMPONENT_PASSARGS  );

   return self;
}
コード例 #18
0
LinkedDofInfo* _LinkedDofInfo_New(  LINKEDDOFINFO_DEFARGS  ) {
	LinkedDofInfo* self;
	
	/* Allocate memory */
	assert( _sizeOfSelf >= sizeof(LinkedDofInfo) );
	self = (LinkedDofInfo*)_Stg_Component_New(  STG_COMPONENT_PASSARGS  );
	
	/* General info */
	
	/* Virtual info */
	self->_build = _build;
	self->_initialise = _initialise;
	
	/* member info */
	
	return self;
}
コード例 #19
0
StiffnessMatrixTerm* _StiffnessMatrixTerm_New(  STIFFNESSMATRIXTERM_DEFARGS  )
{
	StiffnessMatrixTerm*		self;
	
	/* Allocate memory */
	assert( _sizeOfSelf >= sizeof(StiffnessMatrixTerm) );
	/* The following terms are parameters that have been passed into this function but are being set before being passed onto the parent */
	/* This means that any values of these parameters that are passed into this function are not passed onto the parent function
	   and so should be set to ZERO in any children of this class. */
	nameAllocationType = NON_GLOBAL;

	self = (StiffnessMatrixTerm*)_Stg_Component_New(  STG_COMPONENT_PASSARGS  );

	self->_assembleElement = _assembleElement;
	
	return self;
}
コード例 #20
0
ファイル: Sync.c プロジェクト: bmi-forum/bmi-pyre
Sync* _Sync_New( SizeT						_sizeOfSelf, 
		 Type						type,
		 Stg_Class_DeleteFunction*			_delete,
		 Stg_Class_PrintFunction*			_print,
		 Stg_Class_CopyFunction*			_copy, 
		 Stg_Component_DefaultConstructorFunction*	_defaultConstructor,
		 Stg_Component_ConstructFunction*		_construct,
		 Stg_Component_BuildFunction*			_build,
		 Stg_Component_InitialiseFunction*		_initialise,
		 Stg_Component_ExecuteFunction*			_execute,
		 Stg_Component_DestroyFunction*			_destroy,
		 Name						name,
		 Bool						initFlag,
		 Dictionary*					dictionary )
{
	Sync* self;
	
	/* Allocate memory */
	assert( _sizeOfSelf >= sizeof(Sync) );
	self = (Sync*)_Stg_Component_New( 
		_sizeOfSelf, 
		type, 
		_delete, 
		_print, 
		_copy, 
		_defaultConstructor, 
		_construct, 
		_build, 
		_initialise, 
		_execute, 
		_destroy, 
		name, 
		NON_GLOBAL );
	
	/* General info */
	self->dictionary = dictionary;
	
	/* Virtual info */
	
	/* Sync info */
	if( initFlag ){
		_Sync_Init( self );
	}
	
	return self;
}
コード例 #21
0
TimeIntegrator* _TimeIntegrator_New(  TIMEINTEGRATOR_DEFARGS  )
{
	TimeIntegrator*	self;
	
	assert( _sizeOfSelf >= sizeof(TimeIntegrator) );
	
	/* General info */
	/* The following terms are parameters that have been passed into this function but are being set before being passed onto the parent */
	/* This means that any values of these parameters that are passed into this function are not passed onto the parent function
	   and so should be set to ZERO in any children of this class. */
	nameAllocationType = NON_GLOBAL;

	self = (TimeIntegrator*)_Stg_Component_New(  STG_COMPONENT_PASSARGS  );
    
    self->dt = 0.;
	
	return self;
}
コード例 #22
0
ファイル: SwarmVariable.c プロジェクト: bmi-forum/bmi-pyre
SwarmVariable* _SwarmVariable_New(
		SizeT                                              _sizeOfSelf, 
		Type                                               type,
		Stg_Class_DeleteFunction*	                       _delete,
		Stg_Class_PrintFunction*	                       _print, 
		Stg_Class_CopyFunction*	                           _copy, 
		Stg_Component_DefaultConstructorFunction*          _defaultConstructor,
		Stg_Component_ConstructFunction                    _construct,
		Stg_Component_BuildFunction*                       _build,
		Stg_Component_InitialiseFunction*                  _initialise,
		Stg_Component_ExecuteFunction*                     _execute,
		Stg_Component_DestroyFunction*                     _destroy,
		SwarmVariable_ValueAtFunction*                     _valueAt,
		SwarmVariable_GetGlobalValueFunction*              _getMinGlobalMagnitude,
		SwarmVariable_GetGlobalValueFunction*              _getMaxGlobalMagnitude,		
		Name                                               name )
{
	SwarmVariable*		self;
	
	/* Allocate memory */
	assert( _sizeOfSelf >= sizeof(SwarmVariable) );
	self = (SwarmVariable*)_Stg_Component_New( 
			_sizeOfSelf,
			type, 
			_delete,
			_print, 
			_copy,
			_defaultConstructor,
			_construct,
			_build,
			_initialise,
			_execute,
			_destroy,
			name, 
			NON_GLOBAL );
	
	/* Virtual functions */
	self->_valueAt                    = _valueAt;
	self->_getMinGlobalMagnitude      = _getMinGlobalMagnitude;
	self->_getMaxGlobalMagnitude      = _getMaxGlobalMagnitude;

	return self;
}
コード例 #23
0
Mesh_Algorithms* _Mesh_Algorithms_New(  MESH_ALGORITHMS_DEFARGS  ) {
    Mesh_Algorithms* self;

    /* Allocate memory */
    assert( _sizeOfSelf >= sizeof(Mesh_Algorithms) );
    self = (Mesh_Algorithms*)_Stg_Component_New(  STG_COMPONENT_PASSARGS  );

    /* Virtual info */
    self->setMeshFunc = setMeshFunc;
    self->updateFunc = updateFunc;
    self->nearestVertexFunc = nearestVertexFunc;
    self->searchFunc = searchFunc;
    self->searchElementsFunc = searchElementsFunc;
    self->getMinimumSeparationFunc = getMinimumSeparationFunc;
    self->getLocalCoordRangeFunc = getLocalCoordRangeFunc;
    self->getDomainCoordRangeFunc = getDomainCoordRangeFunc;
    self->getGlobalCoordRangeFunc = getGlobalCoordRangeFunc;

    return self;
}
コード例 #24
0
EscapedRoutine* _EscapedRoutine_New(  ESCAPEDROUTINE_DEFARGS  )
{
	EscapedRoutine* self;
	
	/* Allocate memory */
	assert( _sizeOfSelf >= sizeof(EscapedRoutine) );
	/* The following terms are parameters that have been passed into this function but are being set before being passed onto the parent */
	/* This means that any values of these parameters that are passed into this function are not passed onto the parent function
	   and so should be set to ZERO in any children of this class. */
	nameAllocationType = NON_GLOBAL;

	self = (EscapedRoutine*)_Stg_Component_New(  STG_COMPONENT_PASSARGS  );
	
	/* General info */

	/* Virtual Info */
	self->_select = _select;
	
	return self;
}
コード例 #25
0
TimeIntegrand* _TimeIntegrand_New(  TIMEINTEGRAND_DEFARGS  )
{
	TimeIntegrand*	self;
	
	assert( _sizeOfSelf >= sizeof(TimeIntegrand) );
	
	/* General info */
	/* The following terms are parameters that have been passed into this function but are being set before being passed onto the parent */
	/* This means that any values of these parameters that are passed into this function are not passed onto the parent function
	   and so should be set to ZERO in any children of this class. */
	nameAllocationType = NON_GLOBAL;

	self = (TimeIntegrand*)_Stg_Component_New(  STG_COMPONENT_PASSARGS  );

	/* virtual info */
	self->_calculateTimeDeriv = _calculateTimeDeriv;
	self->_intermediate = _intermediate;
	
	return self;
}
コード例 #26
0
ParticleLayout* _ParticleLayout_New(  PARTICLELAYOUT_DEFARGS  )
{
   ParticleLayout*		self;
	
   /* hard-wire this var */
   nameAllocationType = NON_GLOBAL;

   /* Allocate memory */
   assert( _sizeOfSelf >= sizeof(ParticleLayout) );
   self = (ParticleLayout*)_Stg_Component_New(  STG_COMPONENT_PASSARGS  );
	
   /* General info */
   self->coordSystem = coordSystem;	
   self->weightsInitialisedAtStartup = weightsInitialisedAtStartup;	

   /* Virtual functions */
   self->_setInitialCounts = _setInitialCounts;
   self->_initialiseParticles = _initialiseParticles;
	
    return self;
}
コード例 #27
0
ファイル: CellLayout.c プロジェクト: dansand/underworld2
CellLayout* _CellLayout_New(  CELLLAYOUT_DEFARGS  ) {
	CellLayout* self;
	
	/* Allocate memory */
	assert( _sizeOfSelf >= sizeof(CellLayout) );
	self = (CellLayout*)_Stg_Component_New(  STG_COMPONENT_PASSARGS  );
	
	/* General info */
	
	/* Virtual functions */
	self->_cellLocalCount = _cellLocalCount;
	self->_cellShadowCount = _cellShadowCount;
	self->_pointCount = _pointCount;
	self->_initialisePoints = _initialisePoints;
	self->_mapElementIdToCellId = _mapElementIdToCellId;
	self->_isInCell = _isInCell;
	self->_cellOf = _cellOf;
	self->_getShadowInfo = _getShadowInfo;
	
	return self;
}
コード例 #28
0
FieldVariable* _FieldVariable_New( FIELDVARIABLE_DEFARGS ) {
   FieldVariable* self;
   
   /* Allocate memory */
   assert( _sizeOfSelf >= sizeof(FieldVariable) );
   self = (FieldVariable*)_Stg_Component_New( STG_COMPONENT_PASSARGS );
   
   /* Virtual functions */
   self->_interpolateValueAt              = _interpolateValueAt;
   self->_getMinGlobalFieldMagnitude      = _getMinGlobalFieldMagnitude;
   self->_getMaxGlobalFieldMagnitude      = _getMaxGlobalFieldMagnitude;
   self->_cacheMinMaxGlobalFieldMagnitude = _cacheMinMaxGlobalFieldMagnitude;
   self->_getMinAndMaxLocalCoords         = _getMinAndMaxLocalCoords;
   self->_getMinAndMaxGlobalCoords        = _getMinAndMaxGlobalCoords;

   /* General info */

   /* FieldVariable info */
   self->o_units = NULL;
   
   return self;
}
コード例 #29
0
ファイル: SwarmDump.c プロジェクト: bmi-forum/bmi-pyre
SwarmDump* _SwarmDump_New(
		SizeT                                              _sizeOfSelf, 
		Type                                               type,
		Stg_Class_DeleteFunction*	                       _delete,
		Stg_Class_PrintFunction*	                       _print, 
		Stg_Class_CopyFunction*	                           _copy, 
		Stg_Component_DefaultConstructorFunction*          _defaultConstructor,
		Stg_Component_ConstructFunction*                   _construct,
		Stg_Component_BuildFunction*                       _build,
		Stg_Component_InitialiseFunction*                  _initialise,
		Stg_Component_ExecuteFunction*                     _execute,
		Stg_Component_DestroyFunction*                     _destroy,
		Name                                               name ) 
{
	SwarmDump*		self;
	
	/* Allocate memory */
	assert( _sizeOfSelf >= sizeof(SwarmDump) );
	self = (SwarmDump*)_Stg_Component_New( 
			_sizeOfSelf,
			type, 
			_delete,
			_print, 
			_copy,
			_defaultConstructor,
			_construct,
			_build,
			_initialise,
			_execute,
			_destroy,
			name, 
			NON_GLOBAL );
	
	/* Virtual functions */

	return self;
}
コード例 #30
0
ファイル: MeshLayout.c プロジェクト: bmi-forum/bmi-pyre
MeshLayout* _MeshLayout_New(
		SizeT						_sizeOfSelf, 
		Type						type,
		Stg_Class_DeleteFunction*				_delete,
		Stg_Class_PrintFunction*				_print,
		Stg_Class_CopyFunction*				_copy, 
		Stg_Component_DefaultConstructorFunction*	_defaultConstructor,
		Stg_Component_ConstructFunction*			_construct,
		Stg_Component_BuildFunction*				_build,
		Stg_Component_InitialiseFunction*			_initialise,
		Stg_Component_ExecuteFunction*				_execute,
		Stg_Component_DestroyFunction*				_destroy,
		Name									name,
		Bool							initFlag,
		ElementLayout*					elementLayout,
		NodeLayout*					nodeLayout,
		MeshDecomp*					decomp )
{
	MeshLayout* self;
	
	/* Allocate memory */
	assert( _sizeOfSelf >= sizeof(MeshLayout) );
	self = (MeshLayout*)_Stg_Component_New( _sizeOfSelf, type, _delete, _print, _copy, _defaultConstructor, _construct, _build, 
			_initialise, _execute, _destroy, name, NON_GLOBAL );
	
	/* General info */
	
	/* Virtual info */
	
	/* MeshLayout info */
	if( initFlag ){
		_MeshLayout_Init( self, elementLayout, nodeLayout, decomp );
	}
	
	return self;
}