[cig-commits] r4941 - in long/3D/Gale/trunk/src/Underworld: .
plugins/Output plugins/Output/MaxTemperature
walter at geodynamics.org
walter at geodynamics.org
Wed Oct 11 13:54:32 PDT 2006
Author: walter
Date: 2006-10-11 13:54:32 -0700 (Wed, 11 Oct 2006)
New Revision: 4941
Added:
long/3D/Gale/trunk/src/Underworld/plugins/Output/MaxTemperature/
long/3D/Gale/trunk/src/Underworld/plugins/Output/MaxTemperature/MaxTemperature.c
long/3D/Gale/trunk/src/Underworld/plugins/Output/MaxTemperature/makefile
Modified:
long/3D/Gale/trunk/src/Underworld/
Log:
r601 at earth: boo | 2006-10-11 13:52:11 -0700
r563 at earth (orig r340): JulianGiordani | 2006-09-28 21:15:29 -0700
A little output plugin for Catherine. This will just record the maxTemperature of the simulation at each time step and print the result to the frequent output file.
Property changes on: long/3D/Gale/trunk/src/Underworld
___________________________________________________________________
Name: svk:merge
- 9570c393-cf10-0410-b476-9a651db1e55a:/cig:600
c24a034b-ab11-0410-afe6-cfe714e2959e:/trunk:339
+ 9570c393-cf10-0410-b476-9a651db1e55a:/cig:601
c24a034b-ab11-0410-afe6-cfe714e2959e:/trunk:340
Added: long/3D/Gale/trunk/src/Underworld/plugins/Output/MaxTemperature/MaxTemperature.c
===================================================================
--- long/3D/Gale/trunk/src/Underworld/plugins/Output/MaxTemperature/MaxTemperature.c 2006-10-11 20:54:29 UTC (rev 4940)
+++ long/3D/Gale/trunk/src/Underworld/plugins/Output/MaxTemperature/MaxTemperature.c 2006-10-11 20:54:32 UTC (rev 4941)
@@ -0,0 +1,92 @@
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+** Copyright (c) 2005, Monash Cluster Computing
+** All rights reserved.
+** Redistribution and use in source and binary forms, with or without modification,
+** are permitted provided that the following conditions are met:
+**
+** * Redistributions of source code must retain the above copyright notice,
+** this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in the
+** documentation and/or other materials provided with the distribution.
+** * Neither the name of the Monash University nor the names of its contributors
+** may be used to endorse or promote products derived from this software
+** without specific prior written permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+** THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+** BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+**
+**
+** Contact:
+*% Louis Moresi - Louis.Moresi at sci.monash.edu.au
+*%
+** Contributors:
+*+ Robert Turnbull
+*+ Vincent Lemiale
+*+ Louis Moresi
+*+ David May
+*+ David Stegman
+*+ Mirko Velic
+*+ Patrick Sunter
+*+ Julian Giordani
+*+
+** $Id: Vrms.c 182 2006-05-01 12:32:01Z RobertTurnbull $
+**
+**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+#include <mpi.h>
+#include <StGermain/StGermain.h>
+#include <StG_FEM/StG_FEM.h>
+#include <PICellerator/PICellerator.h>
+#include <Underworld/Underworld.h>
+#include <StG_FEM/FrequentOutput/FrequentOutput.h>
+
+const Type Underworld_MaxTemperature_Type = "Underworld_MaxTemperature";
+void Underworld_MaxTemperature_PrintHeaderToFile( void* context );
+void Underworld_MaxTemperature_Output( void* _context );
+
+void _Underworld_MaxTemperature_Construct( void* component, Stg_ComponentFactory* cf ) {
+ UnderworldContext* context;
+
+ context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True );
+
+ Underworld_MaxTemperature_PrintHeaderToFile( context );
+ ContextEP_Append( context, AbstractContext_EP_FrequentOutput, Underworld_MaxTemperature_Output );
+}
+
+void* _Underworld_MaxTemperature_DefaultNew( Name name ) {
+ return Codelet_New(
+ Underworld_MaxTemperature_Type,
+ _Underworld_MaxTemperature_DefaultNew,
+ _Underworld_MaxTemperature_Construct,
+ _Codelet_Build,
+ _Codelet_Initialise,
+ _Codelet_Execute,
+ _Codelet_Destroy,
+ name );
+}
+
+Index Underworld_MaxTemperature_Register( PluginsManager* pluginsManager ) {
+ return PluginsManager_Submit( pluginsManager, Underworld_MaxTemperature_Type, "0", _Underworld_MaxTemperature_DefaultNew );
+}
+
+void Underworld_MaxTemperature_Output( void* _context ) {
+ UnderworldContext* context = (UnderworldContext*) _context;
+ FeVariable* temperatureFe = context->temperatureField;
+ double maxTemp;
+
+ maxTemp = _FeVariable_GetMaxGlobalFieldMagnitude( temperatureFe );
+ StG_FEM_FrequentOutput_PrintValue( context, maxTemp );
+}
+
+void Underworld_MaxTemperature_PrintHeaderToFile( void* context ) {
+ StG_FEM_FrequentOutput_PrintString( context, "MaxTemp" );
+}
+
Added: long/3D/Gale/trunk/src/Underworld/plugins/Output/MaxTemperature/makefile
===================================================================
--- long/3D/Gale/trunk/src/Underworld/plugins/Output/MaxTemperature/makefile 2006-10-11 20:54:29 UTC (rev 4940)
+++ long/3D/Gale/trunk/src/Underworld/plugins/Output/MaxTemperature/makefile 2006-10-11 20:54:32 UTC (rev 4941)
@@ -0,0 +1,24 @@
+
+#Finds the Absolute path to the Project Root directory
+SHELL := /bin/bash
+PROJ_ROOT := $(shell until test -r ./Makefile.system ; do cd .. ; done ; echo `pwd`)
+include ${PROJ_ROOT}/Makefile.system
+
+# Subdirectories
+subdirs := $(shell find * -type d -prune ! -name .svn )
+
+# Source Code and Header files
+SRCS := $(wildcard *.c)
+HDRS := $(wildcard *.h)
+
+# What to call the plugin
+modName := $(shell basename `pwd`)
+mod = ${PROJECT}_${modName}
+
+# Where to put header files
+includes = ${PROJECT}/${modName}
+
+# External Libraries and Headers
+packages = PICELLERATOR STG_FEM STGERMAIN PETSC MPI XML PYTHON
+
+include ${PROJ_ROOT}/Makefile.vmake
More information about the cig-commits
mailing list