Liebe Gitlab-Nutzerin, lieber Gitlab-Nutzer,
es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Die Konten der externen Nutzer:innen sind über den Reiter "Standard" erreichbar.
Die Administratoren


Dear Gitlab user,
it is now possible to log in to our service using the ZIH login/LDAP. The accounts of external users can be accessed via the "Standard" tab.
The administrators

BoundaryElementTopDist.h 2.91 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
// ==  http://www.amdis-fem.org                                              ==
// ==                                                                        ==
// ============================================================================
//
// Software License for AMDiS
//
// Copyright (c) 2010 Dresden University of Technology 
// All rights reserved.
// Authors: Simon Vey, Thomas Witkowski et al.
//
// This file is part of AMDiS
//
// See also license.opensource.txt in the distribution.




22 23 24 25 26 27 28 29 30 31 32 33 34
#ifndef BOUNDARYELEMENTTOPDIST_H
#define BOUNDARYELEMENTTOPDIST_H

#include "ElInfo.h"
#include "FixVec.h"
#include "ElementLevelSet.h"
#include "BoundaryElementDist.h"
#include "VelocityExt.h"

using namespace AMDiS;

class BoundaryElementTopDist : public BoundaryElementDist
{
35
public:
36 37 38 39
  BoundaryElementTopDist(ElementLevelSet *elLS_, 
			 int dim_,
			 VelocityExt *velExt_ = NULL)
    : BoundaryElementDist(elLS_, dim_),
40 41
      velExt(velExt_)
  {}
42 43

  ~BoundaryElementTopDist()
44
  {}
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94

  /**
   * Calculates distance from the interface for all vertices of a boundary 
   * element.
   * Distance is here the topological distance.
   *
   * Return value: Status of element elInfo.
   */
  int calcDistOnBoundaryElement(ElInfo *elInfo,
				FixVec<double, VERTEX> &dVec);

 protected:
  /**
   * Calculates distance of vertex v to intersection edge through
   * sP1 and sP2 within element.
   * lambda implicitly gives the next point on the intersection edge.
   */
  double calcDistOnIntersecEdge(const WorldVector<double> &sP1,        
				const WorldVector<double> &sP2,        
				const WorldVector<double> &v,          
				double &lambda);

  //calculates the distance between two points
  double calc_dist_between_two_points(
       const WorldVector<double> &point1,                   
       const WorldVector<double> &point2);                   
  
  void cases_for_lambda(const WorldVector<double> &SP,           
			const WorldVector<double> &SP_projected, 
			const WorldVector<double> &point1,       
			const WorldVector<double> &point2,       
			double &lambda,                     
			double &dist);                           
  
  //calculates the projection of the point "v" onto a straight line 
  //given by two points "sP1" nad "sP2"
  void projected_on_a_straight_line(const WorldVector<double> &sP1,    
				    const WorldVector<double> &sP2,    
				    const WorldVector<double> &v,      
				    WorldVector<double> &v_p,          
				    double &lambda_out );              

 protected:
  /**
   * Object needed to extrapolate velocity from the interface.
   */  
  VelocityExt *velExt;
 };

#endif  // BOUNDARYELEMENTTOPDIST_H