Skip to content
Snippets Groups Projects
Commit 7066700a authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

pp

parent 29255f9f
No related branches found
No related tags found
No related merge requests found
......@@ -139,7 +139,8 @@ class dofManager{
}
inline void assemble(MVertex *vR, int iCompR, int iFieldR,
MVertex *vC, int iCompC, int iFieldC,
const dataMat &value){
const dataMat &value)
{
assemble(vR->getNum(), Dof::createTypeWithTwoInts(iCompR, iFieldR),
vC->getNum(), Dof::createTypeWithTwoInts(iCompC, iFieldC),
value);
......@@ -157,7 +158,8 @@ class dofManager{
assemble(Dof(entR, typeR), value);
}
inline void assemble(MVertex *vR, int iCompR, int iFieldR,
const dataMat &value){
const dataMat &value)
{
assemble(vR->getNum(), Dof::createTypeWithTwoInts(iCompR, iFieldR), value);
}
int sizeOfR() const { return unknown.size(); }
......
......@@ -143,7 +143,8 @@ void elasticitySolver::solve()
it != nodalDisplacements.end(); ++it){
MVertex *v = pModel->getMeshVertexByTag(it->first.first);
pAssembler-> fixVertex(v , it->first.second, _tag, it->second);
printf("-- Fixing node %3d comp %1d to %8.5f\n", it->first.first, it->first.second, it->second);
printf("-- Fixing node %3d comp %1d to %8.5f\n",
it->first.first, it->first.second, it->second);
}
for (std::map<std::pair<int, int>, double>::iterator it = edgeDisplacements.begin();
......@@ -151,7 +152,8 @@ void elasticitySolver::solve()
elasticityTerm El(pModel, 1, 1, _tag);
El.dirichletNodalBC(it->first.first, 1, it->first.second, _tag,
gmshFunction<double>(it->second), *pAssembler);
printf("-- Fixing edge %3d comp %1d to %8.5f\n", it->first.first, it->first.second, it->second);
printf("-- Fixing edge %3d comp %1d to %8.5f\n",
it->first.first, it->first.second, it->second);
}
for (std::map<std::pair<int, int>, double>::iterator it = faceDisplacements.begin();
......@@ -159,7 +161,8 @@ void elasticitySolver::solve()
elasticityTerm El(pModel, 1, 1, _tag);
El.dirichletNodalBC(it->first.first, 2, it->first.second, _tag,
gmshFunction<double>(it->second), *pAssembler);
printf("-- Fixing face %3d comp %1d to %8.5f\n", it->first.first, it->first.second, it->second);
printf("-- Fixing face %3d comp %1d to %8.5f\n",
it->first.first, it->first.second, it->second);
}
// we number the nodes : when a node is numbered, it cannot be numbered
......@@ -189,7 +192,8 @@ void elasticitySolver::solve()
pAssembler-> assemble(ent[i]->mesh_vertices[0] , 0, _tag, f.x());
pAssembler-> assemble(ent[i]->mesh_vertices[0] , 1, _tag, f.y());
pAssembler-> assemble(ent[i]->mesh_vertices[0] , 2, _tag, f.z());
printf("-- Force on node %3d(%3d) : %8.5f %8.5f %8.5f\n", ent[i]->mesh_vertices[0]->getNum(), iVertex, f.x(), f.y(), f.z());
printf("-- Force on node %3d(%3d) : %8.5f %8.5f %8.5f\n",
ent[i]->mesh_vertices[0]->getNum(), iVertex, f.x(), f.y(), f.z());
}
}
......
......@@ -54,8 +54,10 @@ class elasticitySolver{
void readInputFile(const std::string &meshFileName);
// PView *buildDisplacementView(const std::string &postFileName);
// PView *buildVonMisesView(const std::string &postFileName);
// std::pair<PView *, PView*> buildErrorEstimateView (const std::string &errorFileName, double, int);
// std::pair<PView *, PView*> buildErrorEstimateView (const std::string &errorFileName, const gmshElasticityData &ref, double, int);
// std::pair<PView *, PView*> buildErrorEstimateView
// (const std::string &errorFileName, double, int);
// std::pair<PView *, PView*> buildErrorEstimateView
// (const std::string &errorFileName, const gmshElasticityData &ref, double, int);
};
#endif
......
......@@ -20,11 +20,9 @@ class laplaceTerm : public helmholtzTerm<scalar> {
_k = ONE;
}
laplaceTerm(GModel *gm, int iFieldR, gmshFunction<scalar> *k) :
helmholtzTerm<scalar>(gm, iFieldR, iFieldR, k, 0), ONE(0)
{}
helmholtzTerm<scalar>(gm, iFieldR, iFieldR, k, 0), ONE(0) {}
laplaceTerm(GModel *gm, int iFieldR, int iFieldC, gmshFunction<scalar> *k) :
helmholtzTerm<scalar>(gm, iFieldR, iFieldC, k, 0), ONE(0)
{}
helmholtzTerm<scalar>(gm, iFieldR, iFieldC, k, 0), ONE(0) {}
virtual ~laplaceTerm()
{
if(ONE) delete ONE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment