Ejemplo n.º 1
0
        /// <summary>
        /// CTOR
        /// </summary>
        /// <param name="PenaltyBase">penalty multiplier based on polynomials</param>
        /// <param name="IsotropicViscosity">Value of the global isotropic viscosity</param>
        /// <param name="LSTrck"><see cref="LevelSetTracker"/></param>
        public EllipticExtVelFormDirected(double PenaltyBase, double IsotropicViscosity, Foundation.XDG.ILevelSetComponent InterfaceFlux, LevelSetTracker LSTrck) : base(PenaltyBase, IsotropicViscosity, LSTrck)
        {
            _ParameterOrdering = ArrayTools.Cat(VariableNames.LevelSetGradient(D), VariableNames.LevelSet, VariableNames.MeanLevelSetGradient(D), InterfaceFlux.ParameterOrdering);
            this.InterfaceFlux = InterfaceFlux;

            // this is really ugly:
            // In the boundary-edge flux we evaluate the flux at the interface for inflow boundaries.
            // A clean solution would be to implement separate fluxes,
            //for each boundary condition or even an own IEquationcomponent just for the boundary.
            // However, this seems to work for now.
            if (InterfaceFlux.ParameterOrdering.First() == "InterfaceValue")
            {
                BoundaryFunc = inp => inp.Parameters_IN[2 * D + 1];
            }
            else if (InterfaceFlux.ParameterOrdering.First() == VariableNames.VelocityX)
            {
                // I am not sure, if this is correct...
                BoundaryFunc = ScalarVelocity;
            }
            else
            {
                throw new NotImplementedException("Up to now: only SingleComponent and Scalar Velocity is supported");
            }
        }