FEM: typos

This commit is contained in:
luz.paz
2018-01-23 04:04:58 -05:00
committed by Bernd Hahnebach
parent 6fa2ae54f9
commit ece3e8e3de
8 changed files with 29 additions and 26 deletions

View File

@@ -1334,7 +1334,7 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group
ElementsMap elementsMapFac; // empty faces map used for elemParam = 1 and elementsMapVol is not empty
if ((elemParam == 0) || (elemParam == 1 && elementsMapVol.empty())) {
// for ememParam = 1 we only fill the elementsMapFac if the elmentsMapVol is empty
// we gone fill the elementsMapFac with all faces
// we're going to fill the elementsMapFac with all faces
SMDS_FaceIteratorPtr aFaceIter = myMesh->GetMeshDS()->facesIterator();
while (aFaceIter->more()) {
const SMDS_MeshFace* aFace = aFaceIter->next();
@@ -1351,7 +1351,7 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group
}
}
if (elemParam == 2) {
// we gone fill the elementsMapFac with the facesOnly
// we're going to fill the elementsMapFac with the facesOnly
std::set<int> facesOnly = getFacesOnly();
for (std::set<int>::iterator itfa = facesOnly.begin(); itfa != facesOnly.end(); ++itfa) {
std::pair<int, std::vector<int> > apair;
@@ -1372,7 +1372,7 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group
ElementsMap elementsMapEdg; // empty edges map used for elemParam == 1 and either elementMapVol or elementsMapFac are not empty
if ((elemParam == 0) || (elemParam == 1 && elementsMapVol.empty() && elementsMapFac.empty())) {
// for ememParam = 1 we only fill the elementsMapEdg if the elmentsMapVol and elmentsMapFac are empty
// we gone fill the elementsMapEdg with all edges
// we're going to fill the elementsMapEdg with all edges
SMDS_EdgeIteratorPtr aEdgeIter = myMesh->GetMeshDS()->edgesIterator();
while (aEdgeIter->more()) {
const SMDS_MeshEdge* aEdge = aEdgeIter->next();
@@ -1389,7 +1389,7 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group
}
}
if (elemParam == 2) {
// we gone fill the elementsMapEdg with the edgesOnly
// we're going to fill the elementsMapEdg with the edgesOnly
std::set<int> edgesOnly = getEdgesOnly();
for (std::set<int>::iterator ited = edgesOnly.begin(); ited != edgesOnly.end(); ++ited) {
std::pair<int, std::vector<int> > apair;

View File

@@ -32,7 +32,7 @@ class _FemElementRotation1D:
"The FemElementRotation1D object"
def __init__(self, obj):
obj.addProperty("App::PropertyAngle", "Rotation", "BeamRotation", "set the rotation of beam elements")
obj.addProperty("App::PropertyAngle", "Rotation", "BeamRotation", "Set the rotation of beam elements")
obj.addProperty("App::PropertyLinkSubList", "References", "BeamRotation", "List of beam rotation shapes")
obj.Proxy = self
self.Type = "Fem::FemElementRotation1D"

View File

@@ -431,7 +431,8 @@ class _CommandFemMeshGmshFromShape(CommandManager):
self.is_active = 'with_part_feature'
def Activated(self):
# a mesh could be made with and without an analysis, we gone check not for an analysis in command manager module
# a mesh could be made with and without an analysis,
# we're going to check not for an analysis in command manager module
FreeCAD.ActiveDocument.openTransaction("Create FEM mesh by Gmsh")
mesh_obj_name = 'FEMMeshGmsh'
# mesh_obj_name = self.selobj.Name + "_Mesh" # if requested by some people add Preference for this
@@ -473,7 +474,8 @@ class _CommandFemMeshNetgenFromShape(CommandManager):
self.is_active = 'with_part_feature'
def Activated(self):
# a mesh could be made with and without an analysis, we gone check not for an analysis in command manager module
# a mesh could be made with and without an analysis,
# we're going to check not for an analysis in command manager module
FreeCAD.ActiveDocument.openTransaction("Create FEM mesh Netgen")
mesh_obj_name = 'FEMMeshNetgen'
# mesh_obj_name = sel[0].Name + "_Mesh" # if requested by some people add Preference for this

View File

@@ -69,8 +69,8 @@ def get_femnodes_by_references(femmesh, references):
# return references_femnodes # keeps duplicate nodes, keeps node order
# if nodes are used for nodesets, duplicats should be removed
return list(set(references_femnodes)) # removes duplicate nodes, sortes node order
# if nodes are used for nodesets, duplicates should be removed
return list(set(references_femnodes)) # removes duplicate nodes, sorts node order
def get_femnodes_by_refshape(femmesh, ref):
@@ -231,7 +231,7 @@ def get_femelements_by_femnodes_bin(femelement_table, femnodes_ele_table, node_l
'''for every femelement of femelement_table
if all nodes of the femelement are in node_list,
the femelement is added to the list which is returned
blind fast binary search, but workd for volumes only
blind fast binary search, but works for volumes only
'''
print('binary search: get_femelements_by_femnodes_bin')
vol_masks = {
@@ -336,7 +336,7 @@ def get_femelement_sets(femmesh, femelement_table, fem_objects, femnodes_ele_tab
has_remaining_femelements = None
for fem_object_i, fem_object in enumerate(fem_objects):
obj = fem_object['Object']
print("Constraint: " + obj.Name + " --> " + "We gone search in the mesh for the element ID's.")
print("Constraint: " + obj.Name + " --> " + "We're going to search in the mesh for the element ID's.")
fem_object['ShortName'] = get_elset_short_name(obj, fem_object_i) # unique short identifier
if obj.References:
ref_shape_femelements = []
@@ -365,7 +365,7 @@ def get_femelement_sets(femmesh, femelement_table, fem_objects, femnodes_ele_tab
def get_femelement_direction1D_set(femmesh, femelement_table, beamrotation_objects, theshape=None):
'''
get for each geometry edge direction, the normal and the element ids and write all into the beamrotation_objects
means no return value, we gone write into the beamrotation_objects dictionary
means no return value, we're going to write into the beamrotation_objects dictionary
FEMRotations1D is a list of dictionaries for every beamdirection of all edges
beamrot_obj['FEMRotations1D'] = [ {'ids' : [theids],
'direction' : direction,
@@ -374,8 +374,8 @@ def get_femelement_direction1D_set(femmesh, femelement_table, beamrotation_objec
]
'''
if len(beamrotation_objects) == 0:
# no beamrotation document object, all beams use standard rotation of 0 degree (angle), we need theshape (the shpae which was meshed)
# since ccx needs to split them in sets anyway we need to dake care of this too
# no beamrotation document object, all beams use standard rotation of 0 degree (angle), we need theshape (the shape which was meshed)
# since ccx needs to split them in sets anyway we need to take care of this too
rotations_ids = get_femelement_directions_theshape(femmesh, femelement_table, theshape)
# add normals for each direction
rotation_angle = 0
@@ -383,8 +383,8 @@ def get_femelement_direction1D_set(femmesh, femelement_table, beamrotation_objec
rot['normal'] = get_beam_normal(rot['direction'], rotation_angle)
beamrotation_objects.append({'FEMRotations1D': rotations_ids, 'ShortName': 'Rstd'}) # key 'Object' will be empty
elif len(beamrotation_objects) == 1:
# one beamrotaion document object with no references, all beams use rotation from this object, we need theshape (the shpae which was meshed)
# since ccx needs to split them in sets anyway we need to dake care of this too
# one beamrotation document object with no references, all beams use rotation from this object, we need theshape (the shape which was meshed)
# since ccx needs to split them in sets anyway we need to take care of this too
rotations_ids = get_femelement_directions_theshape(femmesh, femelement_table, theshape)
# add normals for each direction
rotation_angle = beamrotation_objects[0]['Object'].Rotation
@@ -398,7 +398,7 @@ def get_femelement_direction1D_set(femmesh, femelement_table, beamrotation_objec
# one beam rotation object, but not all edges are ref shapes
# more than one beam rotation object, but not all edges are in the ref shapes
# for the both cases above, all other edges get standard rotation.
# more than one beam roataion objects and on has no ref shapes, all edges no in an rotation object use this rotation
# more than one beam rotation objects and on has no ref shapes, all edges no in an rotation object use this rotation
# one edge is in more than one beam rotation object, error
# pre check, only one beam rotation with empty ref shapes is allowed
# we need theshape for multiple rotations too, because of the corner cases mentioned above

View File

@@ -256,10 +256,10 @@ class _Container(object):
def get_refshape_type(self, fem_doc_object):
# returns the reference shape type
# for force object:
# in GUI defined frc_obj all frc_obj have at leas one ref_shape and ref_shape have all the same shape type
# in GUI defined frc_obj all frc_obj have at least one ref_shape and ref_shape have all the same shape type
# for material object:
# in GUI defined material_obj could have no RefShape and RefShapes could be different type
# we gone need the RefShapes to be the same type inside one fem_doc_object
# we're going to need the RefShapes to be the same type inside one fem_doc_object
# TODO here: check if all RefShapes inside the object really have the same type
import femmesh.meshtools as FemMeshTools
if hasattr(fem_doc_object, 'References') and fem_doc_object.References:

View File

@@ -337,7 +337,7 @@ class FemInputWriterCcx(FemInputWriter.FemInputWriter):
f.write('** Element sets for materials and FEM element type (solid, shell, beam, fluid)\n')
f.write('** written by {} function\n'.format(sys._getframe().f_code.co_name))
# in any case if we have beams, we gone need the element ids for the rotation elsets
# in any case if we have beams, we're going to need the element ids for the rotation elsets
if self.beamsection_objects:
# we will need to split the beam even for one beamobj
# because no beam in z-direction can be used in ccx without a special adjustment
@@ -396,7 +396,8 @@ class FemInputWriterCcx(FemInputWriter.FemInputWriter):
elif len(self.fluidsection_objects) > 1:
self.get_ccx_elsets_multiple_mat_multiple_fluid()
# TODO: some elemetIDs are collected for 1D-Flow calculation, this should be a def somewhere else, preferable inside the get_ccx_elsets_... methods
# TODO: some elemetIDs are collected for 1D-Flow calculation,
# this should be a def somewhere else, preferable inside the get_ccx_elsets_... methods
for ccx_elset in self.ccx_elsets:
if ccx_elset['ccx_elset'] and not isinstance(ccx_elset['ccx_elset'], six.string_types): # use six to be sure to be Python 2.7 and 3.x compatible
if 'fluidsection_obj'in ccx_elset:

View File

@@ -254,10 +254,10 @@ class _Container(object):
def get_refshape_type(self, fem_doc_object):
# returns the reference shape type
# for force object:
# in GUI defined frc_obj all frc_obj have at leas one ref_shape and ref_shape have all the same shape type
# in GUI defined frc_obj all frc_obj have at least one ref_shape and ref_shape have all the same shape type
# for material object:
# in GUI defined material_obj could have no RefShape and RefShapes could be different type
# we gone need the RefShapes to be the same type inside one fem_doc_object
# we're going to need the RefShapes to be the same type inside one fem_doc_object
# TODO here: check if all RefShapes inside the object really have the same type
import femmesh.meshtools as FemMeshTools
if hasattr(fem_doc_object, 'References') and fem_doc_object.References:

View File

@@ -421,7 +421,7 @@ class FemToolsCcx(QtCore.QRunnable, QtCore.QObject):
message += "Beam sections and shell thicknesses in one analysis is not supported at the moment.\n"
if self.fluid_sections:
# this needs to be checked only once either here or in shell_thicknesses
message += "Beam sections and fluid Sections in one analysis is not supported at the moment.\n"
message += "Beam sections and fluid sections in one analysis is not supported at the moment.\n"
has_no_references = False
for b in self.beam_sections:
if len(b['Object'].References) == 0:
@@ -620,7 +620,7 @@ class FemToolsCcx(QtCore.QRunnable, QtCore.QObject):
self.ccx_binary_present = True
else:
raise Exception("FEM: wrong ccx binary") # since we raise an exception the try will fail and the exception later with the error popup will be raised
# TODO: I'm still able to break it. If user gives not a file but a path without a file or a file which is not a binary no excetion at all is raised.
# TODO: I'm still able to break it. If user doesn't give a file but a path without a file or a file which is not a binary no exception at all is raised.
except OSError as e:
FreeCAD.Console.PrintError(str(e))
if e.errno == 2:
@@ -785,7 +785,7 @@ class FemToolsCcx(QtCore.QRunnable, QtCore.QObject):
def get_refshape_type(fem_doc_object):
# returns the reference shape type
# for force object:
# in GUI defined frc_obj all frc_obj have at leas one ref_shape and ref_shape have all the same shape type
# in GUI defined frc_obj all frc_obj have at least one ref_shape and ref_shape have all the same shape type
# for material object:
# in GUI defined material_obj could have no RefShape and RefShapes could be different type
# we're going to need the RefShapes to be the same type inside one fem_doc_object