FEM: typo fixes

This commit is contained in:
luz.paz
2018-04-14 08:43:36 -04:00
committed by wmayer
parent 983f2472a8
commit ba9dba4b26
13 changed files with 26 additions and 26 deletions

View File

@@ -994,7 +994,7 @@ Py::Dict FemMeshPy::getNodes(void) const
//Py::Tuple tup(count);
Py::Dict dict;
// get the actuall transform of the FemMesh
// get the actual transform of the FemMesh
Base::Matrix4D Mtrx = getFemMeshPtr()->getTransform();
SMDS_NodeIteratorPtr aNodeIter = getFemMeshPtr()->getSMesh()->GetMeshDS()->nodesIterator();

View File

@@ -451,7 +451,7 @@ void FemVTKTools::exportVTKMesh(const FemMesh* mesh, vtkSmartPointer<vtkUnstruct
while (aNodeIter->more()) {
const SMDS_MeshNode* node = aNodeIter->next(); // why float, not double?
double coords[3] = {double(node->X()*scale), double(node->Y()*scale), double(node->Z()*scale)};
points->InsertPoint(node->GetID()-1, coords); // memory is allocated by VTK points size = max node id, points will be insterted in SMESH point gaps too
points->InsertPoint(node->GetID()-1, coords); // memory is allocated by VTK points size = max node id, points will be inserted in SMESH point gaps too
}
grid->SetPoints(points);
// nodes debugging
@@ -482,7 +482,7 @@ void FemVTKTools::writeVTKMesh(const char* filename, const FemMesh* mesh)
vtkSmartPointer<vtkUnstructuredGrid> grid = vtkSmartPointer<vtkUnstructuredGrid>::New();
exportVTKMesh(mesh, grid);
//vtkSmartPointer<vtkDataSet> dataset = vtkDataSet::SafeDownCast(grid);
Base::Console().Message("Start: writeing mesh data ======================\n");
Base::Console().Message("Start: writing mesh data ======================\n");
if(f.hasExtension("vtu")){
writeVTKFile<vtkXMLUnstructuredGridWriter>(filename, grid);
}

View File

@@ -98,7 +98,7 @@ static const char* TurbulenceSpecificationHelpTexts[] = {
"explicitly specific intensity k [SI unit] and dissipation rate epsilon [] / omega []",
"intensity (0.05 ~ 0.15) and characteristic length scale of max eddy [m]",
"intensity (0.05 ~ 0.15) and turbulent viscosity ratio",
"for fully devloped internal flow, Turbulence intensity (0-1.0) 0.05 typical", NULL};
"for fully developed internal flow, Turbulence intensity (0-1.0) 0.05 typical", NULL};
//static const char* ThermalBoundaryTypes[] = {"fixedValue","zeroGradient", "fixedGradient", "mixed", "heatFlux", "HTC","coupled", NULL};
static const char* ThermalBoundaryHelpTexts[] = {"fixed Temperature [K]", "no heat transfer on boundary", "fixed value gradient [K/m]",
@@ -848,7 +848,7 @@ bool TaskDlgFemConstraintFluidBoundary::accept()
} else {
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Direction = None", name.c_str());
}
//Reverse control is done at BoundaryType selection, this UI is hiden from user
//Reverse control is done at BoundaryType selection, this UI is hidden from user
//Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Reversed = %s", name.c_str(), boundary->getReverse() ? "True" : "False");
std::string scale = "1";

View File

@@ -83,7 +83,7 @@ private Q_SLOTS:
void onThermalBoundaryTypeChanged(void);
void onReferenceDeleted(void);
void onButtonDirection(const bool pressed = true);
void onCheckReverse(bool); // consider remove this slot as the UI is hiden
void onCheckReverse(bool); // consider removing this slot as the UI is hidden
protected:
virtual void changeEvent(QEvent *e);

View File

