Coder Social home page Coder Social logo

bet's Introduction

Computational Hydraulics Group at The Oden Institute for Computational Engineering and Sciences Official Website

This website is developed from the template Alembic. Thank you!

Live at https://ut-chg.github.io.

development guide

Update Website Content: commit to the main branch.

Basic writing and formatting syntax

How to add news?

  1. Create a new markdown file under /_post folder, name it in the date-title.md format (e.g. 2023-01-01-firstpost.md)
  2. In the markdown file, include the follow content.
---
title: your title
categories:
- Workshop(or any other categories)
feature_image: "https://flodismod.github.io/assets/cover_photo.png" (the image on the top of the page)
---

On the News & Outreach page, there is a list of posts. Here you put the preview text, which will be shown below the title of this post.
<!-- more -->

Maintext
<br>

{% include button.html text="Back" link="/news/" %} (this is the button to take you back to news & outreach page)

How to add new group member?

  1. Go to /_includes, find profile_card.html.
  2. Add the following block after the last card:
<div class="card">
    <div class="box2"><img src="/assets/team_profile/new_member.png" alt="Avatar" style="width:100%"></div>
    <div>
        <h4><b>FirstName  LastName</b></h4> 
        <p></p>
        <p class="d">role, Institute</p>
        </div>

    <div class="bottomWrapper">      
        <p ><a href="../ourteam/profile_NewMember">view bio</a></p>
    </div>
</div>
    

To avoid error, make sure you don't put ".md" in the href of <p ><a href="../ourteam/profile_NewMember">view bio</a></p>.

  1. Go to /ourteam, create a new markdown file profile_NewMember.md, and put the following information down:
---
feature_text: |
  ## Team

feature_image: "/assets/cover_photo.png"
---
{% include profile-short.html name="" extra="" position="" position2=""  bio="" link="/assets/team_profile/"%}

[name of the web link](the actual link)

{% include button.html text="Back" link="/groups/" %}

How to add new research topic?

  1. Go to /_includes, find display_research.html.
  2. Add the following block after the last card following the example:
<div class="card">
  <a href="/project/adaptive_mesh"><img src="/assets/project/melioidosis.png" alt="Avatar" style="width:100%"></a>
    <div class="bottomWrapper">
      <a href="/project/adaptive_mesh"><h6><b>Improving the Efficiency of Wave and Surge Models via Adaptive Mesh Resolution</b></h6></a> 
    </div>
</div>
  1. Go to /project, create a new markdown file adaptive_mesh.md. In the markdown file, put the following information down:
---
title: Title of your project
feature_text: |
  Research

feature_image: "/assets/cover_photo/pier.png" (save the project cover photo in the same directory and quote it here)
feature_credit: Photo by someone (leave it blank if no photographers)

---
<br />

maintext



{% include button.html text="Back" link="/research_page/" %}

How to edit the navigation bar?

  1. Go to _config.yml and edit section under # 9. Site navigation.

bet's People

Contributors

dmcdougall avatar eecsu avatar lcgraham avatar mathematicalmichael avatar mpilosov avatar scottw13 avatar smattis avatar user-zwj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bet's Issues

Port features from PolySim (adaptive_sampling)

Port stable features from polysim.run_framework.adaptive_sampling into bet.sampling.adaptiveSampling. Eventually, the adaptive sampling module in PolySim should be completely removed and examples/data in hershel_bin/nonsubdomain/adaptive and the corresponding scripts in lonestar_landuse_bin should reflect this change.

Links in example .rst files

Change the links in the example .rst files to point to the github repo for the example rather than download the file.

Testing: adaptiveSampling

Need to make sure *.mat files from parallel and serial runs are getting properly removed in the tearDown method

Testing: plotP

Tests for bet.postProcess.plotP fail when run in parallel.

marginal plots

Plotting 2d and then 1d (or reversing the order) marginals will combine the plots in the last saved files.

Forward Problem

Add forward problem capabilities and remove the references to a specific \D or \Lambda space and just say metric space.

Dimensions flipped in adaptiveSampling

In line 348 the data arrays are concatenated along the 0-axis, but it should be done along the 1-axis. This may mess up the fromMap example, so I didn't want to change it yet.

Write loadBalance, lbPADCIRC, etc.

