Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
28% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
8
Posts with Downvotes
3
Downvoting Members
8
3 Commented Posts
0 Endorsements
Ranked #3K

59 Posted Topics

Member Avatar for ztdep

Dear friends: I downloaded the C++ Mathematical Expression Library from the web, and i uploaded it in the attachment. It consists of only one head file. But the compiling process is very slow under opensuse 42.3 with gcc. Could you please give me some advices for that. Regards.

Member Avatar for Gribouillis
0
350
Member Avatar for ztdep

Dear friends: I want to install the Non-Uniform Rational B-Splines (NURBS) curves and surface packate NURBS++ in opensuse linux 13.1. The official web site of NURBS++ is http://libnurbs.sourceforge.net/old/documentation.shtml. and the packate is written based on the c++ template technique. The latest of the package is 3.0.11(2002), the help manual show …

Member Avatar for JasonHippy
0
396
Member Avatar for ztdep

I have a Points class and a Segment class as follows: class Points { double x; double y; int Index=-1; } class Segment { Points Orig; Points End; Segment(const Points& a, const Points& b){Orig=a;End=b} void ChangeGlobalIndex() { do something to change the index of two end points. } } int …

Member Avatar for rubberman
0
129
Member Avatar for ztdep

Dear friends: Do we have a link to find all of my posts started or participated . Regards.

Member Avatar for Dani
0
303
Member Avatar for ztdep

Dear friends: ` The gcc version used in my opensue 42.1 is 4.8, i installed a gcc 6 from the opensuse package download center by "oneclickinstall".` The installation process was sucessful, but the gcc in my system is still 4.8. So how to resolve this problem. Regards

Member Avatar for rubberman
0
191
Member Avatar for ztdep

Dear friends: I need to use a data structure which can start the first index of an array from a nagtive value. I have searched the MTL library, and bltiz lib, but it seems that they doesn't support this kind of vecotr. Could you please give me some suggestions. Regards

Member Avatar for tinstaafl
0
249
Member Avatar for GustavoWoltmann

If we have socket, they you need to take the battery out of laptop, so as to increase its happy time.

Member Avatar for ztdep
0
215
Member Avatar for Dave Sinkula
Member Avatar for shahidali6
11
10K
Member Avatar for ztdep

Dear friends: i define a function "funtion1", i put the declaration in the "funtion1.h" #ifndef FUNTION1_H_INCLUDED #define FUNTION1_H_INCLUDED #include <stdio.h> #include <stdlib.h> double funtion1(double ,double ); #endif // FUNTION1_H_INCLUDED and write the function body in the file "funtion1.c" The following is my main file, but when i compile it in …

Member Avatar for mike_2000_17
0
149
Member Avatar for ztdep

Dear friends: Could you please give me some information about the parallel performance of TBB on a multicores pc. what is the difference between the tbb and mpi. Regards

Member Avatar for rubberman
0
97
Member Avatar for dhruv_arora
Member Avatar for Ancient Dragon
0
3K
Member Avatar for ztdep

Dear friends: I compile my procedure with mpicc, it can give correct execute file. mpicc -o testprint testprint.c libptools_ppf.a But when i compile it with mpic++, it gives me some error about undefined reference. Could you please help me out. mpic++ -o testprint testprint.c libptools_ppf.a testprint.c:25:31: warning: deprecated conversion from …

Member Avatar for rubberman
0
399
Member Avatar for ztdep

Dear friends: I write a parallel program with the PETSc, it can compiled sucessfully with the following command. could you please help me to translate it into a cmake file. so i can further develop the code in kdevelop4.4. mpic++ main.cpp -o main -I/home/ztdep/Downloads/petsc-3.3-p6/include -I/home/ztdep/Downloads/petsc-3.3-p6/arch-linux2-cxx-opt/include -Wl,-rpath,/home/ztdep/Downloads/petsc-3.3-p6/arch-linux2-cxx-opt/lib -L/home/ztdep/Downloads/petsc-3.3-p6/arch-linux2-cxx-opt/lib -lpetsc -lX11 -Wl,-rpath,/home/ztdep/Downloads/petsc-3.3-p6/arch-linux2-cxx-opt/lib …

Member Avatar for MonsieurPointer
0
155
Member Avatar for ztdep

*Dear friends: I need a quick algorithm to find the common faces of polyhedrons meshes for the finite volume computation. Each plolyhedron is recorded with the indexes of its six vertices(hexahedron) or four vertices(tetrahedron). Each polyhedron has only one common face with its neighboring polyhdrons. The common face can be …

