Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

LSMDD_PhysicsStrategy.h

Go to the documentation of this file.
00001 /*
00002  * File:        LSMDD_PhysicsStrategy.h
00003  * Copyright:   (c) 2005-2007 Princeton University
00004  * Author(s):   Kevin T. Chu
00005  * Revision:    $Revision: 381 $
00006  * Modified:    $Date: 2007-08-07 10:36:19 -0400 (Tue, 07 Aug 2007) $
00007  * Description: Header file for the LSMDD_PhysicsStrategy class
00008  */
00009 
00010 #ifndef included_LSMDD_PhysicsStrategy_h
00011 #define included_LSMDD_PhysicsStrategy_h
00012 
00013 
00029 // System headers
00030 #include <float.h>
00031 #include <vector>
00032 
00033 // SAMRAI Headers
00034 #include "SAMRAI_config.h"
00035 #include "IntVector.h"
00036 #include "Patch.h"
00037 
00038 // Level Set Method Headers
00039 #include "LSMLIB_config.h"
00040 #include "LevelSetMethodToolbox.h"
00041 
00042 // LSMDD Headers
00043 #include "LSMDD_config.h"
00044 #include "BurgersVector.h"
00045 #include "LSMDD_Parameters.h"
00046 
00047 // headers for level set method geometry functions (required 
00048 // for finding dislocation line within in tetrahedra)
00049 extern "C" {
00050   #include "lsm_geometry3d.h"
00051 }
00052 
00053 // namespaces
00054 using namespace SAMRAI;
00055 using namespace hier;
00056 using namespace LSMLIB;
00057 
00058 
00059 /******************************************************************
00060  *
00061  * LSMDD_PhysicsStrategy Class Definition
00062  *
00063  ******************************************************************/
00064 
00065 namespace LSMDD {
00066 
00067 class LSMDD_PhysicsStrategy
00068 {
00069 public:
00070 
00072 
00079   LSMDD_PhysicsStrategy(){}
00080   virtual ~LSMDD_PhysicsStrategy(){}
00081  
00083 
00084 
00086 
00104   virtual int numberOfDislocationLines() const = 0;
00105 
00121   virtual const BurgersVector& getBurgersVector(
00122     const int dislocation_line_handle) const = 0;
00123 
00198   virtual void getBoundaryConditions(
00199     IntVector<3>& lower_bc,
00200     IntVector<3>& upper_bc,
00201     const int dislocation_line_handle,
00202     const LEVEL_SET_FCN_TYPE level_set_fcn) const
00203   {
00204     lower_bc = IntVector<3>(0);
00205     upper_bc = IntVector<3>(0);
00206   }
00207 
00209 
00210 
00212 
00238   virtual void initializeLevelSetFunctionsOnPatch(
00239     Patch<3>& patch, 
00240     const double time,
00241     const int phi_handle,
00242     const int psi_handle) = 0;
00243 
00274   virtual void setLevelSetFunctionBoundaryConditions(
00275     Patch<3>& patch, 
00276     const double time,
00277     const int phi_handle,
00278     const int psi_handle,
00279     const IntVector<3>& ghost_width_to_fill) {};
00280 
00282 
00283 
00285 
00338   virtual void computeForceOnDislocationLineOnPatch(
00339     Patch<3>& patch,
00340     const int force_handle,
00341     const int stress_field_handle,
00342     const vector<int>& tangent_vector_handles,
00343     const int phi_handle,
00344     const int psi_handle,
00345     const int line_handle,
00346     const double time,
00347     const LSMDD_Parameters& lsmdd_params) = 0;
00348 
00349 
00413   virtual void computeVelocityForDislocationLineOnPatch(
00414     Patch<3>& patch,
00415     const int velocity_handle,
00416     const int force_handle,
00417     const vector<int>& tangent_vector_handles,
00418     const int distance_handle,
00419     const int phi_handle,
00420     const int psi_handle,
00421     const int line_handle,
00422     const double time,
00423     const LSMDD_Parameters& lsmdd_params) = 0;
00424 
00426 
00427 
00429 
00453   virtual inline bool providesAuxiliaryStressField() const
00454   {
00455     return false;
00456   }
00457 
00458 
00485   virtual inline void computeAuxiliaryStressFieldOnPatch(
00486     Patch<3>& patch,
00487     const int auxiliary_stress_field_handle,
00488     const int dislocation_stress_field_handle,
00489     const double time, 
00490     const LSMDD_Parameters& lsmdd_params){};
00491 
00493 
00494 
00496 
00524   virtual inline double computeStableDtOnPatch(Patch<3>& patch) 
00525   {
00526     return DBL_MAX;
00527   } 
00528 
00530 
00531 
00533 
00566   virtual void preprocessAdvanceDislocations(
00567     PatchHierarchy<3>& hierarchy, 
00568     const int phi_handle,
00569     const int psi_handle,
00570     const LSMDD_Parameters& lsmdd_params,
00571     const double time) {}
00572 
00594   virtual void postprocessAdvanceDislocations(
00595     PatchHierarchy<3>& hierarchy, 
00596     const int phi_handle,
00597     const int psi_handle,
00598     const LSMDD_Parameters& lsmdd_params,
00599     const double time) {}
00600 
00602 
00603 };
00604 
00605 } // end LSMDD namespace
00606 
00607 #endif

Generated on Tue Aug 7 15:43:41 2007 for LSMDD by doxygen 1.3.4