Add ElasticSource class for the elastic solver - #129
Conversation
Cyclomatic Complexity CheckL 97 (C 22-41): The McCabe cyclomatic complexity of 'initialiseSensorData' is 19. L 67 (C 41-64): The McCabe cyclomatic complexity of 'get.sourceFieldMagnitude' is 1. L 170 (C 24-41): The McCabe cyclomatic complexity of 'FourierCollocation' is 1. L 158 (C 24-32): The McCabe cyclomatic complexity of 'GridInput' is 2. L 119 (C 24-29): The McCabe cyclomatic complexity of 'Logger' is 1. L 87 (C 24-29): The McCabe cyclomatic complexity of 'Solver' is 5. L 119 (C 24-36): The McCabe cyclomatic complexity of 'ThermalSolver' is 3. L 82 (C 24-39): The McCabe cyclomatic complexity of 'TimeDomainSolver' is 1. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #129 +/- ##
========================================
Coverage 99.22% 99.22%
========================================
Files 47 47
Lines 1027 1027
========================================
Hits 1019 1019
Misses 8 8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
* #49: Work in progress to save .m files to .md * #49: Removes folder helpfilesweb from tracking * #49: Clean-up function mToMarkdown * #49: Change mToMarkdown input from namespace name to filename with full file path * First attempt at mkdocs. Requires the literate-nav plugin. * Generate md the same way as html. mToMarkdown is not used anymore. * Fix bug if duplicated unit test docs files. Some refactoring. * Fix documentation files titles. * Generate sections for markdown toc by creating subfolders and SUMMARY.md files. * Evaluate and show the code when converting to md as well (same as html). * Move static documentation out of .m files and into md * Clean up tutorials * #147: Fix all broken links and matlab markup syntax errors in all .m docs. * Apply suggestions from code review Co-authored-by: Devaraj Gopinathan <36169767+Devaraj-G@users.noreply.github.com> * #147: Address code review comments: Rename generateHTML function, since now it does more than generating html. Move link fixing to its own function, to de-clutter generateDocFiles function a bit. * Add the Template Class documentation to the html toc. * #156: remove helpfiles subdir - to be re-generated on the fly, not commited to the repo. * #156: add some static md files in docs, and clean up the folder. * #156: add placeholder for helpfilesweb folder and softlink for README * #156: Update instructions on generating documentation. * #156: Fix LaTeX rendering * #156: Tidy up folders for generated documentation. * #156: Move instructions for building the docs into the developer docs only. * #156: Try to make the GA runner pick up the latest release of matlab... * #156: Try to make the GA runner pick up the latest release of matlab - attempt 2... * #156: Try to make the GA runner pick up the latest release of matlab - attempt 3... * #156: Try to make the GA runner pick up the latest release of matlab - attempt 4... * #156: Try to make the GA runner pick up the latest release of matlab - attempt 5... * #156: Try to make the GA runner pick up the latest release of matlab - attempt 6... * #156: Try to make the GA runner pick up the latest release of matlab - attempt 7... * #156: Save docs files as artifacts in runner * #156: Save docs files as artifacts in runner - attempt 2 * #156: Save docs files as artifacts in runner - attempt 3 * #156: Save docs files as artifacts in runner - attempt 4 * #156: Save docs files as artifacts in runner - attempt 5 * #156: Save docs files as artifacts in runner - attempt 6 * #156: Save docs files as artifacts in runner - attempt 7 * #156: Save docs files as artifacts in runner - attempt 8 * #156: Save docs files as artifacts in runner - attempt 9 * #156: Save docs files as artifacts in runner - attempt 10 * #156: Save docs files as artifacts in runner - attempt 11 * #156: put all python package requirements into requirements.txt * #156: write test to count docs files and run in GA * #156: try number of doc files test with powershell * #156: retry number of doc files test with python * #156: remove number of doc files test with python from workflow, but have script ready for future use. * #156: Address review comments and re-attempt python test. - Fix security warning in js package - Get order of folders in mkdocs the same as in generated matlab help page - Fix broken licence link - Re-attempt soft link to README.md file from index.md, instead of the other way round. * #156: retry python test - attempt 2. * #156: retry python test - attempt 3. * #156: use bash test instead. * #156: Re-shuffle utilities folder, separate docs of interest to the user and the developer. * #156: correct script location in GA. * #164: Separate user from contributor docs, in files and mkdocs side bar. * #164: update workflow in contributor docs, add maintainer docs placeholder. * #164: add maintainer docs. * #164: Clarify some bits in the docs after discussions. * #13: add help files for helptoc section headings. * #13: fix links in the section headings. * #13: update documentation about link fixing. * Apply suggestions from code review Co-authored-by: Ben Cox <b.cox@ucl.ac.uk> * #164: Address more review comments. * #172 Removed EM medium and source from develop branch * #132 Acoustic sensor class and tests added from MKingEndBranch * #132 Updated t02_AcousticSolverExamples.m * #132 Updated TestAcousticSensor.m * #132 Many small changes found while improving code check coverage * #132 Tidied up header text in sensor and related classes and tidied up simple tutorials * #132 Bug fix to pass tests * Stop CI from running on draft PRs (#186) * Do not run CI workflows for draft pull requests * run code_quality workflow on draft PRs * Update workflow triggers to exclude draft PRs * Also run on push (to main) * gate non-draft PR trigger through workflow_call * Revert "gate non-draft PR trigger through workflow_call" This reverts commit a313e3c. * Clarify that jobs are skipped on draft PRs * Add vscode settings folder to gitignore (#185) ignore VSCode settings * add pre-commit hooks * Add codespell, remove markdownlint-fix and forbid-tabs * Add environment setup and pre-commit instructions * Add pre-commit workflow configuration * Use ubuntu-latest in pre-commit workflow * 179: update docs that we use squash commits. (#187) * Create top level docs table of contents (#189) #37: Create top level docs toc. * Fix spelling mistakes (#194) * fix spelling mistakes * Apply suggestions from code review Some symbols are rendering strange, fix them. --------- Co-authored-by: Ilektra Christidi <ilektra.christidi@ucl.ac.uk> * add ilekra's suggestion https://github.com/ucl-bug/k-wave-ii/pull/195/changes#r2840666954 * add pre-commit to requirments.txt https://github.com/ucl-bug/k-wave-ii/pull/195/changes#r2840644366 * Add ilektra's suggestion https://github.com/ucl-bug/k-wave-ii/pull/195/changes#r2840634706 * exclude markdown from trailing whitespace checks #195 (comment) * Sp/release (#207) * Add issue templates copied from k-wave-i * fix folder hiearchy for PR template * Test old PR template hierarchy * Add pull request template for better contributions Added a pull request template to guide contributors in providing necessary information. * Delete .github/PULL_REQUEST_TEMPLATE directory * Update to v4 and add deploy to gh pages * test gh pages deployment Replace GitHub Actions deployment step with mkdocs command. * test deploy gh pages Updated deployment steps for GitHub Pages in workflow. * Update deployment steps for GitHub Pages * test deploy docs Updated the GitHub Actions workflow for documentation generation and deployment. Added permissions, changed the runner to 'windows-latest', and modified steps for building and deploying MkDocs site. * Update branch reference from main to develop in workflow configuration * test workfow trigger * use orginal docs workflow * trigger on push to develop * Update workflow to build and deploy to gh pages * use ubuntu runner * use mathworks actions * Add semantic release configuration and workflow * Update release workflow to include npm caching and consistent versioning * Add node modules to gitignore * add package(-lock) jsons * Revert "Sp/release (#207)" This reverts commit f64df90. * Deploy the documentation to GitHub Pages (#202) * Update to v4 and add deploy to gh pages * Add GitHub Pages ("site") directory to .gitignore * Deploy when push to sp/49-deploy_gh_pages branch * add build mkdocs step to docs workflow Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * add python setup (comment out build docs to speed up testing) Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * change to windows-latest Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * upload to site instead of docs Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * Added venv to gitignore Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> * Trying to deploy Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> * Write permissions given? Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> * Upload to github pages Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> * Naming error Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> * Damn you windows! Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> * Added Matlab helpfile documentation Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> * Testing Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> * Order! Order! Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> * Connect the two jobs Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> * Version upgrade due to deprecation Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> * Trying Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> * Trying 2 Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> * Trying 3 Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> * Done! Removing unnecessary if statements Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> * More descriptive runner name Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> * Workflow to run only when of develop branch Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> * Deployment skipped on PR's Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> --------- Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> Co-authored-by: Arindam Saha <arindamsaha1507@gmail.com> Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> * Added guidelines on use of AI Policy (#203) * Add issue templates and fix PR template hierarchy (#192) * Add issue templates copied from k-wave-i * fix folder hiearchy for PR template * Update .github/ISSUE_TEMPLATE/bug-form.yml Co-authored-by: Ilektra Christidi <ilektra.christidi@ucl.ac.uk> * remove custom issues and enable blank issues * Add ilektra's suggestion for PR checklist (to better match contribution guidelines) --------- Co-authored-by: Ilektra Christidi <ilektra.christidi@ucl.ac.uk> * Add contributor agreement (#201) * Fixes issue 178 also added the link in the PR template, did not change anything else there since it is an issue assigned to Stella * Moved legal to the end after merge removed it * #178: fix merge conflict mess * #178: remove superfluous PR template file --------- Co-authored-by: blaze <blaze@ITX.broadband> Co-authored-by: Ilektra Christidi <ilektra.christidi@ucl.ac.uk> * Added a code of conduct (#198) * Added basic code of conduct * Added the page to nav bar * Better list rendering due to correct tabbing * Made it concise * Add contact information in codeOfConduct.md --------- Co-authored-by: Ilektra Christidi <ilektra.christidi@ucl.ac.uk> * remove space to fix broken badge link Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * test branch protection (remove redundent blank line from README) Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * test branch protection (remove redundent blank line from README) Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * test branch protection (#213) test branch protection (remove redundent blank line from README) Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * add contributors workflow (#210) * add contributors workflow Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * Add Ben as project owder Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * docs: update contributors * Add badge and lis tags to README Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * docs: update contributors * remove bots and add co authors Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * remove contributors Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * remove readme tags Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * fix indentation Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * use scan Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * change back to working workflow Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * docs: update contributors * Add contributors section header Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * docs: update contributors * exclude bots as contributors Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * docs: update contributors * set custom type fields to null (instead of empty string) Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * docs: update contributors * adjust custom type * docs: update contributors * remove contributorsfooter * docs: update contributors * set link to usage to false and add footer Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * docs: update contributors * add reference to all contributors Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * docs: update contributors * include co authors as contributors Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * include co authors as contributors Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * docs: update contributors * exclude bots as contributors Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * remove bot Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * docs: update contributors * properly install all-contributors and add contributors Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * docs: update contributors * replace old tags in readme * docs: update contributors * add contributors Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * fix all contributors src file Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * docs: update contributors * clarify where the all contributors information is sourced from (GDPR) * docs: update contributors * change wording slightly * add forum contact details in case people want to request to be removed * docs: update contributors * skip commit and push if no changes in .all-contributorsrc detected * remove redundent blank lines in readme (and test whether bot commits) * add Ben's email as contact point instead of forum. * add workflow for protecting npm package jsons Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * change workflow triggers for protecting npm package jsons Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * break package-lock.json Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * fix package-lock.json using `npm install --package-lock-only` sugestion Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * try to break package.json Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * add _comment to package json file Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * change version of all contributors cli in package json Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * pick better descriptive workflow name and revert previous commit Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * Added proper link Co-authored-by: Ilektra Christidi <ilektra.christidi@ucl.ac.uk> --------- Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Arindam Saha <arindamsaha1507@gmail.com> Co-authored-by: Ilektra Christidi <ilektra.christidi@ucl.ac.uk> * Remove `package.json` and `package-lock.json` files and workflow (#215) * take into account non-PR triggers * remove lockflow workflow * remove `package.json` and `package-lock.json` Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * remove npm installation from contributors workflow Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * add npm dependency (but not using npm ci) * remove Arindam from .all-contributorssrc file * update contributors --------- Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * add ilektra's suggestion about running pre-commit on all files * add contributors (#218) * docs: update README.md * docs: update .all-contributorsrc * change code to custom for jarosjir * try to add Eleanor * add ellymartin and ellwise as contributors --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: Stella <30465823+stellaprins@users.noreply.github.com> * Move README.md to docs folder (#226) * Move README.md to docs folder * Refer to docs/README.md in .all-contributorsrc and contributors workflow * Add "development lead" section to README (#222) * Update README.md to include development lead group (BUG) * Add Ben's suggested changes Co-authored-by: Ben Cox <b.cox@ucl.ac.uk> --------- Co-authored-by: Ben Cox <b.cox@ucl.ac.uk> Co-authored-by: Ilektra Christidi <ilektra.christidi@ucl.ac.uk> * Improve contributors grid (#228) * adjust .all-contributorsrc - change order profiles (Bradley first) - slightly smaller thumbnails (100->80 pixels) - 6 instead of 7 profiles per row * update contributors * change order grid * fix: correct JSON syntax in .all-contributorsrc * update contributors * add back Devaraj (accidentily deleted him!) --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Add contributor counter badge (#221) * Update README.md to include new contributors badge * Remove the badge that is not working * Replace deprecated `<tt>` tags (#234) * replace tt tages by code tags in published html files Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * Replace deprecated <tt> tags with <code> tags in generated HTML files --------- Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * Add `CITATION.cff` (#232) * add cff file * remove hyphens from keyword labels (and use spaces instead) Treeby, B. E., Jaros, J., Rendell, A. P., & Cox, B. T. (2012). Modeling nonlinear ultrasound propagation in heterogeneous media with power law absorption using a k-space pseudospectral method. The Journal of the Acoustical Society of America, 131(6), 4324–4336. https://doi.org/10.1121/1.4712021 * #188 Fixed how tutorial docs display (#204) * #188 Fixed how tutorial docs display * #188: fix t01_AcousticSolverExamples1D to display correctly. * #188 Updated two tutorial files so they format correctly when converted to html. * #188: Fix some aesthetic things and add documentation about markup peculiarities. --------- Co-authored-by: Stella Prins <30465823+stellaprins@users.noreply.github.com> Co-authored-by: Ilektra Christidi <ilektra.christidi@ucl.ac.uk> * #142 medium class updates (#205) * #142 New Materials class for materials to be passed to the Medium class * #142 Updated Materials class definition and added unit tests * #142 Rewritten Medium class to work with Materials class object. Also Medium class unit test. * #142 Tutorial example and various debugged files that it flagged up. Deleted unused files. * #142 Bug fixes to ensure unit tests all pass * #142 Rewrote TestMedium and TestMaterials to improve unit test coverage. * #142 updated header to Materials.m so docs compile * #142 updated header to Materials.m again so docs compile * #142 Minor updates to improve test coverage of Medium and Materials classes. * #142 Updated Materials and TestMaterials to improve unit test coverage, and tighten class definition * #142 Updated Medium and TestMedium to improve coverage. Small changes to tutorial example. * #142 updates following comments, and some other largely cosmetic tidying up of the code. * fix docs error (#233) * remove (potentially) problematic | markers and replace with backticks * use disp(table) so it displays properly in the documentation * update tutorial documentation Co-authored-by: Stella Prins <30465823+stellaprins@users.noreply.github.com> Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> * Explain where to run the GenerateDocumentation script from. (#240) 193: Explain where to run the GenerateDocumentation script from. * added script and linter option for checking/adding license block (#212) * added script and linter option for checking/adding license block * #14: Move yaml configuration to workflow folder, to run as GA. Fix bug in script. * #14: Fixed some comments * #14: adjust triggers to run new action. Fix trigger for tests action. * style: automatically apply LGPL license headers to .m files * Revert "style: automatically apply LGPL license headers to .m files" This reverts commit b9398ba. * 14: Remove legacy files from copyright check. Debugging stuff still in the script. * 14: Fix search for existing wrong Copyright header. Add some verbose print statements * style: automatically apply LGPL license headers to .m files * style: automatically apply LGPL license headers to .m files * 14: Remove files brought back with the merge by mistake. --------- Co-authored-by: blaze <blaze@ITX.broadband> Co-authored-by: Ilektra Christidi <ilektra.christidi@ucl.ac.uk> Co-authored-by: ilectra <22891967+ilectra@users.noreply.github.com> Co-authored-by: Stella Prins <30465823+stellaprins@users.noreply.github.com> * Update pre-commit configuration to exclude legacy files * exclude site directory and don't use prettier on docs or markdown files * add pre-commit changes to all files (lots of white space trimmings!) * style: automatically apply LGPL license headers to .m files * update contributors --------- Co-authored-by: Bradley Treeby <b.treeby@ucl.ac.uk> Co-authored-by: Devaraj Gopinathan <d.gopinathan@ucl.ac.uk> Co-authored-by: Ilektra Christidi <ilektra.christidi@ucl.ac.uk> Co-authored-by: Devaraj Gopinathan <36169767+Devaraj-G@users.noreply.github.com> Co-authored-by: Ben Cox <b.cox@ucl.ac.uk> Co-authored-by: MatthewJohnKing <137497118+MatthewJohnKing@users.noreply.github.com> Co-authored-by: Arindam Saha <arindamsaha1507@users.noreply.github.com> Co-authored-by: Arindam Saha <arindamsaha1507@gmail.com> Co-authored-by: Stella Prins <stellaprins@users.noreply.github.com> Co-authored-by: nicolin <n.govender@ucl.ac.uk> Co-authored-by: blaze <blaze@ITX.broadband> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> Co-authored-by: ilectra <22891967+ilectra@users.noreply.github.com>
|
I have closed this PR. The branch will remain, and should perhaps be first pulled into an 'elastic model' feature branch.As it's not a complete feature yet I won't move it into develop yet. |
See issues #120 for the solver requirements and progress, and #126 for this PR.
Straight forward class adding only the initial pressure. It will be expanded to include more source terms in the future.