00001
00002
00003
00004
00005
00006 #ifndef ADLIB_SOLIDPROBLEM_H
00007 #define ADLIB_SOLIDPROBLEM_H
00008
00009 #define OWN_ELC_COUPLED_ADLIBSOLVER
00010 #include "external_coupling/AdlibStdELCCoupledProblem.h"
00011
00012 class SolidSolverSpecific : public AdlibELCCoupledSolver<DIM> {
00013 typedef AdlibELCCoupledSolver<DIM> base;
00014 public:
00015 SolidSolverSpecific(MPI_Comm solidComm, int numFluidNodes, int firstFluidNode) :
00016 base(solidComm, numFluidNodes, firstFluidNode) {}
00017
00018 virtual void Update(const double& dt) {
00019
00020
00021
00022
00023 for (register int n=0; n<adlib::nodes; n++) {
00024 int offset=3*n;
00025 double &x = adlib::coordinates[offset];
00026 double &y = adlib::coordinates[offset+1];
00027 double &z = adlib::coordinates[offset+2];
00028 double radius = std::sqrt(x*x+y*y);
00029 if (radius>=0.017) {
00030 for (register int m=0; m<2; m++) {
00031 adlib::boundary[offset+m] = 1;
00032 adlib::velocities[offset+m] = 0;
00033 adlib::displacements[offset+m] = 0;
00034 }
00035 }
00036 if (z>=0.095) {
00037 adlib::boundary[offset+2] = 1;
00038 adlib::velocities[offset+2] = 0;
00039 adlib::displacements[offset+2] = 0;
00040 }
00041 if (z<=0.015) {
00042 for (register int m=0; m<3; m++) {
00043 adlib::boundary[offset+m] = 1;
00044 adlib::velocities[offset+m] = 0;
00045 adlib::displacements[offset+m] = 0;
00046 }
00047 }
00048 }
00049 base::Update(dt);
00050 }
00051 };
00052
00053
00054 #endif
00055