SPModel: libSPModel/src/Context.c File Reference
VPAC - Computational Software Development
Main | SPModel | StGermain FrameWork |
Main Page | Alphabetical List | Class List | Directories | File List | Class Members | File Members

Context.c File Reference

#include <mpi.h>
#include <StGermain/StGermain.h>
#include "types.h"
#include "Context.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <assert.h>
#include "SurfaceMesh.h"
#include "SurfaceRegularMesh.h"
#include "SurfaceMeshDecomp.h"
#include "SurfaceMeshIrregularDecomp.h"
#include "SurfaceMeshRegularDecomp.h"
#include "Catchment.h"
#include "_Interpolator.h"
#include "LinearInterpolator.h"
#include "SplineInterpolator.h"
#include "SurfaceMeshSmoother.h"
#include "ParameterTimeSeries.h"
#include "SurfaceMeshCyclicBC.h"
#include "SurfaceMeshRectangularCyclicBC.h"
#include "CommHandler.h"

Include dependency graph for Context.c:

Go to the source code of this file.

Functions

SPModel_ContextSPModel_Context_DefaultNew (Name name)
SPModel_ContextSPModel_Context_New (Name name, double startTime, double stopTime, MPI_Comm communicator, Dictionary *dictionary)
SPModel_Context_SPModel_Context_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, AbstractContext_SetDt *_setDt, double startTime, double stopTime, MPI_Comm communicator, Dictionary *dictionary)
void _SPModel_Context_Init (SPModel_Context *self)
void _SPModel_Context_Delete (void *context)
void _SPModel_Context_Print (void *context, Stream *stream)
void _SPModel_SimulationContextExtension_AllocateMemory (void *context, MemoryFlag mf)
void _SPModel_SimulationContextExtension_ReleaseMemory (void *context, MemoryFlag mf)
void _SPModel_Context_Build (void *context)
void _SPModel_Context_InitialConditions (void *context)
double _SPModel_Context_Dt (void *context)
void _SPModel_Context_SetDt (void *context, double dt)
void _SPModel_Context_BoundaryConditions (void *context)
void _SPModel_Context_Solve (void *context)
void _SPModel_Context_Sync (void *context)
void _SPModel_Context_Gather (SPModel_Context *self)
void _SPModel_Context_RedistributeNodes (SPModel_Context *context)
void _SPModel_Context_Dump (SPModel_Context *self)
void _SPModel_Context_ComponentConstruct (void *context, Stg_ComponentFactory *cf)
void _SPModel_Context_ComponentBuild (void *context, void *data)
void _SPModel_Context_ComponentInitialise (void *context, void *data)
void _SPModel_Context_ComponentExecute (void *context, void *data)
void _SPModel_Context_ComponentDestroy (void *context, void *data)

Variables

const Type SPModel_Context_Type = "SPModel_Context"
ExtensionInfo_Index SPModel_Simulation_ContextExtHandle


Function Documentation

void _SPModel_Context_BoundaryConditions void *  context  ) 
 

Definition at line 426 of file Context.c.

References SPModel_Context::localMesh, and SurfaceMesh_BoundaryConditions().

Referenced by _SPModel_Context_Init().

void _SPModel_Context_Build void *  context  ) 
 

Definition at line 356 of file Context.c.

References _SPModel_SimulationContextExtension_AllocateMemory(), GLOBAL_EXTENSION, and MASTER_PROC.

Referenced by _SPModel_Context_Init().

void _SPModel_Context_ComponentBuild void *  context,
void *  data
 

Definition at line 723 of file Context.c.

Referenced by SPModel_Context_DefaultNew(), and SPModel_Context_New().

void _SPModel_Context_ComponentConstruct void *  context,
Stg_ComponentFactory *  cf
 

Definition at line 719 of file Context.c.

Referenced by SPModel_Context_DefaultNew(), and SPModel_Context_New().

void _SPModel_Context_ComponentDestroy void *  context,
void *  data
 

Definition at line 735 of file Context.c.

Referenced by SPModel_Context_DefaultNew(), and SPModel_Context_New().

void _SPModel_Context_ComponentExecute void *  context,
void *  data
 

Definition at line 731 of file Context.c.

Referenced by SPModel_Context_DefaultNew(), and SPModel_Context_New().

void _SPModel_Context_ComponentInitialise void *  context,
void *  data
 

Definition at line 727 of file Context.c.

Referenced by SPModel_Context_DefaultNew(), and SPModel_Context_New().

void _SPModel_Context_Delete void *  context  ) 
 

