Skip to content
Snippets Groups Projects
Commit db6eb903 authored by Jean-François Remacle's avatar Jean-François Remacle
Browse files

*** empty log message ***

parent 5843b775
No related branches found
No related tags found
No related merge requests found
......@@ -329,8 +329,8 @@ void GFaceCompound::parametrize() const
//Laplace parametrization
//-----------------
//parametrize(ITERU);
//parametrize(ITERV);
parametrize(ITERU);
parametrize(ITERV);
//Conformal map parametrization
//-----------------
......@@ -338,7 +338,7 @@ void GFaceCompound::parametrize() const
//Distance function
//-----------------
compute_distance();
//compute_distance();
//checkOrientation();
computeNormals();
......
......@@ -7,6 +7,7 @@ set(SRC
linearSystemCSR.cpp
linearSystemTAUCS.cpp
elasticityTerm.cpp
elasticitySolver.cpp
)
append_gmsh_src(Solver "${SRC}")
......@@ -31,7 +31,7 @@ namespace gsolver {
i1 = t % 10000;
i2 = t / 10000;
}
bool operator < ( const Dof & other){
bool operator < ( const Dof & other) const{
if (_entity < other._entity)return true;
if (_entity > other._entity)return false;
if (_type < other._type)return true;
......@@ -61,19 +61,19 @@ namespace gsolver {
std::map<Dof, dataVec> fixed, initial;
// numbering of unknown dof blocks
std::map<Dof, long int> unknown;
std::map<Dof, int> unknown;
// associatations
std::map<Dof, Dof> associatedWith;
// linearSystems
std::map<std::string, linearSystem<dataMat>* > _linearSystems;
std::map<const std::string, linearSystem<dataMat>* > _linearSystems;
linearSystem<dataMat>* _current;
private:
public:
dofManager(linearSystem<dataMat> *l) : _current(l){
_linearSystems.push_back(l);
_linearSystems["default"]= l;
}
inline void fixDof(long int ent, int type, const dataVec & value)
{
......@@ -110,9 +110,9 @@ namespace gsolver {
}
return dataVec(0.0);
}
inline dataVec getVertexValue(MVertex *v, int iComp, int iField) const
inline dataVec getDofValue(MVertex *v, int iComp, int iField) const
{
getDofValue(v->getNum(), Dof::createTypeWithTwoInts(iComp,iField ));
return getDofValue(v->getNum(), Dof::createTypeWithTwoInts(iComp,iField ));
}
inline void assemble(const Dof &R, const Dof &C, const dataMat &value)
......@@ -139,9 +139,9 @@ namespace gsolver {
assemble (Dof(entR,typeR),Dof(entC,typeC), value);
}
inline void assembleVertex(MVertex *vR, int iCompR, int iFieldR,
MVertex *vC, int iCompC, int iFieldC,
const dataMat &value){
inline void assemble(MVertex *vR, int iCompR, int iFieldR,
MVertex *vC, int iCompC, int iFieldC,
const dataMat &value){
assemble (vR->getNum(), Dof::createTypeWithTwoInts(iCompR,iFieldR),
vC->getNum(), Dof::createTypeWithTwoInts(iCompC,iFieldC),
value);
......@@ -157,8 +157,13 @@ namespace gsolver {
}
inline void assemble(int entR, int typeR, const dataMat &value)
{
assemble(Dof(entR,typeR));
assemble(Dof(entR,typeR),value);
}
inline void assemble(MVertex *vR, int iCompR, int iFieldR,
const dataMat &value){
assemble (vR->getNum(), Dof::createTypeWithTwoInts(iCompR,iFieldR),
value);
}
int sizeOfR() const { return unknown.size(); }
int sizeOfF() const { return fixed.size(); }
void systemSolve(){
......
......@@ -32,7 +32,7 @@ namespace gsolver {
Dof::createTypeWithTwoInts(iCompR, _iField));
}
public:
elasticityTerm(GModel *gm, double E, double nu, int iField = 1) :
elasticityTerm(GModel *gm, double E, double nu, int iField) :
femTerm<double,double>(gm), _E(E), _nu(nu), _iField(iField){}
void setVector(const SVector3 &f) {_volumeForce = f;}
void elementMatrix(MElement *e, gmshMatrix<double> &m) const;
......
......@@ -86,7 +86,7 @@ namespace gsolver {
int dim,
int comp,
int field,
const gmshFunction<dataVec> &e,
const gmshFunction<dataVec> &fct,
dofManager<dataVec,dataMat> &dm)
{
std::map<int, std::vector<GEntity*> > groups[4];
......@@ -128,7 +128,7 @@ namespace gsolver {
gmshVector<dataVec> V (nbR);
elementVector (e, V);
// assembly
for (int j=0;j<nbR;j++)dm.assemble(getLocalDofR(e,j),V[j]);
for (int j=0;j<nbR;j++)dm.assemble(getLocalDofR(e,j),V(j));
}
}
}; // end of class definition
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment