Skip to content
Snippets Groups Projects
Commit 1d093942 authored by Éric Béchet's avatar Éric Béchet
Browse files

No commit message

No commit message
parent a28f614b
No related branches found
No related tags found
No related merge requests found
......@@ -618,7 +618,7 @@ if(ENABLE_PETSC)
endforeach(VAR)
endif (PETSC_PACKAGES_INCLUDES)
# find libraries
set(PETSC_LIBS_REQUIRED petscksp petscdm petscmat petscvec petsc)
set(PETSC_LIBS_REQUIRED petsc)
find_all_libraries(PETSC_LIBS PETSC_LIBS_REQUIRED
${ENV_PETSC_DIR}/${ENV_PETSC_ARCH}/lib "")
# petsc 3.1 create only one library : libpetsc
......
......@@ -221,7 +221,7 @@ class PViewData {
virtual bool writeTXT(std::string fileName);
virtual bool writePOS(std::string fileName, bool binary=false, bool parsed=true,
bool append=false);
virtual bool writeMSH(std::string fileName, bool binary=false);
virtual bool writeMSH(std::string fileName, bool binary=false, bool savemesh=true);
virtual bool writeMED(std::string fileName);
static void registerBindings(binding *b);
......
......@@ -239,7 +239,7 @@ class PViewDataGModel : public PViewData {
bool readMSH(std::string fileName, int fileIndex, FILE *fp, bool binary,
bool swap, int step, double time, int partition,
int numComp, int numNodes);
bool writeMSH(std::string fileName, bool binary=false);
bool writeMSH(std::string fileName, bool binary=false, bool savemesh=true);
bool readMED(std::string fileName, int fileIndex);
bool writeMED(std::string fileName);
};
......
......@@ -118,7 +118,7 @@ bool PViewDataGModel::readMSH(std::string fileName, int fileIndex, FILE *fp,
return true;
}
bool PViewDataGModel::writeMSH(std::string fileName, bool binary)
bool PViewDataGModel::writeMSH(std::string fileName, bool binary, bool savemesh)
{
if(_steps.empty()) return true;
......@@ -129,7 +129,7 @@ bool PViewDataGModel::writeMSH(std::string fileName, bool binary)
GModel *model = _steps[0]->getModel();
bool writeNodesAndElements = false;
bool writeNodesAndElements = savemesh;
FILE *fp;
if(writeNodesAndElements){
if(!model->writeMSH(fileName, 2.0, binary)) return false;
......
......@@ -106,7 +106,7 @@ bool PViewData::writePOS(std::string fileName, bool binary, bool parsed, bool ap
return false;
}
bool PViewData::writeMSH(std::string fileName, bool binary)
bool PViewData::writeMSH(std::string fileName, bool binary, bool savemesh)
{
Msg::Error("MSH export not implemented for this view type");
return false;
......
......@@ -110,7 +110,7 @@ class PViewDataList : public PViewData {
bool readPOS(FILE *fp, double version, bool binary);
bool writePOS(std::string fileName, bool binary=false, bool parsed=true,
bool append=false);
bool writeMSH(std::string fileName, bool binary=false);
virtual bool writeMSH(std::string fileName, bool binary=false, bool savemesh=true);
};
#endif
......@@ -544,7 +544,7 @@ static void writeElementsMSH(FILE *fp, int nbelm, std::vector<double> &list,
}
}
bool PViewDataList::writeMSH(std::string fileName, bool binary)
bool PViewDataList::writeMSH(std::string fileName, bool binary, bool savemesh)
{
if(_adaptive){
Msg::Warning("Writing adapted dataset (will only export current time step)");
......@@ -590,7 +590,6 @@ bool PViewDataList::writeMSH(std::string fileName, bool binary)
getNodeMSH(NbSY, SY, 5, 1, NbTimeStep, &nodes, &numelm);
getNodeMSH(NbVY, VY, 5, 3, NbTimeStep, &nodes, &numelm);
getNodeMSH(NbTY, TY, 5, 9, NbTimeStep, &nodes, &numelm);
fprintf(fp, "$MeshFormat\n2 0 8\n$EndMeshFormat\n");
fprintf(fp, "$Nodes\n");
fprintf(fp, "%d\n", (int)nodes.size());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment