Honzi/Personal Bests/Plants vs Zombies
| Achievements
| 17/21 (80.9523810%)
|
| Adventure
| 1-5 x5
|
| Bug Spray
| 20
|
| Chocolate
| 10
|
| Fertilizer
| 20
|
| I, Zombie Endless
| 3
|
| Mini-Games
| 20/20
|
| Most Coins
| 96,230
|
| Puzzles
| 18/18
|
| Survival
| 6/10 (60%)
|
| Tree of Wisdom
| 237 Feet Tall
|
| Vasebreaker Endless
| 2
|
| Cabbage-Pult
| 2
|
| Cactus
| 1
|
| Cherry Bomb
| 1
|
| Doom-Shroom
| 1
|
| Fume-Shroom
| 1
|
| Grave Buster
| 1
|
| Hypno-Shroom
| 1
|
| Ice-Shroom
| 1
|
| Jalapeno
| 2
|
| Kernel-Pult
| 1
|
| Magnet-Shroom
| 1
|
| Marigold
| 12
|
| Melon-Pult
| 1
|
| Puff-Shroom
| 1
|
| Repeater
| 2
|
| Scardey-Shroom
| 1
|
| Umbrella Leaf
| 1
|
| Sea-Shroom
| 1
|
| Snow Pea
| 2
|
| Spikeweed
| 1
|
| Squash
| 1
|
| Sunflower
| 1
|
| Sun-Shroom
| 2
|
| Tall-Nut
| 2
|
| Tangle Kelp
| 1
|
| Threepeater
| 2
|
| Wall-Nut
| 1
|
| Achievements
| 42/47 (89.3617021%)
|
| i, Zombie Endless
| 9
|
| Last Stand Endless
| 11 flags
|
| Peking Express
| 6.76 seconds
|
| Most Coins
| 485,090
|
| Vase Breaker Endless
| 4
|
| Achievements
| 17/40 (42.5%)
|
| Most Coins
| 62,770
|
| Plants
| 25
|


BLADE A film review by Matt Williams
RATING: * * 1/2* out of * * * *
Blade is the latest entry in Hollywood's continuing obsession with vampires. Based upon a comic book, Blade feels more like Batman than Dracula. Packed to the gills (or should that be fangs) with crowd-pleasing fight scenes and mindless action, Blade is a pleasant enough popcorn movie that may not break any new ground, but has a fun time right where it is.
Wesley Snipes is Blade, a half-human, half-vampire superhero. He inherited his unique bloodline when his pregnant mother was attacked by an unknown vampire. Due to his heritage, Blade possesses a vampire's strength and reflexes, yet a human's tolerance for sunlight.
As an adult, Blade spends his nights waging war against vampires, who have secretly infiltrated all aspects of our society. Helped by his aging mentor, Whistler (Kris Kristofferson), Blade single-handedly destroys hundreds of the bloodsuckers every night.
But the vampires have larger plans in mind. Particularly one young upstart, Deacon Frost (Stephen Dorff), who sets about trying to fulfill an ancient vampire prophecy. Can Blade stop his nefarious plans in time? Need you even ask?
A movie like Blade doesn't concern itself too much with reality, nor should it. If it did, it would have to ponder such questions as what vampires would eat after converting the last human (as is proposed at one point in the film). No, rather the film is pure escapism, and works well on that level.
Blade has mastered the art of the one-strike kill, to the point that a few of the fight scenes are overly repetitive. At times, it seems like the bad guys line up in a single file queue, and Blade sequentially kills them one at a time. Shouldn't vampires be a bit tougher to kill? But, on the whole, the fights are enjoyable diversions.
Too bad the same can't be said of Snipes' acting. He delivers each and every line with the same clenched-jaw monotone. He's proven that he can successfully tackle a tough part, but here he is simply slumming.
The special effects in Blade are a mixed bag. A few of the effects are done very well, such as the disintegration of dead vampires. However, others are positively cartoonish, and don't blend well with the tone of the rest of the film.
For the most part, Blade delivers on its promises. It's got vampires, violence, guns, swordfights, stunts and special effects galore. If those sound appealing, Blade fits the bill.
Copyright 1998 Matt Williams
- Matt Williams<EMAIL_ADDRESS>Reviewer for Cinematter: http://www.cinematter.com Home of over 600 reviews, and information on nearly 700 upcoming releases
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Welcome to my page
Form for adding a new user
Name
Website url
Manual ID, does not have to be included (can not be 0)
Submit
Clear form


{% extends "cradmin_legacy/layouts/standalone/focused.django.html" %} {% block pageheader-inner %}
The sourcecode for the demos is in cradmin_legacy/demo/
{% endblock pageheader-inner %} {% block content %}A fairly full featured demo.
A demo for cradmin_legacy.viewhelpers.listfilter.
cradmin_legacy/demo/listfilterdemo/
A demo for cradmin_legacy.viewhelpers.multiselect2.
cradmin_legacy/demo/multiselect2demo/
Shows how to create a cradmin instance that does not require login.
cradmin_legacy/demo/login_not_required_demo/
Shows how to create a cradmin instance without a role (for regular websites).
cradmin_legacy/demo/no_role_demo/
A starting point for an account management dashboard.
{% endblock content %} {% block innerwrapper_post %} {% endblock innerwrapper_post %}