Definition at line 238 of file Context.c.

Referenced by SPModel_Context_DefaultNew(), and SPModel_Context_New().

double _SPModel_Context_Dt void *  context  ) 
 

Definition at line 409 of file Context.c.

Referenced by _SPModel_Context_Init().

void _SPModel_Context_Dump SPModel_Context self  ) 
 

Definition at line 593 of file Context.c.

References _SPModel_Context_Gather(), BINARY, SurfaceMesh::boundaryConditions, SurfaceMesh::h, SurfaceMesh::id, MASTER_PROC, SurfaceMesh::numNodes, SurfaceMesh::receiver, TEXT, SurfaceMesh::x, and SurfaceMesh::y.

Referenced by _SPModel_Context_Init().

void _SPModel_Context_Gather SPModel_Context self  ) 
 

Definition at line 482 of file Context.c.

References globalMesh, SurfaceMesh::h, SurfaceMesh::id, localMesh, MASTER_PROC, SPModel_Context::meshDecomp, SurfaceMesh::myLoad, PACKAGE_TAG, _SurfaceMeshDecomp::processorLoad, and SurfaceMesh::receiver.

Referenced by _SPModel_Context_Dump(), _SPModel_Context_RedistributeNodes(), and SPModelFlowHierarchyViewer_UpdateView().

void _SPModel_Context_Init SPModel_Context self  ) 
 

Definition at line 119 of file Context.c.

References _SPModel_Context_BoundaryConditions(), _SPModel_Context_Build(), _SPModel_Context_Dt(), _SPModel_Context_Dump(), _SPModel_Context_InitialConditions(), _SPModel_Context_Solve(), _SPModel_Context_Sync(), BINARY, SPModel_Context::catchmentList, CatchmentList_New(), SPModel_Context::globalMesh, LinearInterpolator_New(), SPModel_Context::localMesh, ParameterTimeSeries_New(), SPModel_Context::regularMesh, SplineInterpolator_New(), SPModel_Context_Type, SPModel_Simulation_ContextExtHandle, SurfaceMesh_New(), SurfaceMeshIrregularDecomp_New(), SurfaceMeshRectangularCyclicBC_New(), SurfaceMeshSmoother_New(), SurfaceRegularMesh_New(), and TEXT.

Referenced by _SPModel_Context_New().

void _SPModel_Context_InitialConditions void *  context  ) 
 

Definition at line 402 of file Context.c.

Referenced by _SPModel_Context_Init().

SPModel_Context* _SPModel_Context_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,
AbstractContext_SetDt *  _setDt,
double  startTime,
double  stopTime,
MPI_Comm  communicator,
Dictionary *  dictionary
 

Definition at line 79 of file Context.c.

References _SPModel_Context_Init().

Referenced by SPModel_Context_DefaultNew(), and SPModel_Context_New().

void _SPModel_Context_Print void *  context,
Stream *  stream
 

Definition at line 265 of file Context.c.

Referenced by SPModel_Context_DefaultNew(), and SPModel_Context_New().

void _SPModel_Context_RedistributeNodes SPModel_Context context  ) 
 

Definition at line 538 of file Context.c.

References _SPModel_Context_Gather(), _SPModel_SimulationContextExtension_AllocateMemory(), _SPModel_SimulationContextExtension_ReleaseMemory(), SPModel_Context::catchmentList, CatchmentList_New(), SPModel_Context::globalMesh, SPModel_Context::interpolator, LinearInterpolator_New(), LOCAL_EXTENSION, SPModel_Context::localMesh, MASTER_PROC, SPModel_Context::meshDecomp, SPModel_Context::regularMesh, SPModelSimulationContextExtension_Gather(), SPModelSimulationContextExtension_Scatter(), SurfaceMesh_BuildRiverNetwork(), SurfaceMesh_ReleaseMemory(), and SurfaceMeshIrregularDecomp_New().

void _SPModel_Context_SetDt void *  context,
double  dt
 

Definition at line 417 of file Context.c.

Referenced by SPModel_Context_DefaultNew(), and SPModel_Context_New().

void _SPModel_Context_Solve void *  context  ) 
 

Definition at line 437 of file Context.c.

References ParameterTimeSeries_Interpolate, and SurfaceMesh_OrderNodes().

Referenced by _SPModel_Context_Init().

void _SPModel_Context_Sync void *  context  ) 
 

Definition at line 464 of file Context.c.

References SurfaceMesh_UpdateFlows(), and _SurfaceMeshDecomp::syncMesh.

Referenced by _SPModel_Context_Init().