Member Avatar for ztdep
0
177
Member Avatar for ztdep

#ifndef TINYVEC_HPP #define TINYVEC_HPP #include <iostream> #include<iomanip> using namespace std; template<typename T_numtype, int N_length> class TinyVector { protected: T_numtype data[N_length]; public: ////////////////////////////////////////////////////// // Constructor ////////////////////////////////////////////// TinyVector() { } ~TinyVector() { } TinyVector(const TinyVector<T_numtype,N_length>& x); TinyVector(const T_numtype & initValue); TinyVector(const T_numtype x[]); TinyVector(const T_numtype & x0, const T_numtype & x1); TinyVector(const …

Member Avatar for ztdep
0
233
Member Avatar for ztdep

Dear friends: I am trying to convert a double to string format using the std::to_string function, but it gives me the following error message. i do not understand why the functgion does not support the double format. i use the vs2010. > error C2668: 'std::to_string' : ambiguous call to overloaded …

Member Avatar for tinstaafl
0
971
Member Avatar for ztdep

typedef double (*sizefn_t) (double *); sizefn_t sizefn = userSizeFace; Dear friends: Could you pleaset tell me what is the meaning of the code, what does sizefn_t represent. what is the meaning typedef.

Member Avatar for deceptikon
0
117
Member Avatar for ztdep

Dear friends: I download a c packge for my computation work. there is a function " aft2boundar(int *, double *)" in it. i write a "main.cpp" with vs2010, when i compile, it gives me the following error unresolved external symbol "int __cdecl aft2dboundary(int *, double*) but i have include the …

Member Avatar for ztdep
0
155
Member Avatar for ztdep

#include <iostream> #include<iomanip> using namespace std; #pragma warning(disable: 4800) #include "mpirxx.h" #pragma warning(default: 4800) int main (int argc, char *argv[]) { mpf_class sum(0.000000000000000000000000000000000000000000000000000000000000000,200); mpf_class con(0.0000001000000000000000000000000000000000000000000000000000000000,200); for(int i=0;i<10;i++) { sum=sum+con; cout <<scientific<<setprecision(50)<<sum<<" "<<endl; } the out put: 9.99999999999999954748111825886258685613938723690808e-08 1.99999999999999990949622365177251737122787744738162e-07 2.99999999999999986424433547765877605684181617107242e-07 3.99999999999999981899244730354503474245575489476323e-07 4.99999999999999977374055912943129342806969361845404e-07 5.99999999999999972848867095531755211368363234214485e-07 6.99999999999999968323678278120381079929757106583565e-07 7.99999999999999963798489460709006948491150978952646e-07 8.99999999999999959273300643297632817052544851321727e-07 9.99999999999999954748111825886258685613938723690808e-07 9.999999999999999547481118258862586856139387236908078193664551e-07 Dear friends: I …

0
63
Member Avatar for ztdep

Dear friends: I check the value range of double and long double with vs2010, but it gives me the same value. could you please tell me how to use the long double format in vs2010. Regards

Member Avatar for Ancient Dragon
0
1K
Member Avatar for ztdep

Dear friends: i have a data file, the structure of the file is as follows: // data.txt $Elements 1 1 2.5 2 2 1.0 2.0 3 2 3.0 4.0 4 4 1.0 3.2 2.7 1.6 $EndElements In the data.txt, the fisrt column is the row number, and the second column …

Member Avatar for Branickiod
0
114
Member Avatar for swissknife007

what kind of equations? do you means linear algebra equations. reference to numerical recipe in c++

Member Avatar for Gribouillis
0
154
Member Avatar for ztdep

[CODE]#ifndef PARTICLE_H #define PARTICLE_H #include<vector> #include<iostream> using namespace std; class Particle { protected: public: Particle(); Particle(const int aDim); int dimension; vector<double> velocity; vector<double> position; vector<double> pBest; double pBestFitness; double fitness; bool valid; bool operator<(const Particle& aP2) const; ~Particle(void); }; #endif[/CODE] [CODE]#define SWARM_H #include"Particle.h" #include<vector> #include <Algorithm> #include<iostream> #include<stdexcept> using namespace …

Member Avatar for jaskij
0
97
Member Avatar for ztdep

Dear friends: I use the numerical libraray Seldon in the vs2010, and the libraray was written in C++ templates. but the VS 2010 can not show the class view in the Seldon, it does show the classes written by myself. could you please tell me how to set the vs2010 …

