pyNastran  0.5.0
pyNastran BDF Reader/Writer, OP2 Parser, and GUI
pyNastran::bdf::fieldWriter Namespace Reference

Functions

def is_same
 checks to see if 2 values are the same
def set_blank_if_default
 Used when setting the output data of a card to clear default values.
def set_default_if_blank
 used when initializing a card and the default value isnt set used on PBARL
def print_scientific_8
 Prints a value in 8-character scientific notation.
def print_float_8
 Prints a float in nastran 8-character width syntax using the highest precision possbile.
def print_field
 prints a single 8-character width field
def printCard
 Prints a nastran-style card with 8-character width fields.
def print_int_card
 All fields (other than the first field must be integers.
def main

Function Documentation

def pyNastran.bdf.fieldWriter.is_same (   value1,
  value2 
)

checks to see if 2 values are the same

Note:
this method is used by almost every card when printing

Definition at line 36 of file fieldWriter.py.

References set_blank_if_default(), and pyNastran::bdf::cards::aero.type.

Referenced by pyNastran.bdf.cards.baseCard.BaseCard.isSameFields().

def pyNastran.bdf.fieldWriter.set_blank_if_default (   value,
  default 
)

Used when setting the output data of a card to clear default values.

Parameters:
valuethe field value the may be set to None (blank) if value=default
defaultthe default value for the field
Note:
this method is used by almost every card when printing

Definition at line 59 of file fieldWriter.py.

References set_default_if_blank().

Referenced by pyNastran.bdf.cards.coordinateSystems.CORD1S.__init__(), pyNastran.bdf.cards.coordinateSystems.CORD2R.__init__(), pyNastran.bdf.cards.aero.SPLINE4.AEList(), pyNastran.bdf.cards.aero.SPLINE1.CAero(), pyNastran.bdf.cards.aero.SPLINE4.CAero(), pyNastran.bdf.cards.aero.SPLINE5.CAero(), pyNastran.bdf.cards.elements.shell.CTRIA6.Centroid(), pyNastran.bdf.cards.loads.staticLoads.PLOAD4.Cid(), pyNastran.bdf.cards.properties.properties.PLSOLID.crossReference(), pyNastran.bdf.cards.nodes.GRDSET.crossReference(), pyNastran.bdf.cards.nodes.GRID.crossReference(), pyNastran.bdf.cards.elements.mass.CONM1.crossReference(), pyNastran.bdf.cards.elements.bars.CBEAM3.crossReference(), pyNastran.bdf.cards.loads.staticLoads.PLOAD4.crossReference(), pyNastran.bdf.cards.aero.SPLINE2.crossReference(), pyNastran.bdf.cards.properties.shell.PCOMP.D(), pyNastran.bdf.cards.materials.MAT8.D(), pyNastran.bdf.cards.materials.MAT9.D(), pyNastran.bdf.cards.thermal.thermal.RADBC.Eid(), pyNastran.bdf.cards.loads.staticLoads.FORCE.F(), pyNastran.bdf.cards.elements.bars.CONROD.G(), pyNastran.bdf.cards.materials.MAT10.getBulkRhoC(), pyNastran.bdf.cards.materials.MAT1.getG_default(), pyNastran::bdf::cards::properties::shell.GlobalPlyID(), is_same(), pyNastran.bdf.cards.elements.shell.CTRIA3.Jacob(), pyNastran::bdf::cards::materials.K(), pyNastran.bdf.cards.elements.bars.CBAR.Lambda(), pyNastran.bdf.cards.elements.shell.QuadShell.MassMatrix(), pyNastran.bdf.cards.properties.bars.PTUBE.massMatrix(), pyNastran::bdf::cards::optimization.Pid(), pyNastran.bdf.cards.aero.CAERO2.Points(), pyNastran.bdf.cards.elements.rigid.RBAR.rawFields(), pyNastran.bdf.cards.materials.CREEP.rawFields(), pyNastran.bdf.cards.elements.rigid.RBAR1.rawFields(), pyNastran.bdf.cards.optimization.DLINK.rawFields(), pyNastran.bdf.cards.thermal.loads.QBDY3.rawFields(), pyNastran.bdf.cards.elements.mass.CMASS2.rawFields(), pyNastran.bdf.cards.optimization.DSCREEN.rawFields(), pyNastran.bdf.cards.thermal.thermal.CHBDYG.rawFields(), pyNastran.bdf.cards.nodes.GRDSET.rawFields(), pyNastran.bdf.cards.properties.properties.PSOLID.rawFields(), pyNastran.bdf.cards.nodes.GRIDB.rawFields(), pyNastran.bdf.cards.aero.AESURF.rawFields(), pyNastran.bdf.cards.elements.springs.CELAS2.rawFields(), pyNastran.bdf.cards.dynamic.TSTEPNL.rawFields(), pyNastran.bdf.cards.thermal.thermal.CHBDYP.rawFields(), pyNastran.bdf.cards.methods.EIGR.rawFields(), pyNastran.bdf.cards.properties.properties.PRAC2D.rawFields(), pyNastran.bdf.cards.optimization.DRESP2.rawFields(), pyNastran.bdf.cards.properties.properties.PRAC3D.rawFields(), pyNastran.bdf.cards.thermal.thermal.PCONV.rawFields(), pyNastran::bdf::cards::optimization.rawFields(), pyNastran.bdf.cards.loads.staticLoads.GRAV.rawFields(), pyNastran.bdf.cards.dynamic.NLPARM.rawFields(), pyNastran.bdf.cards.thermal.thermal.PCONVM.rawFields(), pyNastran.bdf.cards.elements.mass.CONM1.rawFields(), pyNastran.bdf.cards.methods.EIGRL.rawFields(), pyNastran.bdf.cards.loads.loads.TLOAD1.rawFields(), pyNastran.bdf.cards.materials.MAT2.rawFields(), pyNastran.bdf.cards.loads.loads.TLOAD2.rawFields(), pyNastran.bdf.cards.loads.loads.RFORCE.rawFields(), pyNastran.bdf.cards.properties.shell.PCOMP.rawFields(), pyNastran.bdf.cards.properties.bars.PROD.rawFields(), pyNastran::bdf::cards::materials.rawFields(), pyNastran::bdf::cards::properties::shell.rawFields(), pyNastran.bdf.cards.properties.bars.PTUBE.rawFields(), pyNastran.bdf.cards.materials.MAT8.rawFields(), pyNastran.bdf.cards.properties.bars.PBAR.rawFields(), pyNastran.bdf.cards.materials.MATHP.rawFields(), pyNastran.bdf.cards.loads.staticLoads.PLOAD4.rawFields(), pyNastran.bdf.cards.properties.bars.PBEAM.rawFields(), pyNastran.bdf.cards.properties.bars.PBEAML.rawFields(), pyNastran::bdf::cards::methods.rawMethod(), pyNastran.bdf.cards.properties.damper.PVISC.reprFields(), pyNastran.bdf.cards.optimization.DCONSTR.reprFields(), pyNastran.bdf.cards.properties.properties.PFAST.reprFields(), pyNastran.bdf.cards.optimization.DESVAR.reprFields(), pyNastran.bdf.cards.methods.EIGB.reprFields(), pyNastran.bdf.cards.properties.springs.PELAS.reprFields(), pyNastran.bdf.cards.elements.bush.CBUSH.reprFields(), pyNastran.bdf.cards.properties.properties.PGAP.reprFields(), pyNastran.bdf.cards.elements.bush.CBUSH1D.reprFields(), pyNastran.bdf.cards.optimization.DLINK.reprFields(), pyNastran.bdf.cards.optimization.DSCREEN.reprFields(), pyNastran.bdf.cards.thermal.thermal.CHBDYG.reprFields(), pyNastran.bdf.cards.aero.AESURF.reprFields(), pyNastran.bdf.cards.elements.springs.CELAS2.reprFields(), pyNastran.bdf.cards.materials.MAT1.reprFields(), pyNastran.bdf.cards.thermal.thermal.CHBDYP.reprFields(), pyNastran.bdf.cards.dynamic.TSTEPNL.reprFields(), pyNastran.bdf.cards.thermal.thermal.PCONV.reprFields(), pyNastran.bdf.cards.tables.TABRND1.reprFields(), pyNastran.bdf.cards.dynamic.NLPARM.reprFields(), pyNastran.bdf.cards.thermal.thermal.PCONVM.reprFields(), pyNastran.bdf.cards.materials.MAT2.reprFields(), pyNastran.bdf.cards.loads.loads.TLOAD2.reprFields(), pyNastran::bdf::cards::elements::mass.reprFields(), pyNastran.bdf.cards.materials.MAT8.reprFields(), pyNastran.bdf.cards.properties.bars.PBAR.reprFields(), pyNastran.bdf.cards.materials.MATHP.reprFields(), pyNastran.bdf.cards.properties.bars.PBEAM.reprFields(), pyNastran.bdf.cards.aero.CAERO1.SetPoints(), pyNastran.bdf.cards.elements.bars.CBEAM.Stiffness(), pyNastran.bdf.cards.thermal.thermal.CONV.TA(), pyNastran.bdf.cards.loads.loads.RLOAD1.Td(), pyNastran.bdf.cards.elements.shell.CTRIAR.Thickness(), pyNastran.bdf.cards.loads.loads.TLOAD1.Tid(), pyNastran.bdf.cards.loads.loads.RLOAD2.Tp(), pyNastran.bdf.cards.materials.MAT2.writeCalculix(), pyNastran.bdf.cards.properties.shell.PSHELL.writeCalculix(), pyNastran.bdf.cards.elements.rigid.RBE2.writeCodeAster(), pyNastran.bdf.cards.properties.bars.PBAR.writeCodeAster(), pyNastran.bdf.cards.properties.shell.PSHELL.writeCodeAster(), and pyNastran.bdf.cards.properties.bars.PBARL.writeCodeAster().

def pyNastran.bdf.fieldWriter.set_default_if_blank (   value,
  default 
)

used when initializing a card and the default value isnt set used on PBARL

Definition at line 69 of file fieldWriter.py.

References print_scientific_8().

Referenced by pyNastran.bdf.cards.elements.shell.CTRIAX6.Mid(), and set_blank_if_default().

Prints a value in 8-character scientific notation.

This is a sub-method and shouldnt typically be called

See also:
print_float for a better method

Definition at line 80 of file fieldWriter.py.

References print_float_8().

Referenced by print_float_8(), and set_default_if_blank().

def pyNastran.bdf.fieldWriter.print_float_8 (   value,
  tol = 0. 
)

Prints a float in nastran 8-character width syntax using the highest precision possbile.

Todo:
bad for small values...positive or negative...
Warning:
hasnt really be tested for tolerancing

Definition at line 132 of file fieldWriter.py.

References print_field(), and print_scientific_8().

Referenced by print_scientific_8().

def pyNastran.bdf.fieldWriter.print_field (   value,
  tol = 0. 
)

prints a single 8-character width field

Parameters:
valuethe value to print
tolthe abs(tol) to consider value=0 (default=0.)
Return values:
fieldan 8-character (tested) string

Definition at line 285 of file fieldWriter.py.

References printCard().

Referenced by main(), print_float_8(), and printCard().

def pyNastran.bdf.fieldWriter.printCard (   fields,
  tol = 0. 
)

Prints a nastran-style card with 8-character width fields.

Parameters:
fieldsall the fields in the BDF card (no blanks)
tolthe abs(tol) to consider value=0 (default=0.)
Note:
A small field format follows the 8-8-8-8-8-8-8-8 = 80 format where the first 8 is the card name or blank (continuation). The last 8-character field indicates an optional continuation, but because it's a left-justified unneccessary field, printCard doesnt use it.

Definition at line 325 of file fieldWriter.py.

References print_field(), and print_int_card().

Referenced by pyNastran.converters.cart3d.cart3d_reader.Cart3DAsciiReader.exportToNastran(), pyNastran.converters.cart3d.cart3d_reader.Cart3DAsciiReader.getValue(), print_field(), and pyNastran.bdf.bdfInterface.bdf_writeMesh.WriteMesh.write_thermal().

def pyNastran.bdf.fieldWriter.print_int_card (   fields,
  tol = 0. 
)

All fields (other than the first field must be integers.

This is used to speed up SET cards. Prints a nastran-style card with 8-character width fields.

Warning:
Blanks are not allowed!

Definition at line 364 of file fieldWriter.py.

References main().

Referenced by printCard(), and pyNastran.bdf.cards.sets.Set.reprFields().

Definition at line 387 of file fieldWriter.py.

References print_field().

Referenced by print_int_card().

 All Classes Namespaces Files Functions Variables