00001 // -*- C++ -*- 00002 00003 // Copyright (C) 2003-2007 California Institute of Technology 00004 // Ralf Deiterding, ralf@cacr.caltech.edu 00005 00006 #ifndef SOLID_PROBLEM_H 00007 #define SOLID_PROBLEM_H 00008 00009 #include "BeamELCCoupledSolver.h" 00010 00011 class SolidSolverSpecific : public BeamELCCoupledSolver<DIM> { 00012 typedef BeamELCCoupledSolver<DIM> base; 00013 public: 00014 SolidSolverSpecific() : base() {} 00015 virtual ~SolidSolverSpecific() {} 00016 00017 virtual void Initialize(double& t, double& dt) { 00018 base::Initialize(t,dt); 00019 OutputMaxDefl(); 00020 } 00021 00022 virtual void Advance(double& t, double& dt) { 00023 base::Advance(t,dt); 00024 OutputMaxDefl(); 00025 } 00026 00027 void OutputMaxDefl() { 00028 double xmax=0.,wmax=0.; 00029 base::MaxDeflection(xmax,wmax); 00030 std::ofstream outfile("wmax.txt", std::ios::out | std::ios::app); 00031 outfile << base::CurrentTime() << " " << -wmax << " " << xmax 00032 << " " << -Deflection(NumNodes()-1) << std::endl; 00033 outfile.close(); 00034 } 00035 }; 00036 00037 00038 #endif 00039