Member Avatar for thines01
0
69
Member Avatar for ztdep

Dear friends: I am using " Seldon c++ libary for linear algebra, http://seldon.sourceforge.net/" in my heat transfer code. the paltform is vs2010. I use the Seldon::Vector<double> in my class mesh to store the x y coordinates. I include the "Mesh.h" in my main.cpp.but it gave me some error about seldon …

Member Avatar for ztdep
0
272
Member Avatar for ztdep

Dear friends: I wrote my c++ console program with vs2008, and everthing is ok. But i open it with vs 2010, the consol window dispear after the code run.I can not see the output resutls in console window. could you please help me out. Regards

Member Avatar for Ancient Dragon
0
47
Member Avatar for ztdep

Dear friends: I need the vector computation as follows, for example: A=[1,2,3], B=[3,4,5] C=A+B; C=A-B;C=A+alphs*B; Could you please suggest me a C++ numerical library for this kind of computation. Regards

Member Avatar for ztdep
0
176
Member Avatar for ztdep

Dear friends: I download a software in *.bin mirror file. Could you please tell me how to mount it in opensuse linux. Regards.

Member Avatar for JasonHippy
0
243
Member Avatar for ztdep

Dear friends: I want to draw the sparse matrix sturucture to a file. The attachment shows an example. Could you please suggest me some methods to achieve this goal. Regards. Your Sincerely

Member Avatar for bkenwright
0
317
Member Avatar for ztdep

Dear friends: Could you please tell me how to set the tab in vs2008 so as to use multiple rows of tabs in vs2008. I could not fint it in setting. Regards

Member Avatar for jonsca
0
170
Member Avatar for aomas98
Member Avatar for Rashakil Fol
-2
176
Member Avatar for ztdep

[CODE]// // DiffusionTerm.h define the equation class to be solved. // #ifndef DIFFUSIONTERM_H #define DIFFUSIONTERM_H #include<vector> #include<iostream> using namespace std; class Equation; class DiffusionTerm { private: Equation* pEquation; public: DiffusionTerm(Equation* _pEquation ){pEquation=_pEquation; }; ~DiffusionTerm(){}; vector<double>Coe; vector<double>source; void evaluateCoeAndSource( ) { vector<double>& ThermalConductivity= pEquation->pMedia->getThermalConductivity() ; } }; // // Equation.h define …

Member Avatar for ztdep
0
257
Member Avatar for ztdep

[CODE]// // Media.h define the class cell // #ifndef MEDIA_H #define MEDIA_H #include<vector> #include<string> using namespace std; class Media { private: // media name string name; // the density vector vector<double> density; // the capacity vector vector<double> cp; // the thermal conductivity vector vector<double> thermalConductivity; // the viscorsity vector vector<double> …

Member Avatar for mike_2000_17
0
8K
Member Avatar for reallyslick

please past the curl.h, i just met this problem yesterday. and my problem is something like circular referencing.

Member Avatar for ztdep
0
814
Member Avatar for ztdep

Dear friends: I have the following two classes.[CODE]#ifndef EQUATION_H #define EQUATION_H #include <stdlib.h> #include <map> class Mesh; class Equation { public: Equation(); virtual ~Equation(){}; void associateMesh(Mesh * _pMesh){ pMesh = _pMesh;}; virtual void addsItsVariables4PostProcessing(map<string,const Variable*> & variablesMap)=0; protected: string name; const Mesh* pMesh; }; #endif [/CODE] Before the class Equation, …

Member Avatar for ztdep
0
285
Member Avatar for ztdep

[CODE]// // Equation.h define the equation class to be solved. // #ifndef EQUATION_H #define EQUATION_H #include "Mesh.h" #include"Variable.h" #include"Media.h" #include"Simulation.h" #include <string> #include<vector> #include <assert.h> #include <iostream> using namespace std; class Equation { protected: // the equation name it should be the same with the variaible name string name; // …

Member Avatar for mrnutty
0
154
Member Avatar for xxlt3xx

I think use the vector is better. [CODE] vector<int> neg; vector<int> posEven; vecotor<int> posOdd; if (input number<0) poseven.push_back(number); else if( number>0 && is_Even(number) ) posEven.pub_back(number); [/CODE]

Member Avatar for xxlt3xx
0
172
Member Avatar for ztdep

Dear friends: I use the find algorithm in STL to find a term in the vector<string>, but the find only return the iterator, how to return the index number of the term. Regards