Write model running rig that takes care of load balancing within a single TACC(or other HPC) job allocation. We should use mpi4py and maybe look into Pylauncher by TACC. This should take care of running both serial and parallel jobs in parallel. It might make sense to use GNU parallel (but it probably doesn't make sense). Pushkar is interested in this so we should include him.

emulate_iid_lebesgue re-defines num_l_emulate incorrectly

In line 35 of calculateP in the emulate_iid_lebesgue method:

num_l_emulate = int(num_l_emulate/size)+1

Apparently size comes from bet.Comm and is the number of processors used in the computation, so when this operation is called with only a single processor it creates 1 more emulated sample than called for by num_l_emulate parameter.

I came across this while creating the verification example to re-create a uniform distribution on \Lambda and worked around it by passing num_l_emulate-1 into this method. I think the fix is to compute

remainder = num_l_emulate % size

and then for the first "remainder" number of processors add 1 to num_l_emulate. I am not quite sure how to code this though.

Possible bad parallelism in adaptiveSampling

There is some troubling parallelism in adaptiveSampling.sampler.generalized_chains regarding all_step_ratios. Especially the lines :
MYall_step_ratios = np.copy(all_step_ratios)
all_step_ratios = np.empty((self.num_chains, self.chain_length), dtype=np.float64)
comm.Allgather([MYall_step_ratios, MPI.DOUBLE], [all_step_ratios, MPI.DOUBLE])

In this process, all_step_ratios is being broadcast into a different shape. We need to be careful about the ordering here, I think. The order of entries in all_step_ratios is different after this than doing numpy.reshape. Tests were failing without mpi4py because of this.

I put a temporary fix in the tests_and_parallel branch. I would like @lcgraham to look over this and make sure that there are no errors, and that my fix for the case of no mpi4py is valid. It does make all of the test pass. If you do make changes, please do it in the tests_and_parallel branch, to avoid conflicts when that is merged with master, which should be done very soon.

Add sensitivity package

Finish creating sensitivity package. Create master-sensitivity branch from dev-sensitivity. Remove developmental code from master-sensitivity. Merge master-sensitivity into master. Update documentation. Release as version 0.3 or version 1.0 if all examples are finished.

Verify Calculate P

The solutions, P, from prob,prob_samples_mc, prob_samples_qhull need to be compared to the solutions from the corresponding MATLAB codes Q_singleV, Q_singleVmc, and Q_singleVex (make sure the bin_sizes are equivalent). The bin_size in the MATLAB code is 1/bin_size in the Python code.

Backward compatibility broken in postTools

Be careful with old code using postTools. Recent additions by @lcgraham break backward compatibility. I didn't realize this when I merged it in because the tests were rewritten for the new syntax. I am going to make this more user friendly, but I guess I'll follow the new form.

Tangled Dimensions

Currently the dimensions for samples in the parameter space (\Lambda) and samples in the data space (D) are:

param, lambda -- (ndim, num_samples)
data -- (num_samples, mdim)

We desire the dimensions of samples from both spaces to match (num_samples, dim). Possible modules this needs to be fixed in are:

adaptiveSampling
basicSampling
simpleFunP
calculateP
plot_D_2D

Invaild Divide

BET/bet/calculateP/calculateP.py:262: RuntimeWarning: invalid value encountered in divide
P[Itemp] = rho_D_M[i]*lam_vol[Itemp]/np.sum(lam_vol[Itemp])

Add indicatorFunctions to master

Add indicatorFunctions.py to master from dev branch. Create a class/set of methods that returns the indicator functions and their simple function approximations together since most of these methods take the same arguments. We can create a similar set up in sampling on the dev branch for the gradient based adaptive samplers.

Bring dev up to date with master

Merge master into dev without clobbering developmental portions of dev that differ from master. This is to keep dev in line with the current state of master since there were bugs/issues that were resolved with the addition of the sensitivity package to master.

top_percentile=1.0 returns all samples, postTools.sample_highest_prob

In postTools.sample_highest_prob, if you set top_percentile=1.0, it returns the correct volume of the region in Lambda, but it return num_samples= all samples. It looks like this is because in line 63 postTools

num_samples = np.sum(P_sum <= top_percentile)

So Psum is always <= 1.0, and it returns all samples. Maybe <= top_percentile - epsilon, or an

if top_percentile==1.0
num_samples = numbers of nonzeros in P_samples

Big issues with changes parallelism

Allreduce calculations for integers are all wrong. They are begin treated as numpy arrays of integers which is not giving an error but is doing something completely wrong. Should be switched to allreduce. Many parts of simpleFunP and calculateP are affected.

Tests_and_parallel

@smattis is the tests_and_parallel branch ready for merging? If so want me to go ahead and merge it to master?

PlotDomains

Update plotDomains so that the dimensions of Q_ref (and similar variables) are automatically fixed if necessary. Automatically create a figs folder if it doesn't already exist and if a custom file name is not specified.

docstrings and comments lacking in plotDomains

The docstrings are not very descriptive in plotDomains, and there are almost no comments. Variable names are not descriptive enough for not having commments. Also, default input arguments should be added to many of the functions.

Verify Calculate P

Add a test to verify that prob_emulated(samples, data, rho_D_M, d_distr_samples) = prob(samples, data, rho_D_M, d_distr_samples)

heurstics

Properly reclass the heuristics in adaptiveSampling so that they all inherit from the heuristic class.

Copyright update

Change copyright at the tops of files to "The BET Development Team" instead of "Lindley Graham and Steven Mattis".

Robustize center_pts_per_edge

Check methods that use center_pts_per_edge. Update these methods so that the argument can be either an int or a list(). If the method receives a list check it to make sure the length matches the dimension of data. If the method receives a int, expand it into an appropriately sized array.

Clean up calculateP

eliminate unnecessary returns and collecting of lambda_emulate for prob at least.
make sure to not return inputs as outputs.

Renaming

Change all references to "true" or "truth" to "reference" i.e. "q_true" changes to "q_ref" and "heuristic" to "kernel."

Update install instructions

Add nose as a dependency. Make sure the install documentation via Sphinx is up to date. Add note on how to run tests after installation.

create empty templates to run bet

these templates should be for parallel and serial versions. make sure PolyADCIRC examples and other examples conform to these templates

Testing: loadmat

loadmat tests are failing in parallel with bet.sampling.adaptiveSampling and bet.sampling.basicSampling

clean up vis package

make sure names for plotP and plotDomains match up with respect to function calls, same syntax

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.