Examples of BoundaryCondition


Examples of bs.bs2d.fea.BoundaryCondition

       
        bcListModel = new DefaultListModel<>();
        lstBC.setModel(bcListModel);
       
        if(MainGUI.DEBUG_LOADCASE){
            BoundaryCondition bc;
            bc = new BoundaryCondition("fixed",
                    BoundaryCondition.Type.FIXED, 0, 0);
            bcListModel.add(0, bc);
            bc = new BoundaryCondition("load",
                    BoundaryCondition.Type.POINT_LOAD, 0, -1);
            bcListModel.add(0, bc);
        }
    }
View Full Code Here

Examples of bs.bs2d.fea.BoundaryCondition

    private void btnNewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNewActionPerformed
        int i = bcListModel.getSize();
        bcCreate.reset(i);
        showDialog(bcCreate);
       
        BoundaryCondition bc = bcCreate.bc;
        if(bc == null)
            return;
       
        bcListModel.add(i, bc);
        lstBC.setSelectedIndex(i);
View Full Code Here

Examples of bs.bs2d.fea.BoundaryCondition

       
        btnAddNodesActionPerformed(evt);
    }//GEN-LAST:event_btnNewActionPerformed

    private void btnEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditActionPerformed
        BoundaryCondition bc = bcListModel.get(lstBC.getSelectedIndex());
        if(bc.type == BoundaryCondition.Type.FIXED){
            fdEdit.reset(bc);
            showDialog(fdEdit);
            if(fdEdit.ok){
                bc.x = fdEdit.x;
View Full Code Here

Examples of bs.bs2d.fea.BoundaryCondition

    }//GEN-LAST:event_lstBCValueChanged

    private void btnAddNodesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddNodesActionPerformed
        if(plotter != null){
            int i = lstBC.getSelectedIndex();
            BoundaryCondition bc = bcListModel.get(i);
            bc.addNodes(plotter.getSelection());
            txtNodes.setText("" + bc.getNodeCount());
        }
    }//GEN-LAST:event_btnAddNodesActionPerformed
View Full Code Here

Examples of bs.bs2d.fea.BoundaryCondition

    }//GEN-LAST:event_btnAddNodesActionPerformed

    private void btnRemoveNodesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRemoveNodesActionPerformed
        if(plotter != null){
            int i = lstBC.getSelectedIndex();
            BoundaryCondition bc = bcListModel.get(i);
            bc.removeNodes(plotter.getSelection());
            txtNodes.setText("" + bc.getNodeCount());
        }
    }//GEN-LAST:event_btnRemoveNodesActionPerformed
View Full Code Here

Examples of bs.bs2d.fea.BoundaryCondition

    }//GEN-LAST:event_btnRemoveNodesActionPerformed

    private void btnSelectNodesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSelectNodesActionPerformed
        if(plotter != null){
            int i = lstBC.getSelectedIndex();
            BoundaryCondition bc = bcListModel.get(i);
            plotter.setSelection(bc.getNodes());
        }
    }//GEN-LAST:event_btnSelectNodesActionPerformed
View Full Code Here

Examples of bs.bs2d.fea.BoundaryCondition

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnOKActionPerformed
        if(cmbType.getSelectedIndex() == 0)
            bc = new BoundaryCondition(txtName.getText(),
                    BoundaryCondition.Type.FIXED);
        else
            bc = new BoundaryCondition(txtName.getText(),
                    BoundaryCondition.Type.POINT_LOAD);
       
        setVisible(false);
    }//GEN-LAST:event_btnOKActionPerformed
View Full Code Here

Examples of com.opengamma.analytics.financial.model.finitedifference.BoundaryCondition

    final boolean isCall = option.isCall();
    final double expiry = option.getTimeToExpiry();
    final double forward = localVolatility.getForwardCurve().getForward(expiry);
    final double strike = option.getStrike();
    final double maxForward = forward * _maxMoneyness;
    final BoundaryCondition lower = getLowerBoundaryCondition(option, strike);
    final BoundaryCondition upper = getUpperBoundaryCondition(option, _maxMoneyness * forward);
    final PDEGrid1D grid = getGrid(getTimeMesh(expiry), getSpaceMesh(maxForward, forward));
    final ConvectionDiffusionPDE1DCoefficients pde = getPDEProvider().getBackwardsLocalVol(expiry, localVolatility);
    final Function1D<Double, Double> payoff = getInitialConditionProvider().getEuropeanPayoff(strike, isCall);
    final PDE1DDataBundle<ConvectionDiffusionPDE1DCoefficients> db = new PDE1DDataBundle<>(pde, payoff, lower, upper, grid);
    return (PDETerminalResults1D) getSolver().solve(db);
View Full Code Here

Examples of com.opengamma.analytics.financial.model.finitedifference.BoundaryCondition

    final boolean isCall = option.isCall();
    final double expiry = option.getTimeToExpiry();
    final double forward = forwardCurve.getForward(expiry);
    final double strike = option.getStrike();
    final double maxForward = forward * _maxMoneyness;
    final BoundaryCondition lower = getLowerBoundaryCondition(option, strike);
    final BoundaryCondition upper = getUpperBoundaryCondition(option, expiry);
    final PDEGrid1D grid = getGrid(getTimeMesh(expiry), getSpaceMesh(maxForward, forward));
    final ConvectionDiffusionPDE1DCoefficients pde = getPDEProvider().getBackwardsLocalVol(forwardCurve, expiry, localVolatility);
    final Function1D<Double, Double> payoff = getInitialConditionProvider().getEuropeanPayoff(strike, isCall);
    final PDE1DDataBundle<ConvectionDiffusionPDE1DCoefficients> db = new PDE1DDataBundle<>(pde, payoff, lower, upper, grid);
    return (PDETerminalResults1D) getSolver().solve(db);
View Full Code Here

Examples of com.opengamma.analytics.financial.model.finitedifference.BoundaryCondition

    final double minMoneyness = Math.exp(-maxAbsProxyDelta * Math.sqrt(maxT));
    final double maxMoneyness = 1.0 / minMoneyness;
    ArgumentChecker.isTrue(minMoneyness < centreMoneyness, "min moneyness of {} greater than centreMoneyness of {}. Increase maxAbsProxydelta", minMoneyness, centreMoneyness);
    ArgumentChecker.isTrue(maxMoneyness > centreMoneyness, "max moneyness of {} less than centreMoneyness of {}. Increase maxAbsProxydelta", maxMoneyness, centreMoneyness);

    BoundaryCondition lower;
    BoundaryCondition upper;
    if (isCall) {
      //call option with low strike  is worth the forward - strike, while a put is worthless
      lower = new DirichletBoundaryCondition((1.0 - minMoneyness), minMoneyness);
      upper = new DirichletBoundaryCondition(0.0, maxMoneyness);
    } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.