@@ -1120,7 +1120,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
insEdgeVec(EdgeMap, nIdx0, nIdx1);
insEdgeVec(EdgeMap, nIdx1, nIdx2);
insEdgeVec(EdgeMap, nIdx2, nIdx0);
// rember the element and face number for that triangle
// remember the element and face number for that triangle
vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0);
break; }
default: assert(0);
@@ -1146,7 +1146,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
// add the two edge segments for that triangle
insEdgeVec(EdgeMap, nIdx0, nIdx1);
insEdgeVec(EdgeMap, nIdx1, nIdx2);
// rember the element and face number for that triangle
// remember the element and face number for that triangle
vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0);
// create triangle number 2 ----------------------------------------------
indices[index++] = nIdx2;
@@ -1313,7 +1313,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
// add the two edge segments for that triangle
insEdgeVec(EdgeMap, nIdx5, nIdx0);
insEdgeVec(EdgeMap, nIdx0, nIdx1);
// rember the element and face number for that triangle
// remember the element and face number for that triangle
vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0);
// create triangle number 2 ----------------------------------------------
indices[index++] = nIdx1;
@@ -1451,7 +1451,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop,
// add the two edge segments for that triangle
insEdgeVec(EdgeMap, nIdx7, nIdx0);
insEdgeVec(EdgeMap, nIdx0, nIdx1);
// rember the element and face number for that triangle
// remember the element and face number for that triangle
vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0);
// create triangle number 2 ----------------------------------------------
indices[index++] = nIdx1;

View File

@@ -83,7 +83,7 @@ public:
void updateData(const App::Property*);
/** @name Selection handling
* This group of methodes do the selection handling.
* This group of methods do the selection handling.
* Here you can define how the selection for your ViewProvider
* works.
*/
@@ -97,7 +97,7 @@ public:
virtual std::vector<Base::Vector3d> getSelectionShape(const char* Element) const;
//@}
// interface methodes
// interface methods
void setHighlightNodes(const std::set<long>&);
void resetHighlightNodes(void);

View File

@@ -102,7 +102,7 @@ public:
virtual void OnChange(Base::Subject< int >& rCaller, int rcReason);
/** @name Selection handling
* This group of methodes do the selection handling.
* This group of methods do the selection handling.
* Here you can define how the selection for your ViewProvider
* works.
*/

View File

@@ -78,7 +78,7 @@ class _ViewProviderFemMeshGmsh:
gui_doc = FreeCADGui.getDocument(vobj.Object.Document)
if not gui_doc.getInEdit():
# may be go the other way around and just activate the analysis the user has doubleClicked on ?!
# not a fast one, we need to iterate over all member of all analysis to know to which analyis the object belongs too!!!
# not a fast one, we need to iterate over all member of all analysis to know to which analysis the object belongs too!!!
# first check if there is an analysis in the active document
found_an_analysis = False
for o in gui_doc.Document.Objects:
@@ -284,5 +284,5 @@ class _TaskPanelFemMeshGmsh:
# print('Mesh is not member of active analysis, means no group meshing')
self.analysis = None # no group meshing
else:
# print('No active analyis, means no group meshing')
# print('No active analysis, means no group meshing')
self.analysis = None # no group meshing

View File

@@ -478,7 +478,7 @@ class _TaskPanelFemResultShow:
self.mesh_obj.ViewObject.setNodeColorByScalars(node_numbers, zero_values)
def reject(self):
FreeCADGui.Control.closeDialog() # if the taks panell is called from Command obj is not in edit mode thus reset edit does not cleses the dialog, may be do not call but set in edit instead
FreeCADGui.Control.closeDialog() # if the tasks panel is called from Command obj is not in edit mode thus reset edit does not close the dialog, maybe don't call but set in edit instead
FreeCADGui.ActiveDocument.resetEdit()

View File

