vtf-logo

fsi/sfc-amroc/VibratingPanel/src/ShellEnforceBCFunctor.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00004 // 
00005 //                          Ralf Deiterding, Fehmi Cirak
00006 //                        California Institute of Technology
00007 //                           (C) 2005 All Rights Reserved
00008 //
00009 // <LicenseText>
00010 //
00011 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00012 //
00013 #ifndef SHELLENFORCEBCFUNCTOR_H
00014 #define SHELLENFORCEBCFUNCTOR_H
00015 
00016 #include "shells/driverCC/SVertexFunctors.h"
00017 #include "shells/driverCC/PrescribeVarFunctor.h"
00018 
00019 #include <functional>
00020 
00021 
00022 namespace shells {
00023     class ShellEnforceBCFunctor;
00024 }
00025 
00026 
00027 class shells::ShellEnforceBCFunctor :
00028     public std::unary_function<shells::SVertexS*, void> {
00029     
00030 public:
00031     ShellEnforceBCFunctor() {}
00032     
00033     ~ShellEnforceBCFunctor() {}
00034 
00035     void operator()(shells::SVertex *vtx) const {
00036         SVertexCoordinate extractC;
00037         SVertexCoordinate::DataType *coor = extractC(vtx);      
00038         const double ycoor = coor[1];
00039             
00040         if (ycoor<=0.015) {
00041             SVertexDisplacement extractD;
00042             SVertexDisplacement::DataType *dis = extractD(vtx);
00043             for (unsigned i=0; i<SVertexDisplacement::numVar; ++i)
00044                 dis[i] = 0.0;
00045 
00046             SVertexVelocity extractV;
00047             SVertexAcceleration extractA;
00048             SVertexVelocity::DataType *vel = extractV(vtx);
00049             SVertexAcceleration::DataType *acc = extractA(vtx);
00050             for (unsigned i=0; i<SVertexVelocity::numVar; ++i) {
00051                 vel[i] = 0.0;
00052                 acc[i] = 0.0;
00053             }
00054         }       
00055         return;
00056     }    
00057 };
00058 #endif

Generated on Fri Aug 24 13:02:34 2007 for Virtual Test Facility Coupled Applications by  doxygen 1.4.7