pymatgen.io.vasp.outputs module¶
-
class
BSVasprun
(filename, parse_projected_eigen=False, parse_potcar_file=False, occu_tol=1e-08)[source]¶ Bases:
pymatgen.io.vasp.outputs.Vasprun
A highly optimized version of Vasprun that parses only eigenvalues for bandstructures. All other properties like structures, parameters, etc. are ignored.
-
class
Chgcar
(poscar, data, data_aug=None)[source]¶ Bases:
pymatgen.io.vasp.outputs.VolumetricData
Simple object for reading a CHGCAR file.
Parameters: - poscar (Poscar) – Poscar object containing structure.
- data – Actual data.
-
net_magnetization
¶
-
class
Dynmat
(filename)[source]¶ Bases:
object
Object for reading a DYNMAT file.
Parameters: filename – Name of file containing DYNMAT. -
data
¶ A nested dict containing the DYNMAT data of the form:: [atom <int>][disp <int>][‘dispvec’] =
displacement vector (part of first line in dynmat block, e.g. “0.01 0 0”)- [atom <int>][disp <int>][‘dynmat’] =
- <list> list of dynmat lines for this atom and this displacement
Authors: Patrick Huck
-
masses
¶ returns the list of atomic masses
-
natoms
¶ returns the number of atoms
-
ndisps
¶ returns the number of displacements
-
nspecs
¶ returns the number of species
-
-
class
Locpot
(poscar, data)[source]¶ Bases:
pymatgen.io.vasp.outputs.VolumetricData
Simple object for reading a LOCPOT file.
Parameters: - poscar (Poscar) – Poscar object containing structure.
- data – Actual data.
-
class
Oszicar
(filename)[source]¶ Bases:
object
A basic parser for an OSZICAR output from VASP. In general, while the OSZICAR is useful for a quick look at the output from a VASP run, we recommend that you use the Vasprun parser instead, which gives far richer information about a run.
Parameters: filename (str) – Filename of file to parse -
electronic_steps
¶ All electronic steps as a list of list of dict. e.g., [[{“rms”: 160.0, “E”: 4507.24605593, “dE”: 4507.2, “N”: 1, “deps”: -17777.0, “ncg”: 16576}, …], [….] where electronic_steps[index] refers the list of electronic steps in one ionic_step, electronic_steps[index][subindex] refers to a particular electronic step at subindex in ionic step at index. The dict of properties depends on the type of VASP run, but in general, “E”, “dE” and “rms” should be present in almost all runs.
-
ionic_steps:
All ionic_steps as a list of dict, e.g., [{“dE”: -526.36, “E0”: -526.36024, “mag”: 0.0, “F”: -526.36024}, …] This is the typical output from VASP at the end of each ionic step.
-
all_energies
¶ Compilation of all energies from all electronic steps and ionic steps as a tuple of list of energies, e.g., ((4507.24605593,<PHONE_NUMBER>55, -512.073149912, …), …)
-
final_energy
¶
-
-
class
Outcar
(filename)[source]¶ Bases:
object
Parser for data in OUTCAR that is not available in Vasprun.xml
Note, this class works a bit differently than most of the other VaspObjects, since the OUTCAR can be very different depending on which “type of run” performed.
Creating the OUTCAR class with a filename reads “regular parameters” that are always present.
Parameters: filename (str) – OUTCAR filename to parse. -
magnetization
¶ Magnetization on each ion as a tuple of dict, e.g., ({“d”: 0.0, “p”: 0.003, “s”: 0.002, “tot”: 0.005}, … ) Note that this data is not always present. LORBIT must be set to some other value than the default.
-
chemical_shielding
¶ chemical shielding on each ion as a dictionary with core and valence contributions
-
unsym_cs_tensor
¶ Unsymmetrized chemical shielding tensor matrixes on each ion as a list. e.g., [[[sigma11, sigma12, sigma13],
[sigma21, sigma22, sigma23], [sigma31, sigma32, sigma33]], …- [[sigma11, sigma12, sigma13],
- [sigma21, sigma22, sigma23], [sigma31, sigma32, sigma33]]]
-
unsym_cs_tensor
-
G=0 contribution to chemical shielding. 2D rank 3 matrix
-
cs_core_contribution
¶ -
Core contribution to chemical shielding. dict. e.g.,
-
{'Mg': -412.8, 'C': -200.5, 'O': -271.1}
-
efg
¶ Electric Field Gradient (EFG) tensor on each ion as a tuple of dict, e.g., ({“cq”: 0.1, “eta”, 0.2, “nuclear_quadrupole_moment”: 0.3},
{“cq”: 0.7, “eta”, 0.8, “nuclear_quadrupole_moment”: 0.9}, …)
-
charge
¶ Charge on each ion as a tuple of dict, e.g., ({“p”: 0.154, “s”: 0.078, “d”: 0.0, “tot”: 0.232}, …) Note that this data is not always present. LORBIT must be set to some other value than the default.
-
is_stopped
¶ True if OUTCAR is from a stopped run (using STOPCAR, see Vasp Manual).
-
run_stats
¶ Various useful run stats as a dict including “System time (sec)”, “Total CPU time used (sec)”, “Elapsed time (sec)”, “Maximum memory used (kb)”, “Average memory used (kb)”, “User time (sec)”.
-
elastic_tensor
¶ -
Total elastic moduli (Kbar) is given in a 6x6 array matrix.
-
drift
¶ -
Total drift for each step in eV/Atom
-
ngf
¶ -
Dimensions for the Augementation grid
- ..attribute: final_energy_contribs
- Individual contributions to the total final energy as a dictionary. Include contirbutions from keys, e.g.: {‘DENC’: -505778.5184347, ‘EATOM’: 15561.06492564, ‘EBANDS’: -804.53201231, ‘EENTRO’: -0.08932659, ‘EXHF’: 0.0, ‘Ediel_sol’: 0.0, ‘PAW double counting’:<PHONE_NUMBER>100002, ‘PSCENC’:<PHONE_NUMBER>6, ‘TEWEN’:<PHONE_NUMBER>7338, ‘XCENC’: -169.64189814}
One can then call a specific reader depending on the type of run being performed. These are currently: read_igpar(), read_lepsilon() and read_lcalcpol(), read_core_state_eign(), read_avg_core_pot().
See the documentation of those methods for more documentation.
Authors: Rickard Armiento, Shyue Ping Ong
-
read_avg_core_poten
()[source]¶ Read the core potential at each ionic step.
Returns: A list for each ionic step containing a list of the average core potentials for each atom: [[avg core pot]]. Example
The average core potential of the 2nd atom of the structure at the last ionic step is: [-1][1]
-
read_chemical_shielding
()[source]¶ Parse the NMR chemical shieldings data. Only the second part “absolute, valence and core” will be parsed. And only the three right most field (ISO_SHIELDING, SPAN, SKEW) will be retrieved.
Returns: List of chemical shieldings in the order of atoms from the OUTCAR. Maryland notation is adopted.
-
read_core_state_eigen
()[source]¶ Read the core state eigenenergies at each ionic step.
Returns: [core state eig]}]. The core state eigenenergie list for each AO is over all ionic step. Return type: A list of dict over the atom such as [{“AO” Example
The core state eigenenergie of the 2s AO of the 6th atom of the structure at the last ionic step is [5][“2s”][-1]
-
read_cs_core_contribution
()[source]¶ Parse the core contribution of NMR chemical shielding.
Returns: G0 contribution matrix as list of list.
-
read_cs_g0_contribution
()[source]¶ Parse the G0 contribution of NMR chemical shielding.
Returns: G0 contribution matrix as list of list.
-
read_cs_raw_symmetrized_tensors
()[source]¶ Parse the matrix form of NMR tensor before corrected to table.
Returns: nsymmetrized tensors list in the order of atoms.
-
read_elastic_tensor
()[source]¶ Parse the elastic tensor data.
Returns: 6x6 array corresponding to the elastic tensor from the OUTCAR.
-
read_fermi_contact_shift
()[source]¶ output example: Fermi contact (isotropic) hyperfine coupling parameter (MHz) ————————————————————- ion A_pw A_1PS A_1AE A_1c A_tot ————————————————————-
1 -0.002 -0.002 -0.051 0.000 -0.052 2 -0.002 -0.002 -0.051 0.000 -0.052 3 0.056 0.056 0.321 -0.048 0.321, which corresponds to [[-0.002, -0.002, -0.051, 0.0, -0.052],
[-0.002, -0.002, -0.051, 0.0, -0.052], [0.056, 0.056, 0.321, -0.048, 0.321]] from ‘fch’ data
-
read_freq_dielectric
()[source]¶ Parses the frequency dependent dielectric function (obtained with LOPTICS). Frequencies (in eV) are in self.frequencies, and dielectric tensor function is given as self.dielectric_tensor_function.
-
read_igpar
()[source]¶ - Renders accessible:
- er_ev = e<r>_ev (dictionary with Spin.up/Spin.down as keys) er_bp = e<r>_bp (dictionary with Spin.up/Spin.down as keys) er_ev_tot = spin up + spin down summed er_bp_tot = spin up + spin down summed p_elc = spin up + spin down summed p_ion = spin up + spin down summed
(See VASP section “LBERRY, IGPAR, NPPSTR, DIPOL tags” for info on what these are).
-
read_internal_strain_tensor
()[source]¶ - Reads the internal strain tensor and populates self.internal_strain_tensor with an array of voigt notation
- tensors for each site.
-
read_neb
(reverse=True, terminate_on_match=True)[source]¶ Reads NEB data. This only works with OUTCARs from both normal VASP NEB calculations or from the CI NEB method implemented by Henkelman et al.
Parameters: - reverse (bool) – Read files in reverse. Defaults to false. Useful for large files, esp OUTCARs, especially when used with terminate_on_match. Defaults to True here since we usually want only the final value.
- terminate_on_match (bool) – Whether to terminate when there is at least one match in each key in pattern. Defaults to True here since we usually want only the final value.
- Renders accessible:
- tangent_force - Final tangent force. energy - Final energy. These can be accessed under Outcar.data[key]
-
read_nmr_efg
()[source]¶ Parse the NMR Electric Field Gradient interpretted values.
Returns: Electric Field Gradient tensors as a list of dict in the order of atoms from OUTCAR. Each dict key/value pair corresponds to a component of the tensors.
-
read_nmr_efg_tensor
()[source]¶ Parses the NMR Electric Field Gradient Raw Tensors
Returns: A list of Electric Field Gradient Tensors in the order of Atoms from OUTCAR
-
read_pattern
(patterns, reverse=False, terminate_on_match=False, postprocess=<class 'str'>)[source]¶ General pattern reading. Uses monty’s regrep method. Takes the same arguments.
Parameters: - patterns (dict) – A dict of patterns, e.g., {“energy”: r”energy(sigma->0)s+=s+([d-.]+)”}.
- reverse (bool) – Read files in reverse. Defaults to false. Useful for large files, esp OUTCARs, especially when used with terminate_on_match.
- terminate_on_match (bool) – Whether to terminate when there is at least one match in each key in pattern.
- postprocess (callable) – A post processing function to convert all matches. Defaults to str, i.e., no change.
- Renders accessible:
- Any attribute in patterns. For example, {“energy”: r”energy(sigma->0)s+=s+([d-.]+)”} will set the value of self.data[“energy”] = [[-1234], [-3453], …], to the results from regex and postprocess. Note that the returned values are lists of lists, because you can grep multiple items on one line.
-
read_table_pattern
(header_pattern, row_pattern, footer_pattern, postprocess=<class 'str'>, attribute_name=None, last_one_only=True)[source]¶ Parse table-like data. A table composes of three parts: header, main body, footer. All the data matches “row pattern” in the main body will be returned.
- Args:
- header_pattern (str): The regular expression pattern matches the
- table header. This pattern should match all the text immediately before the main body of the table. For multiple sections table match the text until the section of interest. MULTILINE and DOTALL options are enforced, as a result, the “.” meta-character will also match “
- ” in this
- section.
- row_pattern (str): The regular expression matches a single line in
- the table. Capture interested field using regular expression groups.
- footer_pattern (str): The regular expression matches the end of the
- table. E.g. a long dash line.
- postprocess (callable): A post processing function to convert all
- matches. Defaults to str, i.e., no change.
- attribute_name (str): Name of this table. If present the parsed data
- will be attached to “data. e.g. self.data[“efg”] = […]
- last_one_only (bool): All the tables will be parsed, if this option
- is set to True, only the last table will be returned. The enclosing list will be removed. i.e. Only a single table will be returned. Default to be True.
- Returns:
- List of tables. 1) A table is a list of rows. 2) A row if either a list of attribute values in case the the capturing group is defined without name in row_pattern, or a dict in case that named capturing groups are defined by row_pattern.
-
-
class
Procar
(filename)[source]¶ Bases:
object
Object for reading a PROCAR file.
Parameters: filename – Name of file containing PROCAR. -
data
¶ The PROCAR data of the form below. It should VASP uses 1-based indexing, but all indices are converted to 0-based here.:
{ spin: nd.array accessed with (k-point index, band index, ion index, orbital index) }
-
weights
¶ The weights associated with each k-point as an nd.array of lenght nkpoints.
..attribute:: phase_factors
Phase factors, where present (e.g. LORBIT = 12). A dict of the form: {
- spin: complex nd.array accessed with (k-point index, band index,
- ion index, orbital index)
}
..attribute:: nbands
Number of bands..attribute:: nkpoints
Number of k-points..attribute:: nions
Number of ions-
get_occupation
(atom_index, orbital)[source]¶ Returns the occupation for a particular orbital of a particular atom.
Parameters: - atom_num (int) – Index of atom in the PROCAR. It should be noted that VASP uses 1-based indexing for atoms, but this is converted to 0-based indexing in this parser to be consistent with representation of structures in pymatgen.
- orbital (str) – An orbital. If it is a single character, e.g., s, p, d or f, the sum of all s-type, p-type, d-type or f-type orbitals occupations are returned respectively. If it is a specific orbital, e.g., px, dxy, etc., only the occupation of that orbital is returned.
Returns: Sum occupation of orbital of atom.
-
-
class
Vasprun
(filename, ionic_step_skip=None, ionic_step_offset=0, parse_dos=True, parse_eigen=True, parse_projected_eigen=False, parse_potcar_file=True, occu_tol=1e-08, exception_on_bad_xml=True)[source]¶ Bases:
monty.json.MSONable
Vastly improved cElementTree-based parser for vasprun.xml files. Uses iterparse to support incremental parsing of large files. Speedup over Dom is at least 2x for smallish files (~1Mb) to orders of magnitude for larger files (~10Mb).
Parameters: - filename (str) – Filename to parse
- ionic_step_skip (int) – If ionic_step_skip is a number > 1, only every ionic_step_skip ionic steps will be read for structure and energies. This is very useful if you are parsing very large vasprun.xml files and you are not interested in every single ionic step. Note that the final energies may not be the actual final energy in the vasprun.
- ionic_step_offset (int) – Used together with ionic_step_skip. If set, the first ionic step read will be offset by the amount of ionic_step_offset. For example, if you want to start reading every 10th structure but only from the 3rd structure onwards, set ionic_step_skip to 10 and ionic_step_offset to 3. Main use case is when doing statistical structure analysis with extremely long time scale multiple VASP calculations of varying numbers of steps.
- parse_dos (bool) – Whether to parse the dos. Defaults to True. Set to False to shave off significant time from the parsing if you are not interested in getting those data.
- parse_eigen (bool) – Whether to parse the eigenvalues. Defaults to True. Set to False to shave off significant time from the parsing if you are not interested in getting those data.
- parse_projected_eigen (bool) – Whether to parse the projected eigenvalues. Defaults to False. Set to True to obtain projected eigenvalues. Note that this can take an extreme amount of time and memory. So use this wisely.
- parse_potcar_file (bool/str) –
Whether to parse the potcar file to read the potcar hashes for the potcar_spec attribute. Defaults to True, where no hashes will be determined and the potcar_spec dictionaries will read {“symbol”: ElSymbol, “hash”: None}. By Default, looks in the same directory as the vasprun.xml, with same extensions as
Vasprun.xml. If a string is provided, looks at that filepath. - occu_tol (float) – Sets the minimum tol for the determination of the vbm and cbm. Usually the default of 1e-8 works well enough, but there may be pathological cases.
- exception_on_bad_xml (bool) – Whether to throw a ParseException if a malformed XML is detected. Default to True, which ensures only proper vasprun.xml are parsed. You can set to False if you want partial results (e.g., if you are monitoring a calculation during a run), but use the results with care. A warning is issued.
Vasp results
-
ionic_steps
¶ All ionic steps in the run as a list of {“structure”: structure at end of run, “electronic_steps”: {All electronic step data in vasprun file}, “stresses”: stress matrix}
-
structures
¶ List of Structure objects for the structure at each ionic step.
-
tdos
¶ Total dos calculated at the end of run.
-
idos
¶ Integrated dos calculated at the end of run.
-
pdos
¶ List of list of PDos objects. Access as pdos[atomindex][orbitalindex]
-
efermi
¶ Fermi energy
-
eigenvalues
¶ Available only if parse_eigen=True. Final eigenvalues as a dict of {(spin, kpoint index):[[eigenvalue, occu]]}. This representation is based on actual ordering in VASP and is meant as an intermediate representation to be converted into proper objects. The kpoint index is 0-based (unlike the 1-based indexing in VASP).
-
projected_eigenvalues
¶ Final projected eigenvalues as a dict of {spin: nd-array}. To access a particular value, you need to do Vasprun.projected_eigenvalues[spin][kpoint index][band index][atom index][orbital_index] This representation is based on actual ordering in VASP and is meant as an intermediate representation to be converted into proper objects. The kpoint, band and atom indices are 0-based (unlike the 1-based indexing in VASP).
-
dielectric
¶ The real and imaginary part of the dielectric constant (e.g., computed by RPA) in function of the energy (frequency). Optical properties (e.g. absorption coefficient) can be obtained through this. The data is given as a tuple of 3 values containing each of them the energy, the real part tensor, and the imaginary part tensor ([energies],[[real_partxx,real_partyy,real_partzz,real_partxy, real_partyz,real_partxz]],[[imag_partxx,imag_partyy,imag_partzz, imag_partxy, imag_partyz, imag_partxz]])
-
other_dielectric
¶ Dictionary, with the tag comment as key, containing other variants of the real and imaginary part of the dielectric constant (e.g., computed by RPA) in function of the energy (frequency). Optical properties (e.g. absorption coefficient) can be obtained through this. The data is given as a tuple of 3 values containing each of them the energy, the real part tensor, and the imaginary part tensor ([energies],[[real_partxx,real_partyy,real_partzz,real_partxy, real_partyz,real_partxz]],[[imag_partxx,imag_partyy,imag_partzz, imag_partxy, imag_partyz, imag_partxz]])
-
epsilon_static
¶ The static part of the dielectric constant. Present when it’s a DFPT run (LEPSILON=TRUE)
-
epsilon_static_wolfe
¶ The static part of the dielectric constant without any local field effects. Present when it’s a DFPT run (LEPSILON=TRUE)
-
epsilon_ionic
¶ The ionic part of the static dielectric constant. Present when it’s a DFPT run (LEPSILON=TRUE) and IBRION=5, 6, 7 or 8
-
nionic_steps
¶ The total number of ionic steps. This number is always equal to the total number of steps in the actual run even if ionic_step_skip is used.
-
force_constants
¶ Force constants computed in phonon DFPT run(IBRION = 8). The data is a 4D numpy array of shape (natoms, natoms, 3, 3).
-
normalmode_eigenvals
¶ Normal mode frequencies. 1D numpy array of size 3*natoms.
-
normalmode_eigenvecs
¶ Normal mode eigen vectors. 3D numpy array of shape (3*natoms, natoms, 3).
Vasp inputs
-
incar
¶ Incar object for parameters specified in INCAR file.
-
parameters
¶ Incar object with parameters that vasp actually used, including all defaults.
-
kpoints
¶ Kpoints object for KPOINTS specified in run.
-
actual_kpoints
¶ List of actual kpoints, e.g., [[0.25, 0.125, 0.08333333], [-0.25, 0.125, 0.08333333], [0.25, 0.375, 0.08333333], ….]
-
actual_kpoints_weights
¶ List of kpoint weights, E.g., [0.04166667, 0.04166667, 0.04166667, 0.04166667, 0.04166667, ….]
-
atomic_symbols
¶ List of atomic symbols, e.g., [“Li”, “Fe”, “Fe”, “P”, “P”, “P”]
-
potcar_symbols
¶ List of POTCAR symbols. e.g., [“PAW_PBE Li 17Jan2003”, “PAW_PBE Fe 06Sep2000”, ..]
Author: Shyue Ping Ong
-
complete_dos
¶ A complete dos object which incorporates the total dos and all projected dos.
-
converged
¶ Returns true if a relaxation run is converged.
-
converged_electronic
¶ Checks that electronic step convergence has been reached in the final ionic step
-
converged_ionic
¶ Checks that ionic step convergence has been reached, i.e. that vasp exited before reaching the max ionic steps for a relaxation run
-
dielectric
-
eigenvalue_band_properties
¶ Band properties from the eigenvalues as a tuple, (band gap, cbm, vbm, is_band_gap_direct).
-
epsilon_ionic
Property only available for DFPT calculations and when IBRION=5, 6, 7 or 8.
-
epsilon_static
Property only available for DFPT calculations.
-
epsilon_static_wolfe
Property only available for DFPT calculations.
-
final_energy
¶
-
get_band_structure
(kpoints_filename=None, efermi=None, line_mode=False)[source]¶ Returns the band structure as a BandStructure object
Parameters: - kpoints_filename (str) – Full path of the KPOINTS file from which the band structure is generated. If none is provided, the code will try to intelligently determine the appropriate KPOINTS file by substituting the filename of the vasprun.xml with KPOINTS. The latter is the default behavior.
- efermi (float) – If you want to specify manually the fermi energy this is where you should do it. By default, the None value means the code will get it from the vasprun.
- line_mode (bool) – Force the band structure to be considered as a run along symmetry lines.
Returns: a BandStructure object (or more specifically a BandStructureSymmLine object if the run is detected to be a run along symmetry lines)
Two types of runs along symmetry lines are accepted: non-sc with Line-Mode in the KPOINT file or hybrid, self-consistent with a uniform grid+a few kpoints along symmetry lines (explicit KPOINTS file) (it’s not possible to run a non-sc band structure with hybrid functionals). The explicit KPOINTS file needs to have data on the kpoint label as commentary.
-
get_computed_entry
(inc_structure=True, parameters=None, data=None)[source]¶ Returns a ComputedStructureEntry from the vasprun.
Parameters: - inc_structure (bool) – Set to True if you want ComputedStructureEntries to be returned instead of ComputedEntries.
- parameters (list) – Input parameters to include. It has to be one of the properties supported by the Vasprun object. If parameters is None, a default set of parameters that are necessary for typical post-processing will be set.
- data (list) – Output data to include. Has to be one of the properties supported by the Vasprun object.
Returns: ComputedStructureEntry/ComputedEntry
-
hubbards
¶ Hubbard U values used if a vasprun is a GGA+U run. {} otherwise.
-
is_hubbard
¶ True if run is a DFT+U run.
-
is_spin
¶ True if run is spin-polarized.
-
lattice
¶
-
lattice_rec
¶
-
optical_absorption_coeff
¶ Calculate the optical absorption coefficient from the dielectric constants. Note that this method is only implemented for optical properties calculated with GGA and BSE. Returns: optical absorption coefficient in list
-
run_type
¶ Returns the run type. Currently supports LDA, GGA, vdW-DF and HF calcs.
TODO: Fix for other functional types like PW91, other vdW types, etc.
-
structures
-
class
VolumetricData
(structure, data, distance_matrix=None, data_aug=None)[source]¶ Bases:
monty.json.MSONable
Simple volumetric object for reading LOCPOT and CHGCAR type files.
-
structure
¶ Structure associated with the Volumetric Data object
..attribute:: is_spin_polarized
True if run is spin polarized..attribute:: dim
Tuple of dimensions of volumetric grid in each direction (nx, ny, nz)...attribute:: data
Actual data as a dict of {string: np.array}. The string are “total” and “diff”, in accordance to the output format of vasp LOCPOT and CHGCAR files where the total spin density is written first, followed by the difference spin density.-
ngridpts
¶ Total number of grid points in volumetric data.
Typically, this constructor is not used directly and the static from_file constructor is used. This constructor is designed to allow summation and other operations between VolumetricData objects.
Parameters: - structure – Structure associated with the volumetric data
- data – Actual volumetric data.
- data_aug – Any extra information associated with volumetric data (typically augmentation charges)
- distance_matrix – A pre-computed distance matrix if available. Useful so pass distance_matrices between sums, shortcircuiting an otherwise expensive operation.
-
get_average_along_axis
(ind)[source]¶ Get the averaged total of the volumetric data a certain axis direction. For example, useful for visualizing Hartree Potentials from a LOCPOT file.
Parameters: ind (int) – Index of axis. Returns: Average total along axis
-
get_axis_grid
(ind)[source]¶ Returns the grid for a particular axis.
Parameters: ind (int) – Axis index.
-
get_integrated_diff
(ind, radius, nbins=1)[source]¶ Get integrated difference of atom index ind up to radius. This can be an extremely computationally intensive process, depending on how many grid points are in the VolumetricData.
Parameters: - ind (int) – Index of atom.
- radius (float) – Radius of integration.
- nbins (int) – Number of bins. Defaults to 1. This allows one to obtain the charge integration up to a list of the cumulative charge integration values for radii for [radius/nbins, 2 * radius/nbins, ….].
Returns: Differential integrated charge as a np array of [[radius, value], …]. Format is for ease of plotting. E.g., plt.plot(data[:,0], data[:,1])
-
linear_add
(other, scale_factor=1.0)[source]¶ Method to do a linear sum of volumetric objects. Used by + and - operators as well. Returns a VolumetricData object containing the linear sum.
Parameters: - other (VolumetricData) – Another VolumetricData object
- scale_factor (float) – Factor to scale the other data by.
Returns: VolumetricData corresponding to self + scale_factor * other.
-
static
parse_file
(filename)[source]¶ Convenience method to parse a generic volumetric data file in the vasp like format. Used by subclasses for parsing file.
Parameters: filename (str) – Path of file to parse Returns: (poscar, data)
-
spin_data
¶ data}. Essentially, this provides the actual Spin.up and Spin.down data instead of the total and diff. Note that by definition, a non-spin-polarized run would have Spin.up data == Spin.down data.
Type: The data decomposed into actual spin data as {spin
-
to_hdf5
(filename)[source]¶ Writes the VolumetricData to a HDF5 format, which is a highly optimized format for reading storing large data. The mapping of the VolumetricData to this file format is as follows:
VolumetricData.data -> f[“vdata”] VolumetricData.structure ->
f[“Z”]: Sequence of atomic numbers f[“fcoords”]: Fractional coords f[“lattice”]: Lattice in the pymatgen.core.lattice.Lattice matrix
formatf.attrs[“structure_json”]: String of json representation
Parameters: filename (str) – Filename to output to.
-
-
class
Wavecar
(filename='WAVECAR', verbose=False, precision='normal')[source]¶ Bases:
object
This is a class that contains the (pseudo-) wavefunctions from VASP.
Coefficients are read from the given WAVECAR file and the corresponding G-vectors are generated using the algorithm developed in WaveTrans (see acknowledgments below). To understand how the wavefunctions are evaluated, please see the evaluate_wavefunc docstring.
It should be noted that the pseudopotential augmentation is not included in the WAVECAR file. As a result, some caution should be exercised when deriving value from this information.
The usefulness of this class is to allow the user to do projections or band unfolding style manipulations of the wavefunction. An example of this can be seen in the work of Shen et al. 2017 (https://doi.org/10.1103/PhysRevMaterials.1.065001).
-
filename
¶ String of the input file (usually WAVECAR)
-
nk
¶ Number of k-points from the WAVECAR
-
nb
¶ Number of bands per k-point
-
encut
¶ Energy cutoff (used to define G_{cut})
-
efermi
¶ Fermi energy
-
a
¶ Primitive lattice vectors of the cell (e.g. a_1 = self.a[0, :])
-
b
¶ Reciprocal lattice vectors of the cell (e.g. b_1 = self.b[0, :])
-
vol
¶ The volume of the unit cell in real space
-
kpoints
¶ The list of k-points read from the WAVECAR file
-
band_energy
¶ The list of band eigenenergies (and corresponding occupancies) for each kpoint, where the first index corresponds to the index of the k-point (e.g. self.band_energy[kp])
-
Gpoints
¶ The list of generated G-points for each k-point (a double list), which are used with the coefficients for each k-point and band to recreate the wavefunction (e.g. self.Gpoints[kp] is the list of G-points for k-point kp). The G-points depend on the k-point and reciprocal lattice and therefore are identical for each band at the same k-point. Each G-point is represented by integer multipliers (e.g. assuming Gpoints[kp][n] == [n_1, n_2, n_3], then G_n = n_1*b_1 + n_2*b_2 + n_3*b_3)
-
coeffs
¶ The list of coefficients for each k-point and band for reconstructing the wavefunction. For non-spin-polarized, the first index corresponds to the kpoint and the second corresponds to the band (e.g. self.coeffs[kp][b] corresponds to k-point kp and band b). For spin-polarized calculations, the first index is for the spin.
- Acknowledgments:
- This code is based upon the Fortran program, WaveTrans, written by R. M. Feenstra and M. Widom from the Dept. of Physics at Carnegie Mellon University. To see the original work, please visit: https://www.andrew.cmu.edu/user/feenstra/wavetrans/
Author: Mark Turiansky
Information is extracted from the given WAVECAR
Parameters: - filename (str) – input file (default: WAVECAR)
- verbose (bool) – determines whether processing information is shown
- precision (str) – determines how fine the fft mesh is (normal or accurate), only the first letter matters
-
evaluate_wavefunc
(kpoint, band, r, spin=0)[source]¶ Evaluates the wavefunction for a given position, r.
The wavefunction is given by the k-point and band. It is evaluated at the given position by summing over the components. Formally,
psi_n^k (r) = sum_{i=1}^N c_i^{n,k} exp (i (k + G_i^{n,k}) cdot r)
where psi_n^k is the wavefunction for the nth band at k-point k, N is the number of plane waves, c_i^{n,k} is the ith coefficient that corresponds to the nth band and k-point k, and G_i^{n,k} is the ith G-point corresponding to k-point k.
NOTE: This function is very slow; a discrete fourier transform is the preferred method of evaluation (see Wavecar.fft_mesh).
Parameters: - kpoint (int) – the index of the kpoint where the wavefunction will be evaluated
- band (int) – the index of the band where the wavefunction will be evaluated
- r (np.array) – the position where the wavefunction will be evaluated
- spin (int) – spin index for the desired wavefunction (only for ISPIN = 2, default = 0)
Returns: a complex value corresponding to the evaluation of the wavefunction
-
fft_mesh
(kpoint, band, spin=0, shift=True)[source]¶ Places the coefficients of a wavefunction onto an fft mesh.
Once the mesh has been obtained, a discrete fourier transform can be used to obtain real-space evaluation of the wavefunction. The output of this function can be passed directly to numpy’s fft function. For .. rubric:: Example
mesh = Wavecar(‘WAVECAR’).fft_mesh(kpoint, band) evals = np.fft.ifftn(mesh)
Parameters: - kpoint (int) – the index of the kpoint where the wavefunction will be evaluated
- band (int) – the index of the band where the wavefunction will be evaluated
- spin (int) – the spin of the wavefunction for the desired wavefunction (only for ISPIN = 2, default = 0)
- shift (bool) – determines if the zero frequency coefficient is placed at index (0, 0, 0) or centered
Returns: a numpy ndarray representing the 3D mesh of coefficients
-
get_parchg
(poscar, kpoint, band, spin=None, phase=False, scale=2)[source]¶ Generates a Chgcar object, which is the charge density of the specified wavefunction.
This function generates a Chgcar object with the charge density of the wavefunction specified by band and kpoint (and spin, if the WAVECAR corresponds to a spin-polarized calculation). The phase tag is a feature that is not present in VASP. For a real wavefunction, the phase tag being turned on means that the charge density is multiplied by the sign of the wavefunction at that point in space. A warning is generated if the phase tag is on and the chosen kpoint is not Gamma.
Note: Augmentation from the PAWs is NOT included in this function. The maximal charge density will differ from the PARCHG from VASP, but the qualitative shape of the charge density will match.
Parameters: - poscar (pymatgen.io.vasp.inputs.Poscar) – Poscar object that has the structure associated with the WAVECAR file
- kpoint (int) – the index of the kpoint for the wavefunction
- band (int) – the index of the band for the wavefunction
- spin (int) – optional argument to specify the spin. If the Wavecar has ISPIN = 2, spin == None generates a Chgcar with total spin and magnetization, and spin == {0, 1} specifies just the spin up or down component.
- phase (bool) – flag to determine if the charge density is multiplied by the sign of the wavefunction. Only valid for real wavefunctions.
- scale (int) – scaling for the FFT grid. The default value of 2 is at least as fine as the VASP default.
Returns: a pymatgen.io.vasp.outputs.Chgcar object
-
-
class
Wavederf
(filename)[source]¶ Bases:
object
Object for reading a WAVEDERF file.
Note: This file is only produced when LOPTICS is true AND vasp has been recompiled after uncommenting the line that calls WRT_CDER_BETWEEN_STATES_FORMATTED in linear_optics.F
Parameters: filename – Name of file containing WAVEDERF. -
data
¶ A numpy array containing the WAVEDERF data of the form below. It should be noted that VASP uses 1-based indexing for bands, but this is converted to 0-based numpy array indexing.
For each kpoint (in the same order as in IBZKPT), and for each pair of bands:
- [ #kpoint index
- [ #band 1 index
- [ #band 2 index
- [cdum_x_real, cdum_x_imag, cdum_y_real, cdum_y_imag, cdum_z_real, cdum_z_imag]
]
]
]
This structure follows the file format. Numpy array methods can be used to fetch data in a more useful way (e.g., get matrix elements between wo specific bands at each kpoint, fetch x/y/z components, real/imaginary parts, abs/phase, etc. )
Author: Miguel Dias Costa
-
get_elements_between_bands
(band_i, band_j)[source]¶ Method returning a numpy array with elements
[cdum_x_real, cdum_x_imag, cdum_y_real, cdum_y_imag, cdum_z_real, cdum_z_imag]
between bands band_i and band_j (vasp 1-based indexing) for all kpoints.
Parameters: - band_i (Integer) – Index of band i
- band_j (Integer) – Index of band j
Returns: a numpy list of elements for each kpoint
-
nb_bands
¶ returns the number of bands in the band structure
-
nb_kpoints
¶ Returns the number of k-points in the band structure calculation
-
-
class
Xdatcar
(filename, ionicstep_start=1, ionicstep_end=None, comment=None)[source]¶ Bases:
object
Class representing an XDATCAR file. Only tested with VASP 5.x files.
-
structures
¶ List of structures parsed from XDATCAR.
-
comment
¶ Optional comment string.
Authors: Ram Balachandran
Init a Xdatcar.
Parameters: - filename (str) – Filename of input XDATCAR file.
- ionicstep_start (int) – Starting number of ionic step.
- ionicstep_end (int) – Ending number of ionic step.
-
concatenate
(filename, ionicstep_start=1, ionicstep_end=None)[source]¶ Concatenate structures in file to Xdatcar.
Parameters: - filename (str) – Filename of XDATCAR file to be concatenated.
- ionicstep_start (int) – Starting number of ionic step.
- ionicstep_end (int) – Ending number of ionic step.
- TODO(rambalachandran):
- Requires a check to ensure if the new concatenating file has the same lattice structure and atoms as the Xdatcar class.
-
get_string
(ionicstep_start=1, ionicstep_end=None, significant_figures=8)[source]¶ Write Xdatcar class into a file :param filename: Filename of output XDATCAR file. :type filename: str :param ionicstep_start: Starting number of ionic step. :type ionicstep_start: int :param ionicstep_end: Ending number of ionic step. :type ionicstep_end: int
-
natoms
¶ Sequence of number of sites of each type associated with the Poscar. Similar to 7th line in vasp 5+ Xdatcar.
-
site_symbols
¶ Sequence of symbols associated with the Xdatcar. Similar to 6th line in vasp 5+ Xdatcar.
-
-
get_adjusted_fermi_level
(efermi, cbm, band_structure)[source]¶ When running a band structure computations the fermi level needs to be take from the static run that gave the charge density used for the non-self consistent band structure run. Sometimes this fermi level is however a little too low because of the mismatch between the uniform grid used in the static run and the band structure k-points (e.g., the VBM is on Gamma and the Gamma point is not in the uniform mesh). Here we use a procedure consisting in looking for energy levels higher than the static fermi level (but lower than the LUMO) if any of these levels make the band structure appears insulating and not metallic anymore, we keep this adjusted fermi level. This procedure has shown to detect correctly most insulators.
Parameters: - efermi (float) – Fermi energy of the static run
- cbm (float) – Conduction band minimum of the static run
- run_bandstructure – a band_structure object
Returns: a new adjusted fermi level
-
get_band_structure_from_vasp_multiple_branches
(dir_name, efermi=None, projections=False)[source]¶ This method is used to get band structure info from a VASP directory. It takes into account that the run can be divided in several branches named “branch_x”. If the run has not been divided in branches the method will turn to parsing vasprun.xml directly.
The method returns None is there”s a parsing error
Parameters: - dir_name – Directory containing all bandstructure runs.
- efermi – Efermi for bandstructure.
- projections – True if you want to get the data on site projections if any. Note that this is sometimes very large
Returns: A BandStructure Object


Photography
Animals
Insects
Landscape
Nature
Magnificent photographs taken from all across the planet.


@*
* Copyright 2017 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*@
@import uk.gov.hmrc.valuationofficeagencycontactfrontend.FrontendAppConfig
@import uk.gov.hmrc.valuationofficeagencycontactfrontend.models.Contact
@import uk.gov.hmrc.valuationofficeagencycontactfrontend.utils.AddressFormatters._
@import uk.gov.hmrc.valuationofficeagencycontactfrontend.utils.ContactFormatter._
@(appConfig: FrontendAppConfig, contact: Contact, date: String, key: String)(implicit request: Request[_], messages: Messages)
@main_template(
title = messages("confirmation.title"),
appConfig = appConfig,
bodyClasses = Some("full-width")) {
@messages("confirmation.para2")
@messages("confirmation.survey.para") @components.button_link(messageKey="site.print.button", href="javascript:window.print()", id="print-button", className="button print-hidden js-visible") }


You've been invited to join the
*|COMPANY|* workspace on
*|COMPANYNAME|*- the hub of all your marketing KPIs. You can
use Clarisights to see the dashboards shared with you and
easily create your own, to deep-dive and explore insights from
marketing data.
The Clarisights team has created a handbook to help you understand the capabilities of the platform, the data sources available and the way Delivery Hero's data has been structured.
Please sign-in to Clarisights using your Google account linked with *|EMAIL|*.
Feel free to reach out to us for any query via the in-platform messenger.
-Team *|COMPANYNAME|*


org.bouncycastle.asn1.x509
Class GeneralName
java.lang.Object
org.bouncycastle.asn1.ASN1Encodable
org.bouncycastle.asn1.x509.GeneralName
- All Implemented Interfaces:
- ASN1Choice, DEREncodable
public class GeneralName
- extends ASN1Encodable
- implements ASN1Choice
The GeneralName object.
GeneralName ::= CHOICE {
otherName [0] OtherName,
rfc822Name [1] IA5String,
dNSName [2] IA5String,
x400Address [3] ORAddress,
directoryName [4] Name,
ediPartyName [5] EDIPartyName,
uniformResourceIdentifier [6] IA5String,
iPAddress [7] OCTET STRING,
registeredID [8] OBJECT IDENTIFIER}
OtherName ::= SEQUENCE {
type-id OBJECT IDENTIFIER,
value [0] EXPLICIT ANY DEFINED BY type-id }
EDIPartyName ::= SEQUENCE {
nameAssigner [0] DirectoryString OPTIONAL,
partyName [1] DirectoryString }
Name ::= CHOICE { RDNSequence }
|
Constructor Summary |
GeneralName(DERObject name,
int tag)
Deprecated. this constructor seems the wrong way round! Use GeneralName(tag, name). |
GeneralName(int tag,
ASN1Encodable name)
When the subjectAltName extension contains an Internet mail address,
the address MUST be included as an rfc822Name. |
GeneralName(int tag,
java.lang.String name)
Create a GeneralName for the given tag from the passed in String. |
GeneralName(X500Name dirName)
|
GeneralName(X509Name dirName)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
otherName
public static final int otherName
- See Also:
- Constant Field Values
rfc822Name
public static final int rfc822Name
- See Also:
- Constant Field Values
dNSName
public static final int dNSName
- See Also:
- Constant Field Values
x400Address
public static final int x400Address
- See Also:
- Constant Field Values
directoryName
public static final int directoryName
- See Also:
- Constant Field Values
ediPartyName
public static final int ediPartyName
- See Also:
- Constant Field Values
uniformResourceIdentifier
public static final int uniformResourceIdentifier
- See Also:
- Constant Field Values
iPAddress
public static final int iPAddress
- See Also:
- Constant Field Values
registeredID
public static final int registeredID
- See Also:
- Constant Field Values
GeneralName
public GeneralName(X509Name dirName)
GeneralName
public GeneralName(X500Name dirName)
GeneralName
public GeneralName(DERObject name,
int tag)
- Deprecated. this constructor seems the wrong way round! Use GeneralName(tag, name).
GeneralName
public GeneralName(int tag,
ASN1Encodable name)
- When the subjectAltName extension contains an Internet mail address,
the address MUST be included as an rfc822Name. The format of an
rfc822Name is an "addr-spec" as defined in RFC 822 [RFC 822].
When the subjectAltName extension contains a domain name service
label, the domain name MUST be stored in the dNSName (an IA5String).
The name MUST be in the "preferred name syntax," as specified by RFC
1034 [RFC 1034].
When the subjectAltName extension contains a URI, the name MUST be
stored in the uniformResourceIdentifier (an IA5String). The name MUST
be a non-relative URL, and MUST follow the URL syntax and encoding
rules specified in [RFC 1738]. The name must include both a scheme
(e.g., "http" or "ftp") and a scheme-specific-part. The scheme-
specific-part must include a fully qualified domain name or IP
address as the host.
When the subjectAltName extension contains a iPAddress, the address
MUST be stored in the octet string in "network byte order," as
specified in RFC 791 [RFC 791]. The least significant bit (LSB) of
each octet is the LSB of the corresponding byte in the network
address. For IP Version 4, as specified in RFC 791, the octet string
MUST contain exactly four octets. For IP Version 6, as specified in
RFC 1883, the octet string MUST contain exactly sixteen octets [RFC
1883].
GeneralName
public GeneralName(int tag,
java.lang.String name)
- Create a GeneralName for the given tag from the passed in String.
This constructor can handle:
- rfc822Name
- iPAddress
- directoryName
- dNSName
- uniformResourceIdentifier
- registeredID
For x400Address, otherName and ediPartyName there is no common string
format defined.
Note: A directory name can be encoded in different ways into a byte
representation. Be aware of this if the byte representation is used for
comparing results.
- Parameters:
tag
- tag numbername
- string representation of name
- Throws:
java.lang.IllegalArgumentException
- if the string encoding is not correct or * not supported.
getInstance
public static GeneralName getInstance(java.lang.Object obj)
getInstance
public static GeneralName getInstance(ASN1TaggedObject tagObj,
boolean explicit)
getTagNo
public int getTagNo()
getName
public DEREncodable getName()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
toASN1Object
public DERObject toASN1Object()
- Specified by:
toASN1Object
in class ASN1Encodable


Also appears to work with Twelve Sky 2 and Troy
Input SOBJECT or MOBJECT output an8 file for now. Will render with Three.js in the web browser later, populated list of objects from game whilst it was loading up to server select.
You can load a file from your computer.


Sandra the orangutan settles into new home in Florida after being granted legal personhood
by Associated PressA 33-year-old orangutan granted legal personhood by a judge in Argentina is settling into her new surroundings at the Center for Great Apes in central Florida.
Patti Ragan, director of the center in Wauchula, Florida, says Sandra is "very sweet and inquisitive" and adjusting to her new home. She was born in Germany and spent 25 years at the Buenos Aires Zoo before arriving in Florida on Nov. 5.
"She was shy when she first arrived, but once she saw the swings, toys, and grassy areas in her new home, she went out to explore," Ragan said. "She has met her caregivers here and is adjusting well to the new climate, environment, and the other great apes at the Center. This is the first time in over a decade that Sandra has had the opportunity to meet other orangutans, and she will meet them when she chooses. It is a new freedom for her, and one we are grateful to provide."
ARGENTINE ORGANUTAN SANDRA TO HEAD TO US GREAT APE SANCTUARY
DEADLY SEAL VIRUS COULD BE SPREADING FASTER FROM MELTING ARCTIC ICE
Judge Elena Liberatori's landmark ruling in 2015 declared that Sandra is legally not an animal, but a non-human person, thus entitled to some legal rights enjoyed by people, and better living conditions.
"With that ruling I wanted to tell society something new, that animals are sentient beings and that the first right they have is our obligation to respect them," she told The Associated Press.
But without a clear alternative, Sandra remained at the antiquated zoo, which closed in 2016, until leaving for the U.S. in late September. She was in quarantine for a month at the Sedgwick County Zoo in Kansas before arriving in Florida.
CLICK HERE FOR THE FOX NEWS APP
At the center, Sandra joins 21 orangutans and 31 chimpanzees rescued or retired from circuses, stage shows and the exotic pet trade.


Quick Links
History of the PMQ
The Police Married Quarters (PMQ) was originally the grounds of a government school. This school provided a western style education to some residents at primary and secondary levels and was temporarily relocated and later called Queen's College. During World War II the building was destroyed, and it had to be demolished after the war. In 1951 the British government constructed the Police Married Quarters at this site. The police needed a building to house the high ranking, married police officers because space was so limited in the city. In total it contained around 140 single rooms and 28 double rooms.
By 2000 the building was no longer being used and started to go into a state of decay. in 2009 the PMQ was one of eight projects to be preserved under "Conserving Central" policy. In recent years most of the site of the former Police Married Quarters has been turned into commercial space.
Modern Preservation Efforts
The PMQ has been renovated and put into reuse, and now serves as a creative industries landmark. Similar to Tai Kwun, as public concern for historic sites rose the Antiquities and Monuments office conducted surveys and investigations of the PMQ from 2005 to 2007. The AMO listed the PMQ as a Grade III Historic Building in 2010 due to the discovery of walls and quoin stones from the original structure. The Government collected public opinion in 2008 and decided to revitalize the PMQ with the following principles:
- Preserving the historical relics;
- Manifesting the heritage values and original ambience of the Site;
- Revitalizing the Site by giving it a new lease on life that may become a landmark for local residents and visitors;
- Contributing to the holistic planning of the Hollywood Road area under the proposed "spot, line and area" approach for heritage conservation and the promotion of heritage tourism;
- Responding to the community's concerns about over development in the area; and
- Addressing the community's aspirations for more POS [public space]
The Legislative Council approved the funding and design for the PMQ in 2011. The Construction started in January 2012, and The Musketeers Foundation completed the construction after two years. The Foundation also had support from Hong Kong Polytechnic University, the Hong Kong Design Centre, and the Hong Kong Design Institute of the Vocational Training Council. Now over a hundred designer studios, enterprises, and exhibitions in PMQ attract both locals and tourists.
Location
PMQ is located in the Central District of Hong Kong Island, on Aberdeen Street. There are three public entrances; two are located on Aberdeen street, and the other is located on Staunton Street.


Create your own bingo sheet!
Title of bingo page:
Bingo entries, separated by new lines or a comma
Create


Bring your idea and build it in our 12-hour hackathon. This is a hackathon open for everyone interested.
Our hackathon includes 2 speakers which will talk about new technologies like Virtual Reality and Mobile and Web Development Tools.
We encourage participants to engage in projects based in mobile, web and virtual reality development.
HTML and CSS are essential for designing websites and web applications. JavaScript makes web pages more dynamic by allowing users to interact with web pages, click on elements, and change the pages. .
ReactJS is a JavaScript library for building user interfaces and web applications. React Native is a mobile framework that compiles to native app components, allowing you to build native mobile applications (iOS, Android, and Windows). Both are open sourced by Facebook.
Virtual Reality projects can be developed for the web or for applications. For the web you can use A-Frame for gaming apps you can use Unity or Unreal.
Pedro Cruz is an entrepreneur. He has participated in entrepreneurial competitions, from which he launched his startup, Rokai Labs. Pedro Cruz and Rokai Labs have been working with virtual reality, augmented reality, WebVR and 360 videos.
Ricardo will be talking about Xamarin and the position it has in the market, the development of solutions in the cloud (Azure), Machine Learning and how to use this technologies to innovate in Puerto Rico.
| Time | What is Happening |
|---|---|
| 8:30am | Registro |
| 9:00am | Hackathon Starts |
| 10:30am | Virtual Reality Talk |
| 12:30pm | Lunch |
| 2:30pm | Development Tools Talk |
| 5:30pm | Dinner |
| 8:00pm | Hacking Ends |
| 8:30pm | Presentations & Awards |
| 9:00pm | Hackathon Ends |


| Product | Price | Quantity | Subtotal | |
|---|---|---|---|---|
7-Day Self Publishing Mini Coursethis e-book was built for beginners and advanced writers, publishers, self-publishers, writers with no marketing experience or following or those who have zero, zilch, nothing! |
$11 | 11 | ||
| Continue Shopping | Total: $11 | Checkout |


W3C compliant extensions to SXPathlib $Id: sxpath-ext.scm,v 1.911 2002/12/06 22:10:53 kl Exp kl $: This software is in Public Domain. IT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. Please send bug reports and comments to<EMAIL_ADDRESS>Kirill Lisovsky<EMAIL_ADDRESS>Dmitry Lizorkin
The counterpart to XPath 'string' function (section 4.2 XPath Rec.) Converts a given object to a string NOTE: 1. When converting a nodeset - a document order is not preserved 2. number->string function returns the result in a form which is slightly different from XPath Rec. specification
The counterpart to XPath 'boolean' function (section 4.3 XPath Rec.) Converts its argument to a boolean
The counterpart to XPath 'number' function (section 4.4 XPath Rec.) Converts its argument to a number NOTE: 1. The argument is not optional (yet?) 2. string->number conversion is not IEEE 754 round-to-nearest 3. NaN is represented as 0
Returns a string value for a given node in accordance to XPath Rec. 5.1 - 5.7
Select SXML element by its unique IDs XPath Rec. 4.1 object - a nodeset or a datatype which can be converted to a string by means of a 'string' function id-index = ( (id-value . element) (id-value . element) ... ) This index is used for selection of an element by its unique ID. The result is a nodeset
Implements XPath equality comparison in a straightforward nested loop manner
Similar to R5RS 'list-tail' but returns the new list consisting of the first 'k' members of 'lst'
Implements merge-sort of the given lst Returns the sorted list, the smallest member first less-than?-pred ::= (lambda (obj1 obj2) ...) less-than?-pred returns #t if obj1<obj2 with respect to the given ordering
Implementation of XPath equality comparison for 2 string-sets with merge-sort join algorithm
The running time of the algorithm is proportional to the nodeset size and to node string-value length Since each nodeset contains O(n) nodes and string-value for each node is O(n) in length, radix-sort join algorithm evaluates in O(n^2) time. By comparison, nested loop join requires O(n^3) time, merge-sort join implemented above requires O(n^2*log(n)). On the other hand, radix-sort join is time-ineffective for relatively small nodesets being joined. For small nodesets, the above implemented sort-merge join runs more effectively. Radix-sort join is promising for large nodesets.
Represents a list of chars as a branch in the string-tree The list of chars must be non-empty
Converts a string to a string-tree
Adds a new string to string-tree In a special case, tree257 may be #f. The function than creates a new tree, which contains just the representation for str
Whether a given string is presented in the string-tree
XPath equality comparison for 2 string-sets bool-op - comparison function for 2 boolean values
A helper for XPath equality operations: = , != 'bool-op', 'number-op' and 'string-op' are comparison operations for a pair of booleans, numbers and strings respectively
Relational operation ( < , > , <= , >= ) for two XPath objects op is comparison procedure: < , > , <= or >=
An order in resulting nodeset is preserved
Ancestor axis
Ancestor-or-self axis
Descendant axis It's similar to original 'node-closure' a resulting nodeset is in depth-first order rather than breadth-first Fix: din't descend in non-element nodes!
Descendant-or-self axis
Following axis
Following-sibling axis
Namespace axis
Preceding axis
Preceding-sibling axis
The counterpart to XPath 'string' function (section 4.2 XPath Rec.) Converts a given object to a string NOTE: 1. When converting a nodeset - a document order is not preserved 2. number->string function returns the result in a form which is slightly different from XPath Rec. specification
(define (sxml:string object) (cond ((string? object) object) ((nodeset? object) (if (null? object) "" (sxml:string-value (car object)))) ((number? object) (if (and (rational? object) (not (integer? object))) ; like 1/2 (number->string (exact->inexact object)) (number->string object))) ((boolean? object) (if object "true" "false")) (else ""))) ; Unknown type -> empty string.
The counterpart to XPath 'boolean' function (section 4.3 XPath Rec.) Converts its argument to a boolean
(define (sxml:boolean object) (cond ((boolean? object) object) ((number? object) (not (= object 0))) ((string? object) (> (string-length object) 0)) ((nodeset? object) (not (null? object))) (else #f))) ; Not specified in XPath Rec.
The counterpart to XPath 'number' function (section 4.4 XPath Rec.) Converts its argument to a number NOTE: 1. The argument is not optional (yet?) 2. string->number conversion is not IEEE 754 round-to-nearest 3. NaN is represented as 0
(define (sxml:number obj) (cond ((number? obj) obj) ((string? obj) (let ((nmb (call-with-input-string obj read))) (if (number? nmb) nmb 0))) ; NaN ((boolean? obj) (if obj 1 0)) ((nodeset? obj) (sxml:number (sxml:string obj))) (else 0))) ; unknown datatype
Returns a string value for a given node in accordance to XPath Rec. 5.1 - 5.7
(define (sxml:string-value node) (cond ((not (pair? node)) ; a text node or data node (sxml:string node)) ((null? (cdr node)) "") (else (apply string-append ; a list of arguments is always non-null (map (lambda (node) (if (sxml:node? node) ; not annot-attr node or aux list node (sxml:string-value node) "")) (cdr node))))))
Select SXML element by its unique IDs XPath Rec. 4.1 object - a nodeset or a datatype which can be converted to a string by means of a 'string' function id-index = ( (id-value . element) (id-value . element) ... ) This index is used for selection of an element by its unique ID. The result is a nodeset
(define (sxml:id id-index) (lambda(object) (if (nodeset? object) (let loop ((str-lst (map sxml:string-value object)) (res '())) (if (null? str-lst) (reverse res) (let ((node (sxml:lookup (car str-lst) id-index))) (if (not node) ; no such element (loop (cdr str-lst) res) (loop (cdr str-lst) (cons node res)))))) (let rpt ((lst (string->list (sxml:string object))) (tmp '()) (res '())) (cond ((null? lst) (if (null? tmp) (reverse res) (let ((node (sxml:lookup (list->string (reverse tmp)) id-index))) (if (not node) (reverse res) (reverse (cons node res)))))) ((member (car lst) '(#\space #\return #\newline #\tab)) (if (null? tmp) (rpt (cdr lst) tmp res) (let ((node (sxml:lookup (list->string (reverse tmp)) id-index))) (if (not node) (rpt (cdr lst) '() res) (rpt (cdr lst) '() (cons node res)))))) (else (rpt (cdr lst) (cons (car lst) tmp) res)))))))
Implements XPath equality comparison in a straightforward nested loop manner
(define (sxml:nested-loop-join string-set1 string-set2 string-op) (let first ((str-set1 string-set1) (str-set2 string-set2)) (cond ((null? str-set1) #f) ((let second ((elem (car str-set1)) (set2 str-set2)) (cond ((null? set2) #f) ((string-op elem (car set2)) #t) (else (second elem (cdr set2))))) #t) (else (first (cdr str-set1) str-set2)))))
Ancestor axis
(define (sxml:ancestor test-pred?) (lambda (root-node) ; node or nodeset (lambda (node) ; node or nodeset (if (nodeset? node) (map-union ((sxml:ancestor test-pred?) root-node) node) (let rpt ((paths (if (nodeset? root-node) (map list root-node) (list (list root-node))))) (if (null? paths) '() (let ((path (car paths))) (if (eq? (car path) node) ((sxml:filter test-pred?) (cdr path)) (rpt (append (map (lambda (arg) (cons arg path)) (append ((sxml:attribute (ntype?? '*)) (car path)) ((sxml:child sxml:node?) (car path)))) (cdr paths)))))))))))
Ancestor-or-self axis
(define (sxml:ancestor-or-self test-pred?) (lambda (root-node) ; node or nodeset (lambda (node) ; node or nodeset (if (nodeset? node) (map-union ((sxml:ancestor-or-self test-pred?) root-node) node) (let rpt ((paths (if (nodeset? root-node) (map list root-node) (list (list root-node))))) (if (null? paths) ((sxml:filter test-pred?) (list node)) (let ((path (car paths))) (if (eq? (car path) node) ((sxml:filter test-pred?) path) (rpt (append (map (lambda (arg) (cons arg path)) (append ((sxml:attribute (ntype?? '*)) (car path)) ((sxml:child sxml:node?) (car path)))) (cdr paths)))))))))))
Descendant axis It's similar to original 'node-closure' a resulting nodeset is in depth-first order rather than breadth-first Fix: din't descend in non-element nodes!
(define (sxml:descendant test-pred?) (lambda (node) ; node or nodeset (if (nodeset? node) (map-union (sxml:descendant test-pred?) node) (let rpt ((res '()) (more ((sxml:child sxml:node?) node))) (if (null? more) (reverse res) (rpt (if (test-pred? (car more)) (cons (car more) res) res) (append ((sxml:child sxml:node?) (car more)) (cdr more))))))))
Descendant-or-self axis
(define (sxml:descendant-or-self test-pred?) (lambda (node) ; node or nodeset (if (nodeset? node) (map-union (sxml:descendant-or-self test-pred?) node) (let rpt ((res '()) (more (list node))) (if (null? more) (reverse res) (rpt (if (test-pred? (car more)) (cons (car more) res) res) (append ((sxml:child sxml:node?) (car more)) ; sxml:node? (cdr more))))))))
Following axis
(define (sxml:following test-pred?) (lambda (root-node) ; node or nodeset (lambda (node) ; node or nodeset (if (nodeset? node) (map-union ((sxml:following test-pred?) root-node) node) (let loop ((seq (if (nodeset? root-node) (list root-node) (list (list root-node))))) (cond ((null? seq) '()) ((null? (car seq)) (loop (cdr seq))) ((eq? (caar seq) node) (let rpt ((seq (cdr (apply append seq))) (res '())) (if (null? seq) res (rpt (cdr seq) (append res ((sxml:descendant-or-self test-pred?) (car seq))))))) ((and (sxml:element? (caar seq)) (memq node (sxml:attr-list (caar seq)))) (let rpt ((sq (cdr (apply append seq))) (res ((sxml:descendant test-pred?) (caar seq)))) (if (null? sq) res (rpt (cdr sq) (append res ((sxml:descendant-or-self test-pred?) (car sq))))))) (else (loop (cons ((sxml:child sxml:node?) (caar seq)) (cons (cdar seq) (cdr seq)))))))))))
Following-sibling axis
(define (sxml:following-sibling test-pred?) (lambda (root-node) ; node or nodeset (lambda (node) ; node or nodeset (if (nodeset? node) (map-union ((sxml:following-sibling test-pred?) root-node) node) (let loop ((seqs (if (nodeset? root-node) (list root-node) (list (list root-node))))) (if (null? seqs) '() (let rpt ((seq (car seqs))) (cond ((null? seq) (loop (append (map (sxml:child sxml:node?) (car seqs)) (cdr seqs)))) ((eq? (car seq) node) ((sxml:filter test-pred?) (cdr seq))) (else (rpt (cdr seq)))))))))))
Namespace axis
(define (sxml:namespace test-pred?) (lambda (node) ; node or nodeset ((sxml:filter test-pred?) (sxml:ns-list node))))
Preceding axis
(define (sxml:preceding test-pred?) (lambda (root-node) ; node or nodeset (lambda (node) ; node or nodeset (if (nodeset? node) (map-union ((sxml:preceding test-pred?) root-node) node) (let loop ((seq (if (nodeset? root-node) (list (reverse root-node)) (list (list root-node))))) (cond ((null? seq) '()) ((null? (car seq)) (loop (cdr seq))) ((or (eq? (caar seq) node) (not (null? ((sxml:attribute (lambda (n) (eq? n node))) (caar seq))))) (let rpt ((seq (cdr (apply append seq))) (res '())) (if (null? seq) res (rpt (cdr seq) (append res (reverse ((sxml:descendant-or-self test-pred?) (car seq)))))))) (else (loop (cons (reverse ((sxml:child sxml:node?) (caar seq))) (cons (cdar seq) (cdr seq)))))))))))
Preceding-sibling axis
(define (sxml:preceding-sibling test-pred?) (lambda (root-node) ; node or nodeset (lambda (node) ; node or nodeset (if(nodeset? node) (map-union ((sxml:preceding-sibling test-pred?) root-node) node) (let loop ((seqs (if (nodeset? root-node) (list root-node) (list (list root-node))))) (if (null? seqs) '() (let rpt ((seq (car seqs))) (cond ((null? seq) (loop (append (map (lambda (n) (reverse ((sxml:child sxml:node?) n))) (car seqs)) (cdr seqs)))) ((eq? (car seq) node) ((sxml:filter test-pred?) (cdr seq))) (else (rpt (cdr seq)))))))))))
Similar to R5RS 'list-tail' but returns the new list consisting of the first 'k' members of 'lst'
(define (sxml:list-head lst k) (if (or (null? lst) (zero? k)) '() (cons (car lst) (sxml:list-head (cdr lst) (- k 1)))))
Implements merge-sort of the given lst Returns the sorted list, the smallest member first less-than?-pred ::= (lambda (obj1 obj2) ...) less-than?-pred returns #t if obj1<obj2 with respect to the given ordering
(define (sxml:merge-sort less-than?-pred lst) (letrec ((merge-sorted-lists ; Merges 2 sorted lists into one sorted list (lambda (lst1 lst2) (cond ((null? lst1) lst2) ((null? lst2) lst1) ; both lists are non-null here ((less-than?-pred (car lst1) (car lst2)) (cons (car lst1) (merge-sorted-lists (cdr lst1) lst2))) (else (cons (car lst2) (merge-sorted-lists lst1 (cdr lst2)))))))) (if (or (null? lst) (null? (cdr lst))) ; already sorted lst (let ((middle (inexact->exact (round (/ (length lst) 2))))) (merge-sorted-lists (sxml:merge-sort less-than?-pred (sxml:list-head lst middle)) (sxml:merge-sort less-than?-pred (list-tail lst middle)))))))
Implementation of XPath equality comparison for 2 string-sets with merge-sort join algorithm
(define (sxml:merge-sort-join string-set1 string-set2 string-op) (let loop ((str-set1 (sxml:merge-sort string<? string-set1)) (str-set2 (sxml:merge-sort string<? string-set2))) (cond ((or (null? str-set1) (null? str-set2)) #f) ((string-op (car str-set1) (car str-set2)) ; comparison condition fulfilled for a pair of nodes #t) ((string<? (car str-set1) (car str-set2)) ; we can remove (car str-set1) from our further consideration (loop (cdr str-set1) str-set2)) (else ; vice versa (loop str-set1 (cdr str-set2))))))
Represents a list of chars as a branch in the string-tree The list of chars must be non-empty
(define (sxml:charlst->branch lst) (if (null? (cdr lst)) ; this is the last character in the lst `(,(car lst) #t) `(,(car lst) #f ,(sxml:charlst->branch (cdr lst)))))
Converts a string to a string-tree
(define (sxml:string->tree str) (let ((lst (string->list str))) (if (null? lst) ; an empty string is given '(*top* #t) `(*top* #f ,(sxml:charlst->branch lst)))))
Adds a new string to string-tree In a special case, tree257 may be #f. The function than creates a new tree, which contains just the representation for str
(define (sxml:add-string-to-tree str tree) (letrec ((add-lst-to-tree ; adds the list of chars to tree (lambda (lst tree) (if (null? lst) ; the lst is over (if (cadr tree) ; whether it is already in the tree tree (cons (car tree) (cons #t (cddr tree)))) (let ((curr-char (car lst))) (let iter-alist ((alist (cddr tree)) (res (list (cadr tree) (car tree)))) (cond ((null? alist) ; branch not in a tree (reverse (cons (sxml:charlst->branch lst) res))) ((char=? (caar alist) curr-char) ; entry found (if (null? (cdr alist)) ; nothing more in the alist (reverse (cons (add-lst-to-tree (cdr lst) (car alist)) res)) (append (reverse (cons (add-lst-to-tree (cdr lst) (car alist)) res)) (cdr alist)))) ((char>? (caar alist) curr-char) (if (null? (cdr alist)) ; nothing more in the alist (reverse (cons (car alist) (cons (sxml:charlst->branch lst) res))) (append (reverse (cons (sxml:charlst->branch lst) res)) alist))) (else (iter-alist (cdr alist) (cons (car alist) res)))))))))) (add-lst-to-tree (string->list str) tree)))
Whether a given string is presented in the string-tree
(define (sxml:string-in-tree? str tree) (let loop ((lst (string->list str)) (tree tree)) (cond ((null? lst) ; the string is over (cadr tree)) ((assv (car lst) (cddr tree)) => (lambda (new-tree) (loop (cdr lst) new-tree))) (else #f))))
XPath equality comparison for 2 string-sets bool-op - comparison function for 2 boolean values
(define (sxml:radix-sort-join string-set1 string-set2 bool-op) (if (null? string-set1) ; always #f #f (let ((tree (let iter-1 ((set1 (cdr string-set1)) (tree (sxml:string->tree (car string-set1)))) (if (null? set1) tree (iter-1 (cdr set1) (sxml:add-string-to-tree (car set1) tree)))))) (let iter-2 ((set2 string-set2)) (cond ((null? set2) ; equality not found #f) ((bool-op (sxml:string-in-tree? (car set2) tree) #t) #t) (else (iter-2 (cdr set2))))))))
A helper for XPath equality operations: = , != 'bool-op', 'number-op' and 'string-op' are comparison operations for a pair of booleans, numbers and strings respectively
(define (sxml:equality-cmp bool-op number-op string-op) (lambda (obj1 obj2) (cond ((and (not (nodeset? obj1)) (not (nodeset? obj2))) ; neither object is a nodeset (cond ((boolean? obj1) (bool-op obj1 (sxml:boolean obj2))) ((boolean? obj2) (bool-op (sxml:boolean obj1) obj2)) ((number? obj1) (number-op obj1 (sxml:number obj2))) ((number? obj2) (number-op (sxml:number obj1) obj2)) (else ; both objects are strings (string-op obj1 obj2)))) ((and (nodeset? obj1) (nodeset? obj2)) ; both objects are nodesets (let ((lng1 (length obj1)) (lng2 (length obj2))) (cond ((and (< lng1 100000) (< lng2 100000)) ((if ; either nodeset is a short one (or (<= lng1 2) (<= lng2 2)) sxml:nested-loop-join sxml:merge-sort-join) (map sxml:string-value obj1) (map sxml:string-value obj2) string-op)) ((< lng1 lng2) (sxml:radix-sort-join (map sxml:string-value obj1) (map sxml:string-value obj2) bool-op)) (else ; lng2 < lng1 (sxml:radix-sort-join (map sxml:string-value obj2) (map sxml:string-value obj1) bool-op))))) (else ; one of the objects is a nodeset, another is not (call-with-values (lambda () ; Equality operations are commutative (if (nodeset? obj1) (values obj1 obj2) (values obj2 obj1))) (lambda (nset elem) (cond ((boolean? elem) (bool-op elem (sxml:boolean nset))) ((number? elem) (let loop ((nset (map (lambda (node) (sxml:number (sxml:string-value node))) nset))) (cond ((null? nset) #f) ((number-op elem (car nset)) #t) (else (loop (cdr nset)))))) ((string? elem) (let loop ((nset (map sxml:string-value nset))) (cond ((null? nset) #f) ((string-op elem (car nset)) #t) (else (loop (cdr nset)))))) (else ; unknown datatype (cerr "Unknown datatype: " elem nl) #f))))))))
(define sxml:equal? (sxml:equality-cmp eq? = string=?))
(define sxml:not-equal? (sxml:equality-cmp (lambda (bool1 bool2) (not (eq? bool1 bool2))) (lambda (num1 num2) (not (= num1 num2))) (lambda (str1 str2) (not (string=? str1 str2)))))
Relational operation ( < , > , <= , >= ) for two XPath objects op is comparison procedure: < , > , <= or >=
(define (sxml:relational-cmp op) (lambda (obj1 obj2) (cond ((not (or (nodeset? obj1) (nodeset? obj2))) ; neither obj is a nodeset (op (sxml:number obj1) (sxml:number obj2))) ((boolean? obj1) ; 'obj1' is a boolean, 'obj2' is a nodeset (op (sxml:number obj1) (sxml:number (sxml:boolean obj2)))) ((boolean? obj2) ; 'obj1' is a nodeset, 'obj2' is a boolean (op (sxml:number (sxml:boolean obj1)) (sxml:number obj2))) ((or (null? obj1) (null? obj2)) ; one of the objects is an empty nodeset #f) (else ; at least one object is a nodeset (op (cond ((nodeset? obj1) ; 'obj1' is a (non-empty) nodeset (let ((nset1 (map (lambda (node) (sxml:number (sxml:string-value node))) obj1))) (let first ((num1 (car nset1)) (nset1 (cdr nset1))) (cond ((null? nset1) num1) ((op num1 (car nset1)) (first num1 (cdr nset1))) (else (first (car nset1) (cdr nset1))))))) ((string? obj1) (sxml:number obj1)) (else ; 'obj1' is a number obj1)) (cond ((nodeset? obj2) ; 'obj2' is a (non-empty) nodeset (let ((nset2 (map (lambda (node) (sxml:number (sxml:string-value node))) obj2))) (let second ((num2 (car nset2)) (nset2 (cdr nset2))) (cond ((null? nset2) num2) ((op num2 (car nset2)) (second (car nset2) (cdr nset2))) (else (second num2 (cdr nset2))))))) ((string? obj2) (sxml:number obj2)) (else ; 'obj2' is a number obj2)))))))


Shu and Osher's Shocktube Test |
Shu, C and Osher, S., "Efficient Implementation of Essentially Non-Oscillatory Shock-Capturing Schemes, II", J. Computational Physics, 83, 32-78 (1989). The test is Example 8.
This test is a hydrodynamic shocktube where the left and the right states are given as follows. Left: (ρ=3.857143; Vx= 2.629369, P = 10.33333) Right: (ρ=1 + 0.2 sin(5 π x); Vx=0; P=1). Essentially it is a Mach=3 shock interacting with a sine wave in density.
This test shows the difficulty of capturing both small-scale smooth flow, and shocks.
Results for the density at time=0.47 computed with Athena using the third-order Roe solver on an array of 800 cells (solid line) and 200 cells (squares) with a Courant number of 0.8 and γ = 1.4. Note that the plot is normalized to a spatial extent of [-1,1] as opposed to the [-4,4] shown in the reference. By comparing to Fig. 14c in the text, it is possible to see the significant improvement in performance per zone at low resolution. At a resolution of 200 cells, all of the short-wavelength extrema are captured, albeit with a lower amplitude than the 800 cell calculation. The velocity and pressure profiles do not contain as much interesting structure and are not shown.
|
|