@@ -121,8 +121,8 @@ def read_z88_mesh(z88_mesh_input):
nodes_count = int(mesh_info[1])
elements_count = int(mesh_info[2])
kflag = int(mesh_info[4])
if kflag: # for non rotational elements ist --> kflag = 0 --> karthesian, kflag = 1 polar koordinates
FreeCAD.Console.PrintError("KFLAG = 1, Rotational koordinates not supported at the moment\n")
if kflag: # for non rotational elements ist --> kflag = 0 --> cartesian, kflag = 1 polar coordinates
FreeCAD.Console.PrintError("KFLAG = 1, Rotational coordinates not supported at the moment\n")
return {}
nodes_first_line = 2 # first line is mesh_info
nodes_last_line = nodes_count + 1
@@ -417,7 +417,7 @@ def get_z88_element_type(femmesh, femelement_table=None):
elif elem_length == 10:
return 16
else:
print('Tetra with neiter 4 nor 10 nodes')
print('Tetra with neither 4 nor 10 nodes')
elif femmesh.HexaCount == femmesh.VolumeCount:
if elem_length == 8:
return 1
@@ -445,7 +445,7 @@ def get_z88_element_type(femmesh, femelement_table=None):
elif elem_length == 8:
return 23
else:
print('Quad with neiter 4 nor 8 nodes')
print('Quad with neither 4 nor 8 nodes')
return 0
else:
print('no tria, no quad')

View File

@@ -205,7 +205,7 @@ def read_fenics_mesh_xml(xmlfilename):
val_dict[vkey] = it + length_counter # maintain distinct element numbers
len_val_dict = len(val_dict)
if len_val_dict > 0:
length_counter += len_val_dict + 1 # only if preceeding list is not empty
length_counter += len_val_dict + 1 # only if preceding list is not empty
# print('len: ', len_val_dict)
# print('lencounter: ', length_counter)
# inverse of the dict (dict[key] = val -> dict[val] = key)

View File

@@ -174,7 +174,7 @@ def get_copy_of_empty_femelement_table(femelement_table):
def get_bit_pattern_dict(femelement_table, femnodes_ele_table, node_set):
'''Now we are looking for nodes inside of the Faces = filling the bit_pattern_dict
{eleID : [lenEleNodes, binary_position]}
see forumpost for a ver good explanation whats really happening
see forum post for a very good explanation of what's really happening
http://forum.freecadweb.org/viewtopic.php?f=18&p=141133&sid=013c93f496a63872951d2ce521702ffa#p141108
The bit_pattern_dict holds later an integer (bit array) for each element, which gives us
the information we are searching for:
@@ -1029,7 +1029,7 @@ def get_ref_facenodes_areas(femnodes_mesh, face_table):
mesh_face_area = 0
for mf in face_table:
femmesh_facetype = len(face_table[mf])
# nodes in face_table need to be in the right node order for the following calcualtions
# nodes in face_table need to be in the right node order for the following calculations
if femmesh_facetype == 3: # 3 node femmesh face triangle
# corner_node_area = mesh_face_area / 3.0
# P3
@@ -1416,7 +1416,7 @@ def is_same_geometry(shape1, shape2):
# the vertexes and the CenterOfMass are compared
# it is a hack, but I do not know any better !
# check of Volume and Area before starting with the vertices could be added
# BoundBox is possible too, but is BB calcualtions robust?!
# BoundBox is possible too, but is BB calculations robust?!
# print(shape1)
# print(shape2)
same_Vertexes = 0

View File

@@ -710,7 +710,7 @@ class FemInputWriterCcx(FemInputWriter.FemInputWriter):
if self.analysis_type == 'static' or self.analysis_type == 'thermomech':
step += ', NLGEOM' # https://www.comsol.com/blogs/what-is-geometric-nonlinearity/
elif self.analysis_type == 'frequency':
FreeCAD.Console.PrintMessage('Analysis type frequency and geometrical nonlinear analyis are not allowed together, linear is used instead!\n')
FreeCAD.Console.PrintMessage('Analysis type frequency and geometrical nonlinear analysis are not allowed together, linear is used instead!\n')
if self.solver_obj.IterationsThermoMechMaximum:
if self.analysis_type == 'thermomech':
step += ', INC=' + str(self.solver_obj.IterationsThermoMechMaximum)
@@ -719,7 +719,7 @@ class FemInputWriterCcx(FemInputWriter.FemInputWriter):
# write step line
f.write(step + '\n')
# CONTROLS line
# all analyis types, ... really in frequency too?!?
# all analysis types, ... really in frequency too?!?
if self.solver_obj.IterationsControlParameterTimeUse:
f.write('*CONTROLS, PARAMETERS=TIME INCREMENTATION\n')
f.write(self.solver_obj.IterationsControlParameterIter + '\n')