[cig-commits] r5291 - in long/3D/Gale/trunk/src/Underworld: .
plugins/Output plugins/Output/MaxVelocity
walter at geodynamics.org
walter at geodynamics.org
Wed Nov 15 13:08:03 PST 2006
Author: walter
Date: 2006-11-15 13:08:03 -0800 (Wed, 15 Nov 2006)
New Revision: 5291
Added:
long/3D/Gale/trunk/src/Underworld/plugins/Output/MaxVelocity/
long/3D/Gale/trunk/src/Underworld/plugins/Output/MaxVelocity/MaxVelocity.c
long/3D/Gale/trunk/src/Underworld/plugins/Output/MaxVelocity/makefile
Modified:
long/3D/Gale/trunk/src/Underworld/
Log:
r724 at earth: boo | 2006-11-15 13:06:47 -0800
r715 at earth (orig r372): JulianGiordani | 2006-11-08 21:50:08 -0800
Committing a simple diagnostic plugin which I'm using in the 2xTemp mesh idea.
I just prints out the MaxVelocity value in the simulation... pretty simple stuff.
Property changes on: long/3D/Gale/trunk/src/Underworld
___________________________________________________________________
Name: svk:merge
- 9570c393-cf10-0410-b476-9a651db1e55a:/cig:723
c24a034b-ab11-0410-afe6-cfe714e2959e:/trunk:371
+ 9570c393-cf10-0410-b476-9a651db1e55a:/cig:724
c24a034b-ab11-0410-afe6-cfe714e2959e:/trunk:372
Added: long/3D/Gale/trunk/src/Underworld/plugins/Output/MaxVelocity/MaxVelocity.c
===================================================================
--- long/3D/Gale/trunk/src/Underworld/plugins/Output/MaxVelocity/MaxVelocity.c 2006-11-15 21:08:00 UTC (rev 5290)
+++ long/3D/Gale/trunk/src/Underworld/plugins/Output/MaxVelocity/MaxVelocity.c 2006-11-15 21:08:03 UTC (rev 5291)
@@ -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 <StgFEM/StgFEM.h>
+#include <PICellerator/PICellerator.h>
+#include <Underworld/Underworld.h>
+#include <StgFEM/FrequentOutput/FrequentOutput.h>
+
+const Type Underworld_MaxVelocity_Type = "Underworld_MaxVelocity";
+void Underworld_MaxVelocity_PrintHeaderToFile( void* context );
+void Underworld_MaxVelocity_Output( void* _context );
+
+void _Underworld_MaxVelocity_Construct( void* component, Stg_ComponentFactory* cf, void* data ) {
+ UnderworldContext* context;
+
+ context = Stg_ComponentFactory_ConstructByName( cf, "context", UnderworldContext, True, data );
+
+ Underworld_MaxVelocity_PrintHeaderToFile( context );
+ ContextEP_Append( context, AbstractContext_EP_FrequentOutput, Underworld_MaxVelocity_Output );
+}
+
+void* _Underworld_MaxVelocity_DefaultNew( Name name ) {
+ return Codelet_New(
+ Underworld_MaxVelocity_Type,
+ _Underworld_MaxVelocity_DefaultNew,
+ _Underworld_MaxVelocity_Construct,
+ _Codelet_Build,
+ _Codelet_Initialise,
+ _Codelet_Execute,
+ _Codelet_Destroy,
+ name );
+}
+
+Index Underworld_MaxVelocity_Register( PluginsManager* pluginsManager ) {
+ return PluginsManager_Submit( pluginsManager, Underworld_MaxVelocity_Type, "0", _Underworld_MaxVelocity_DefaultNew );
+}
+
+void Underworld_MaxVelocity_Output( void* _context ) {
+ UnderworldContext* context = (UnderworldContext*) _context;
+ FeVariable* velocityFe = context->velocityField;
+ double maxVel;
+
+ maxVel = _FeVariable_GetMaxGlobalFieldMagnitude( velocityFe );
+ StgFEM_FrequentOutput_PrintValue( context, maxVel );
+}
+
+void Underworld_MaxVelocity_PrintHeaderToFile( void* context ) {
+ StgFEM_FrequentOutput_PrintString( context, "MaxVelocity" );
+}
+
Added: long/3D/Gale/trunk/src/Underworld/plugins/Output/MaxVelocity/makefile
===================================================================
--- long/3D/Gale/trunk/src/Underworld/plugins/Output/MaxVelocity/makefile 2006-11-15 21:08:00 UTC (rev 5290)
+++ long/3D/Gale/trunk/src/Underworld/plugins/Output/MaxVelocity/makefile 2006-11-15 21:08:03 UTC (rev 5291)
@@ -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