CIVE50003 Computational Methods II - Lecture VII - 200223 V2
CIVE50003 Computational Methods II - Lecture VII - 200223 V2
Lecture 7
After a short learning curve you will find that the code becomes
more manageable, shorter, less repetitive, and thus easier to
debug and far more elegant
π in double precision π in single precision The Matlab workspace tells you what you are
(16 significant figures) (8 significant figures) storing, its class, value, name and size (bytes)
Methods are where you define functions that are associated with
each instance of the Class, operating on the object itself
CIVE50003 Computational Methods II – Lecture 7 10
Class BOX
We start our Class BOX as follows
You should list all fields that the Class BOX will ever have
here, but you don’t necessarily have to give any a value
Now any instance of this Class BOX will have these fields
So now:
An Assembler method
This is what constructs your system matrices (more than one)
Well structured code that shows you have thought through the logic
Well commented code that explains the policy but not the mechanism
Used as:
Script interface with the powerful ABAQUS FE software
Data analysis and data science (e.g. Panda)
Machine learning (e.g. PyTorch)
CIVE50003 Computational Methods II – Lecture 7 21