void _SPModel_SimulationContextExtension_AllocateMemory void *  context,
MemoryFlag  mf
 

Definition at line 280 of file Context.c.

References SPModelSimulationContextExtension_t::erosion, GLOBAL_EXTENSION, SPModelSimulationContextExtension_t::globalErosion, SPModelSimulationContextExtension_t::globalSedimentHistory, SPModelSimulationContextExtension_t::globalUplift, SPModelSimulationContextExtension_t::globalWater, SPModelSimulationContextExtension_t::hiso, SPModelSimulationContextExtension_t::hisoPrev, SPModelSimulationContextExtension_t::hisotot, MASTER_PROC, SPModelSimulationContextExtension_t::sediment, SPModelSimulationContextExtension_t::sedimentHistory, simulationExt, SPModel_Simulation_ContextExtHandle, SPModelSimulationContextExtension_t::uplift, and SPModelSimulationContextExtension_t::water.

Referenced by _SPModel_Context_Build(), and _SPModel_Context_RedistributeNodes().

void _SPModel_SimulationContextExtension_ReleaseMemory void *  context,
MemoryFlag  mf
 

Definition at line 328 of file Context.c.

References SPModelSimulationContextExtension_t::erosion, GLOBAL_EXTENSION, SPModelSimulationContextExtension_t::globalErosion, SPModelSimulationContextExtension_t::globalSedimentHistory, SPModelSimulationContextExtension_t::globalUplift, SPModelSimulationContextExtension_t::globalWater, SPModelSimulationContextExtension_t::hiso, SPModelSimulationContextExtension_t::hisoPrev, SPModelSimulationContextExtension_t::hisotot, MASTER_PROC, SPModelSimulationContextExtension_t::sediment, SPModelSimulationContextExtension_t::sedimentHistory, simulationExt, SPModel_Simulation_ContextExtHandle, SPModelSimulationContextExtension_t::uplift, and SPModelSimulationContextExtension_t::water.

Referenced by _SPModel_Context_RedistributeNodes().

SPModel_Context* SPModel_Context_DefaultNew Name  name  ) 
 

Definition at line 55 of file Context.c.

References _SPModel_Context_ComponentBuild(), _SPModel_Context_ComponentConstruct(), _SPModel_Context_ComponentDestroy(), _SPModel_Context_ComponentExecute(), _SPModel_Context_ComponentInitialise(), _SPModel_Context_Delete(), _SPModel_Context_New(), _SPModel_Context_Print(), _SPModel_Context_SetDt(), SPModel_Context_DefaultNew(), and SPModel_Context_Type.

Referenced by SPModel_Context_DefaultNew(), and SPModel_Context_New().

SPModel_Context* SPModel_Context_New Name  name,
double  startTime,
double  stopTime,
MPI_Comm  communicator,
Dictionary *  dictionary
 

Definition at line 64 of file Context.c.

References _SPModel_Context_ComponentBuild(), _SPModel_Context_ComponentConstruct(), _SPModel_Context_ComponentDestroy(), _SPModel_Context_ComponentExecute(), _SPModel_Context_ComponentInitialise(), _SPModel_Context_Delete(), _SPModel_Context_New(), _SPModel_Context_Print(), _SPModel_Context_SetDt(), SPModel_Context_DefaultNew(), and SPModel_Context_Type.

Referenced by main().


Variable Documentation

const Type SPModel_Context_Type = "SPModel_Context"
 

Definition at line 51 of file Context.c.

Referenced by _SPModel_Context_Init(), SPModel_Context_DefaultNew(), and SPModel_Context_New().

ExtensionInfo_Index SPModel_Simulation_ContextExtHandle
 

Definition at line 53 of file Context.c.

Referenced by _SPModel_Context_Init(), _SPModel_SimulationContextExtension_AllocateMemory(), _SPModel_SimulationContextExtension_ReleaseMemory(), _SPModelDiffusionErosion_Init(), _SPModelFaultModel_Construct(), _SPModelFileOutput_Init(), _SPModelFluvialErosion_Init(), _SPModelIsostaticFlexure_Construct(), _SPModelOrography_Init(), interpolateFunction(), SPModelDiffusionErosion_Solve(), SPModelFaultModel_Solve(), SPModelFileOutput_Dump(), SPModelFluvialErosion_BoundaryConditions(), SPModelFluvialErosion_Solve(), SPModelIsostaticFlexure_Solve(), SPModelOrography_Solve(), SPModelSimulationContextExtension_Gather(), and SPModelSimulationContextExtension_Scatter().