Member Avatar for Insensus
0
68
Member Avatar for Mona Ali
Member Avatar for ztdep

Dear friends: I run my C++ programm in opensuse linux, after it sucessfully run, the system give me the following feedback.Could you please tell me what wrong with my program. [CODE]*** glibc detected *** ./flowingheat: double free or corruption (!prev): 0x00000000007e28b0 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x733b6)[0x7f9b6dc2c3b6] /lib64/libc.so.6(cfree+0x6c)[0x7f9b6dc312dc] ./flowingheat[0x411cde] ./flowingheat[0x40e9fe] ./flowingheat[0x40af3b] …

Member Avatar for Caligulaminus
0
141
Member Avatar for ztdep

Dear friends: I have a txt file to read. I only need the number of ELEMENTS and the ENTITIY NAME. which function should i use to read in these two values. Regards [CODE]GROUP: 2 ELEMENTS: 4 NODES: 2 GEOMETRY: 0 TYPE: 0 ENTITY NAME: WALL_LEFT 33 16 10 34 20 …

Member Avatar for mrar85
0
95
Member Avatar for ztdep

Dear friends: I get different resutls when copy my code from windows to linux system. the string comparion " if( keyword==Key[0] ) " is true in window system, but it is false in linux system. I am really confused about this.I copy the same source code and the same input …

Member Avatar for mrnutty
0
241
Member Avatar for ztdep

Dear friends: I want to use the code block under open suse 11.4 system. But i do not know how to install it. I downloaded severay binary packages in the code block websiet, but none of them can work. Could sombody help me and give me a link about the …

Member Avatar for mike_2000_17
0
82
Member Avatar for ztdep

[CODE] void findFacesInMesh() { multimap<indexPair, int> mapface; multimap<indexPair, int> ::iterator it, it2,it3; pair<multimap<indexPair, int> ::iterator,multimap<indexPair, int> ::iterator> rangeit; int ip1, ip2; for(int k=0; k!=cells.size(); k++) { for(int i=0; i< ( cells[k].getNbPoints() ); i++) { if(i== (cells[k].getNbPoints()-1) ){ ip1=cells[k].getListPointsIndex(i) ; ip2=cells[k].getListPointsIndex(0);} else {ip1=cells[k].getListPointsIndex(i); ip2=cells[k].getListPointsIndex(i+1); } mapface.insert( multimap<indexPair, int> ::value_type( indexPair(ip1,ip2), k) …

Member Avatar for ztdep
0
128
Member Avatar for ztdep

[CODE] class cellPair { public: vector<int> pair; int size; cellPair(const int& a) { pair.push_back(a); size=static_cast<int>( pair.size() ); } }; int main() { map<int, cellPair> aMap; aMap[1]=cellPair(3); aMap[1]=cellPair(2); } I think the aMap.second.size should ==2, but it still have 1 value, the second value did not push back to the pair. …

Member Avatar for alwaysLearning0
0
128
Member Avatar for ztdep

I am using VS 2008 to creat a windows program, but ican not found the Message button. Could you please help me

Member Avatar for sergent
-2
98
Member Avatar for ztdep

[CODE]// // CoordMatrix.h define the matrix stored in a coordinate format // #ifndef COORDMATRIX_H #define COORDMATRIX_H #include<vector> #include <assert.h> using namespace std; class CoordMatrix { private: // val strore the values in matrix; vector<double> val; // row is row index of value; vector<int> row; // col is colume index of …

Member Avatar for vijayan121
0
189
Member Avatar for ztdep

Dear friends: I am working on a C++ computational geometry code, and i want to make sure whether two points are the same by comparing their x y and z coordinates. The coordinates of the points are in the double formate. since the pc can not represents the double number …

Member Avatar for ztdep
0
1K
Member Avatar for tux4life

[QUOTE=William Hemsworth;969671]A bit of an overkill don't you think? Also, your function can't handle negative numbers, mine can :D [CODE=C]string itos(int a) { if ( a == 0 ) return "0"; int sign = (a < 0 ? a = -a, 1 : 0); string result = sign ? "-" …

Member Avatar for ztdep
0
1K
Member Avatar for ztdep

i write a point class, when i compile , vs2008 give me the warning about" not all control parth return a value" could you please tell how to avoid that? [CODE] double& operator [](int i) //[] which can used as the left value { if(i==0) return x; else if(i==1) return …

Member Avatar for ztdep
0
590

The End.