[cig-commits] r4859 - in long/3D/Gale/trunk/src/StGermain: .
Discretisation/Utils/src
walter at geodynamics.org
walter at geodynamics.org
Wed Oct 11 13:47:35 PDT 2006
Author: walter
Date: 2006-10-11 13:47:34 -0700 (Wed, 11 Oct 2006)
New Revision: 4859
Modified:
long/3D/Gale/trunk/src/StGermain/
long/3D/Gale/trunk/src/StGermain/Discretisation/Utils/src/CornerVC.c
long/3D/Gale/trunk/src/StGermain/Discretisation/Utils/src/CornerVC.h
long/3D/Gale/trunk/src/StGermain/Discretisation/Utils/src/CornerVC.meta
Log:
r2916 at earth: boo | 2006-10-11 13:42:41 -0700
r2832 at earth (orig r3820): KathleenHumble | 2006-10-02 22:22:58 -0700
Fixing up spacing in files
and adding a brief description line to the meta file.
Property changes on: long/3D/Gale/trunk/src/StGermain
___________________________________________________________________
Name: svk:merge
- 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2915
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3819
+ 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2916
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3820
Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Utils/src/CornerVC.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Utils/src/CornerVC.c 2006-10-11 20:47:32 UTC (rev 4858)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Utils/src/CornerVC.c 2006-10-11 20:47:34 UTC (rev 4859)
@@ -46,7 +46,7 @@
const Type CornerVC_Type = "CornerVC";
const Name defaultCornerVCName = "defaultCornerVCName";
-
+/* List of corner names */
const char* CornerVC_CornerEnumToStr[CornerVC_Corner_Size] = {
"bottomLeftFront",
"bottomRightFront",
@@ -105,12 +105,12 @@
}
CornerVC* CornerVC_New(
- Name name,
- Name _dictionaryEntryName,
- Variable_Register* variable_Register,
- ConditionFunction_Register* conFunc_Register,
- Dictionary* dictionary,
- void* _mesh )
+ Name name,
+ Name _dictionaryEntryName,
+ Variable_Register* variable_Register,
+ ConditionFunction_Register* conFunc_Register,
+ Dictionary* dictionary,
+ void* _mesh )
{
return _CornerVC_New(
sizeof(CornerVC),
@@ -144,13 +144,13 @@
void CornerVC_Init(
- CornerVC* self,
- Name name,
- Name _dictionaryEntryName,
- Variable_Register* variable_Register,
- ConditionFunction_Register* conFunc_Register,
- Dictionary* dictionary,
- void* _mesh )
+ CornerVC* self,
+ Name name,
+ Name _dictionaryEntryName,
+ Variable_Register* variable_Register,
+ ConditionFunction_Register* conFunc_Register,
+ Dictionary* dictionary,
+ void* _mesh )
{
/* General info */
self->type = CornerVC_Type;
@@ -158,24 +158,24 @@
self->_deleteSelf = False;
/* Virtual info */
- self->_delete = _CornerVC_Delete;
- self->_print = _CornerVC_Print;
- self->_copy = _CornerVC_Copy;
+ self->_delete = _CornerVC_Delete;
+ self->_print = _CornerVC_Print;
+ self->_copy = _CornerVC_Copy;
self->_defaultConstructor = (void*)CornerVC_DefaultNew;
- self->_construct = _CornerVC_Construct;
- self->_build = _CornerVC_Build;
- self->_initialise = _VariableCondition_Initialise;
- self->_execute = _VariableCondition_Execute;
- self->_destroy = _VariableCondition_Destroy;
- self->_buildSelf = _CornerVC_BuildSelf;
- self->_printConcise = _CornerVC_PrintConcise;
- self->_readDictionary = _CornerVC_ReadDictionary;
- self->_getSet = _CornerVC_GetSet;
- self->_getVariableCount = _CornerVC_GetVariableCount;
- self->_getVariableIndex = _CornerVC_GetVariableIndex;
- self->_getValueIndex = _CornerVC_GetValueIndex;
- self->_getValueCount = _CornerVC_GetValueCount;
- self->_getValue = _CornerVC_GetValue;
+ self->_construct = _CornerVC_Construct;
+ self->_build = _CornerVC_Build;
+ self->_initialise = _VariableCondition_Initialise;
+ self->_execute = _VariableCondition_Execute;
+ self->_destroy = _VariableCondition_Destroy;
+ self->_buildSelf = _CornerVC_BuildSelf;
+ self->_printConcise = _CornerVC_PrintConcise;
+ self->_readDictionary = _CornerVC_ReadDictionary;
+ self->_getSet = _CornerVC_GetSet;
+ self->_getVariableCount = _CornerVC_GetVariableCount;
+ self->_getVariableIndex = _CornerVC_GetVariableIndex;
+ self->_getValueIndex = _CornerVC_GetValueIndex;
+ self->_getValueCount = _CornerVC_GetValueCount;
+ self->_getValue = _CornerVC_GetValue;
_Stg_Class_Init( (Stg_Class*)self );
_Stg_Object_Init( (Stg_Object*)self, name, NON_GLOBAL );
@@ -188,33 +188,33 @@
CornerVC* _CornerVC_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,
- VariableCondition_BuildSelfFunc* _buildSelf,
- VariableCondition_PrintConciseFunc* _printConcise,
- VariableCondition_ReadDictionaryFunc* _readDictionary,
- VariableCondition_GetSetFunc* _getSet,
- VariableCondition_GetVariableCountFunc* _getVariableCount,
- VariableCondition_GetVariableIndexFunc* _getVariableIndex,
- VariableCondition_GetValueIndexFunc* _getValueIndex,
- VariableCondition_GetValueCountFunc* _getValueCount,
- VariableCondition_GetValueFunc* _getValue,
- Name _dictionaryEntryName,
- Variable_Register* variable_Register,
- ConditionFunction_Register* conFunc_Register,
- Dictionary* dictionary,
- void* _mesh)
+ 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,
+ VariableCondition_BuildSelfFunc* _buildSelf,
+ VariableCondition_PrintConciseFunc* _printConcise,
+ VariableCondition_ReadDictionaryFunc* _readDictionary,
+ VariableCondition_GetSetFunc* _getSet,
+ VariableCondition_GetVariableCountFunc* _getVariableCount,
+ VariableCondition_GetVariableIndexFunc* _getVariableIndex,
+ VariableCondition_GetValueIndexFunc* _getValueIndex,
+ VariableCondition_GetValueCountFunc* _getValueCount,
+ VariableCondition_GetValueFunc* _getValue,
+ Name _dictionaryEntryName,
+ Variable_Register* variable_Register,
+ ConditionFunction_Register* conFunc_Register,
+ Dictionary* dictionary,
+ void* _mesh)
{
CornerVC* self;
@@ -265,12 +265,12 @@
{
CornerVC* self = (CornerVC*)cornerVC;
- self->isConstructed = True;
- self->_dictionaryEntryName = _dictionaryEntryName;
- self->_mesh = (Mesh*)_mesh;
- self->_corner = CornerVC_Corner_Size;
- self->_entryTbl = 0;
- self->_entryCount = 0;
+ self->isConstructed = True;
+ self->_dictionaryEntryName = _dictionaryEntryName;
+ self->_mesh = (Mesh*)_mesh;
+ self->_corner = CornerVC_Corner_Size;
+ self->_entryTbl = 0;
+ self->_entryCount = 0;
}
@@ -279,29 +279,32 @@
*/
void _CornerVC_ReadDictionary( void* variableCondition, void* dictionary ) {
- CornerVC* self = (CornerVC*)variableCondition;
- Dictionary_Entry_Value* vcDictVal;
- Dictionary_Entry_Value _vcDictVal;
- Dictionary_Entry_Value* varsVal;
- CornerVC_Entry_Index entry_I;
+ CornerVC* self = (CornerVC*)variableCondition;
+ Dictionary_Entry_Value* vcDictVal;
+ Dictionary_Entry_Value _vcDictVal;
+ Dictionary_Entry_Value* varsVal;
+ CornerVC_Entry_Index entry_I;
/* Find dictionary entry */
- if (self->_dictionaryEntryName)
+ if (self->_dictionaryEntryName) {
vcDictVal = Dictionary_Get(dictionary, self->_dictionaryEntryName);
+ }
else
{
vcDictVal = &_vcDictVal;
Dictionary_Entry_Value_InitFromStruct(vcDictVal, dictionary);
}
-
+
if (vcDictVal)
{
char* cornerStr;
/* Obtain which corner */
cornerStr = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(vcDictVal, "corner" ));
- if (!strcasecmp(cornerStr, "bottomLeftFront"))
+
+ if (!strcasecmp(cornerStr, "bottomLeftFront")){
self->_corner = CornerVC_Corner_BottomLeftFront;
+ }
else if (!strcasecmp(cornerStr, "bottomRightFront"))
self->_corner = CornerVC_Corner_BottomRightFront;
else if (!strcasecmp(cornerStr, "topLeftFront"))
@@ -412,9 +415,9 @@
}
else
{
- self->_corner = CornerVC_Corner_Size;
+ self->_corner = CornerVC_Corner_Size;
self->_entryCount = 0;
- self->_entryTbl = NULL;
+ self->_entryTbl = NULL;
}
}
@@ -432,9 +435,9 @@
void _CornerVC_Print(void* cornerVC, Stream* stream)
{
- CornerVC* self = (CornerVC*)cornerVC;
- CornerVC_Entry_Index entry_I;
- Index i;
+ CornerVC* self = (CornerVC*)cornerVC;
+ CornerVC_Entry_Index entry_I;
+ Index i;
/* Set the Journal for printing informations */
Stream* info = stream;
@@ -517,10 +520,10 @@
void* _CornerVC_Copy( void* cornerVC, void* dest, Bool deep, Name nameExt, struct PtrMap* ptrMap ) {
- CornerVC* self = (CornerVC*)cornerVC;
- CornerVC* newCornerVC;
- PtrMap* map = ptrMap;
- Bool ownMap = False;
+ CornerVC* self = (CornerVC*)cornerVC;
+ CornerVC* newCornerVC;
+ PtrMap* map = ptrMap;
+ Bool ownMap = False;
if( !map ) {
map = PtrMap_New( 10 );
@@ -556,7 +559,7 @@
void _CornerVC_Build( void* cornerVC, void* data ) {
- CornerVC* self = (CornerVC*)cornerVC;
+ CornerVC* self = (CornerVC*)cornerVC;
_CornerVC_BuildSelf( self, data );
@@ -579,7 +582,7 @@
}
void _CornerVC_BuildSelf( void* cornerVC, void* data ) {
- CornerVC* self = (CornerVC*)cornerVC;
+ CornerVC* self = (CornerVC*)cornerVC;
if( self->_mesh ) {
Build( self->_mesh, data, False );
@@ -588,11 +591,12 @@
IndexSet* _CornerVC_GetSet(void* variableCondition)
{
- CornerVC* self = (CornerVC*)variableCondition;
- IndexSet *set = NULL;
- HexaMD* hexaMD = (HexaMD*)self->_mesh->layout->decomp;
- Stream* warningStr = Journal_Register( Error_Type, self->type );
+ CornerVC* self = (CornerVC*)variableCondition;
+ IndexSet *set = NULL;
+ HexaMD* hexaMD = (HexaMD*)self->_mesh->layout->decomp;
+ Stream* warningStr = Journal_Register( Error_Type, self->type );
+
switch (self->_corner) {
case CornerVC_Corner_BottomLeftFront:
if ( 1 == hexaMD->nodeGlobal3DCounts[K_AXIS] ) {
@@ -724,7 +728,7 @@
VariableCondition_VariableIndex _CornerVC_GetVariableCount(void* variableCondition, Index globalIndex)
{
- CornerVC* self = (CornerVC*)variableCondition;
+ CornerVC* self = (CornerVC*)variableCondition;
return self->_entryCount;
}
@@ -732,10 +736,10 @@
Variable_Index _CornerVC_GetVariableIndex(void* variableCondition, Index globalIndex, VariableCondition_VariableIndex varIndex)
{
- CornerVC* self = (CornerVC*)variableCondition;
- Variable_Index searchedIndex = 0;
- Stream* errorStr = Journal_Register( Error_Type, self->type );
- Name varName;
+ CornerVC* self = (CornerVC*)variableCondition;
+ Variable_Index searchedIndex = 0;
+ Stream* errorStr = Journal_Register( Error_Type, self->type );
+ Name varName;
varName = self->_entryTbl[varIndex].varName;
searchedIndex = Variable_Register_GetIndex(self->variable_Register, varName );
Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Utils/src/CornerVC.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Utils/src/CornerVC.h 2006-10-11 20:47:32 UTC (rev 4858)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Utils/src/CornerVC.h 2006-10-11 20:47:34 UTC (rev 4859)
@@ -72,63 +72,63 @@
*/
VariableCondition* CornerVC_Factory(
- Variable_Register* variable_Register,
- ConditionFunction_Register* conFunc_Register,
- Dictionary* dictionary,
- void* data );
+ Variable_Register* variable_Register,
+ ConditionFunction_Register* conFunc_Register,
+ Dictionary* dictionary,
+ void* data );
- CornerVC* CornerVC_DefaultNew( Name name );
+ CornerVC* CornerVC_DefaultNew( Name name );
- CornerVC* CornerVC_New(
- Name name,
- Name _dictionaryEntryName,
- Variable_Register* variable_Register,
- ConditionFunction_Register* conFunc_Register,
- Dictionary* dictionary,
- void* _mesh );
+ CornerVC* CornerVC_New(
+ Name name,
+ Name _dictionaryEntryName,
+ Variable_Register* variable_Register,
+ ConditionFunction_Register* conFunc_Register,
+ Dictionary* dictionary,
+ void* _mesh );
void CornerVC_Init(
- CornerVC* self,
- Name name,
- Name _dictionaryEntryName,
- Variable_Register* variable_Register,
- ConditionFunction_Register* conFunc_Register,
- Dictionary* dictionary,
- void* _mesh );
+ CornerVC* self,
+ Name name,
+ Name _dictionaryEntryName,
+ Variable_Register* variable_Register,
+ ConditionFunction_Register* conFunc_Register,
+ Dictionary* dictionary,
+ void* _mesh );
- CornerVC* _CornerVC_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,
- VariableCondition_BuildSelfFunc* _buildSelf,
- VariableCondition_PrintConciseFunc* _printConcise,
- VariableCondition_ReadDictionaryFunc* _readDictionary,
- VariableCondition_GetSetFunc* _getSet,
- VariableCondition_GetVariableCountFunc* _getVariableCount,
- VariableCondition_GetVariableIndexFunc* _getVariableIndex,
- VariableCondition_GetValueIndexFunc* _getValueIndex,
- VariableCondition_GetValueCountFunc* _getValueCount,
- VariableCondition_GetValueFunc* _getValue,
- Name _dictionaryEntryName,
- Variable_Register* variable_Register,
- ConditionFunction_Register* conFunc_Register,
- Dictionary* dictionary,
- void* _mesh );
+ CornerVC* _CornerVC_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,
+ VariableCondition_BuildSelfFunc* _buildSelf,
+ VariableCondition_PrintConciseFunc* _printConcise,
+ VariableCondition_ReadDictionaryFunc* _readDictionary,
+ VariableCondition_GetSetFunc* _getSet,
+ VariableCondition_GetVariableCountFunc* _getVariableCount,
+ VariableCondition_GetVariableIndexFunc* _getVariableIndex,
+ VariableCondition_GetValueIndexFunc* _getValueIndex,
+ VariableCondition_GetValueCountFunc* _getValueCount,
+ VariableCondition_GetValueFunc* _getValue,
+ Name _dictionaryEntryName,
+ Variable_Register* variable_Register,
+ ConditionFunction_Register* conFunc_Register,
+ Dictionary* dictionary,
+ void* _mesh );
void _CornerVC_Init(
- void* cornerVC,
- Name _dictionaryEntryName,
- void* _mesh );
+ void* cornerVC,
+ Name _dictionaryEntryName,
+ void* _mesh );
/*--------------------------------------------------------------------------------------------------------------------------
@@ -169,19 +169,19 @@
VariableCondition_VariableIndex _CornerVC_GetVariableCount( void* variableCondition, Index globalIndex );
- Variable_Index _CornerVC_GetVariableIndex(
- void* variableCondition,
- Index globalIndex,
- VariableCondition_VariableIndex varIndex );
+ Variable_Index _CornerVC_GetVariableIndex(
+ void* variableCondition,
+ Index globalIndex,
+ VariableCondition_VariableIndex varIndex );
VariableCondition_ValueIndex _CornerVC_GetValueIndex(
- void* variableCondition,
- Index globalIndex,
- VariableCondition_VariableIndex varIndex );
+ void* variableCondition,
+ Index globalIndex,
+ VariableCondition_VariableIndex varIndex );
VariableCondition_ValueIndex _CornerVC_GetValueCount( void* variableCondition );
- VariableCondition_Value _CornerVC_GetValue( void* variableCondition, VariableCondition_ValueIndex valIndex );
+ VariableCondition_Value _CornerVC_GetValue( void* variableCondition, VariableCondition_ValueIndex valIndex );
void _CornerVC_PrintConcise( void* variableCondition, Stream* stream );
Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Utils/src/CornerVC.meta
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Utils/src/CornerVC.meta 2006-10-11 20:47:32 UTC (rev 4858)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Utils/src/CornerVC.meta 2006-10-11 20:47:34 UTC (rev 4859)
@@ -10,7 +10,7 @@
<param name="Copyright">StGermain Framework. Copyright (C) 2003-2005 VPAC.</param>
<param name="License">The Gnu Lesser General Public License http://www.gnu.org/licenses/lgpl.html</param>
<param name="Parent">VariableCondition</param>
-<param name="Description">...</param>
+<param name="Description"> This function is designed so that a user can specify BC's at the corners of a region. See xml file: ../tests/data/CornerVC.xml </param>
<!--Now the interesting stuff-->
@@ -24,4 +24,3 @@
</list>
<!-- Add an exmaple XML if possible -->
<param name="Example">...</param>
-
More information about the cig-commits
mailing list