centre for mathematical biology's - university of oxford · • latex / beamer louise ... 1....

25
Centre for Mathematical Biology's CMB Group Meeting October 8th, 2012

Upload: others

Post on 22-Jan-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

Centre for Mathematical Biology's

CMB Group Meeting October 8th, 2012

Page 2: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

https://www.maths.ox.ac.uk/groups/mathematical-biology/internal/tips

Ornella

Page 3: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

Google Drive

• collaboration

• safe storage

• easy access 5 free GB storage

instant access to

• equations editor • forms, polls and surveys • translation • simultaneous work on docs • used Docs instead of email • version control • tracking • work offline • allow editing without signing in

Ornella

Page 4: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

Organisation

• Date and number your pages or use a notebook

• Write in meetings / write up meetings

• Use referencing software

• Bibtex

• Mendeley / Refworks / Citeulike / Referencer

• Keep track of the research skills things you've done

• Keep a record of ideas you have about future directions

• Backup your work! The university / maths institute has good back-up systems

• Write up work as you go

• Throw away work that is wrong

Louise

Page 5: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

Computing • Scratch drive / networked scratch drives (/mi/share/scratch)

• Subversioning (RabbitSVN is installed on the MI computers)

• Dropbox (check the terms of use!)

• Call your files sensible things

• In Matlab:

• Ask around if you're trying to do something - often people will know how!

• Use sensible names for your variables

• Comment your code

• Mex functions

• You can ssh into the MI computers (http://www.maths.ox.ac.uk/help/remote-access)

• See http://www.maths.ox.ac.uk/help for useful computing info

• LaTeX / Beamer

Louise

Page 6: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

• Conferences

• Study Groups

• Teaching / TAing

• Bionumbers

• SMB / ESMTB can give conference money if you join

• Socials

Extras

Louise

Page 7: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

More on computing • Learn how to code well

• Thoroughly document your code

• Be verbose in your coding

• Create and keep useful functions in a sensible place

• Try to keep your code such that you can rerun the analysis from scratch

• Don’t be scared to delete code that didn’t work, but don’t delete code that did

work but you haven’t used in a while

• Learn how to profile your code and (if using Matlab) consider using MEX files

for parts of code that are compute intensive

• Consider setting up a version control server

• Dropbox is great if you are just managing folders of word files and

presentations that only you work on

• For any type of shared project consider using a proper line-by-line one that

stores the entire history and allows conflict resolution (e.g. git or svn)

Alex

Page 8: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

Use a reference manager • There are lots to choose from:

• Jabref (multiplatform)

• Colwiz (multiplatform)

• Papers (mac)

• References (Linux)

• Cite-u-like (online)

• Zotero (online)

• Mendeley (online)

• Jabref

• Import meta-data straight from Google scholar

• Automatically link PDFs to the meta-data for quick access

• Search for PDFs from within Jabref

• Toggle journal abbreviations automatically

• Give key words to references (like tags)

• Search quickly through 1000s of references

Kit

Page 9: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

Jabref – adding a citation

• Search in Google Scholar

Kit

Page 10: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

Jabref – adding a citation

• Copy bibtex information…

Kit

Page 11: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

• Click on the green plus and select article (or the relevant bibtex type)

Jabref – adding a citation

Kit

Page 12: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

• Paste the bibliographic info into the empty box

Jabref – adding a citation

Kit

Page 13: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

• Go back to Google scholar

• Follow the links to the PDF and save it somewhere on your scratch directory

• Make sure to save it with the same name as the citation key for automatic

recognition

• Make sure to save it with the same name as the citation key for automatic recognition

Jabref – adding a citation

Kit

Page 14: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

• Back to Jabref

• Tell it where to look for pdfs (only do this once)

• Options →Preferences →External Programmes

Jabref – adding a citation

Kit

Page 15: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

• Go to the General Tab

• Click auto and it should link to your PDF

• Add some keywords

Jabref – adding a citation

Kit

Page 16: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

• Finally check the details are correct

• Including toggling the citation

Jabref – adding a citation

Kit

Page 17: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

Scientific Computing

• Want to learn or brush up?

• There is a course run by the Mathematical Institute for DPhil students: Scientific Computing for DPhil Students

• It is for people

1. new to Scientific Computing and/or Matlab

2. with rusty computing and/or Matlab skills

3. seeking new tricks (code vectorizing, neat built-in functions, etc.)

4. who have project-related computational questions

• Time:

1. MT: Numerical Linear Algebra

2. HT: Differential Equations

• Course info: http://people.maths.ox.ac.uk/~macdonald/scicomp/

Abdullah

Page 18: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

Modelling in Matlab: Numerical computation of PDEs

Programming and toolboxes

• Programming is based on linear algebra (vectors and matrices)

• Matlab has specialized toolboxes for solving PDE and ODEs, image processing, optimization, etc

• External computing toolboxes can be added

• e.g. Chebfun:

• Based on continuous analogues of linear algebra

• Currently solves 1D problems (e.g. ODEs and PDEs)

• Nice to have when dealing with repeated evaluations or equation solving (very accurate and fast)

• http://www.maths.ox.ac.uk/chebfun/

Abdullah

Page 19: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

User-defined solver

• When to do it?

• Modelling simple PDEs with simple and fixed geomtery

• Want to implement a Finite Difference method

• Want to implement a preferred Finite Element method

• You may want to use a mesh-generation software to triangulate your domain (e.g. Matlab’s PDE toolbox)

• In any case, you will end up with a matrix equation of the form Ax = b

• You may want to use an efficient & robust built-in function to speed up solving , e.g. x = A\b

• The MT SciComp course will cover matrix equations

Abdullah

Page 21: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

• PDE Toolbox is an FEM-based 2D solver

• Accepts scalar/systems and linear/non-linear PDEs

• Has a friendly data structure which, with some practice, makes pre-processing straight forward

• Post-processing is extremely simple

• GUI is very slow, memory demanding, and virtually impractical when dealing with a complex domain geometry

• Everything can be automated, imported to, and exported from the Matlab command-line which will save you the trouble of manually working with the GUI

• Email me or stop by DH56 if you need help

Built-in 2D solver

Abdullah

Page 22: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

Modelling in Comsol: Numerical solution of general PDEs

Comsol

• FEM-based solver for general PDEs & BCs with upto 3D capabilities

• Also numerically solves general ODEs and runs Matlab m-files

• Implementing MANY geometrical objects is not so nice (e.g., a domain tessellated by 90+ polygons with 200+ holes)

• Workaround: Using the geometry data structure adopted in Matlab’s PDE toolbox, you can easily transfer your geometry to Comsol via Comsol LiveLink for Matlab

• Email me or stop by DH 56 if you need help

Abdullah

Page 23: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

Guido

Page 24: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

Guido

Page 25: Centre for Mathematical Biology's - University of Oxford · • LaTeX / Beamer Louise ... 1. new to Scientific Computing and/or Matlab 2. with rusty computing and/or Matlab skills

Questions or Comments?