[Kratos] Write element results in gid
Víctor B
victorbzs en yahoo.es
Jue Jun 11 20:11:04 CEST 2015
Thanks Pablo, it works!
El Jueves 11 de junio de 2015 19:38, Pablo Becker <pbecker en cimne.upc.edu> escribió:
Hello Victor.First you must add the printing function to your elementÂ
  //TO PRINT ELEMENTAL VARIABLES (ONLY ONE GAUSS POINT PER ELEMENT)  void FluidPhasePFEM22D::GetValueOnIntegrationPoints(const Variable<double>& rVariable,      std::vector<double>& rValues,      const ProcessInfo& rCurrentProcessInfo) { if (rVariable == VISCOSITY) { // Set output vector (for a single integration point) rValues.resize(1, false); rValues[0]=this->GetValue(VISCOSITY); } else if (rVariable == TAU) { // Set output vector (for a single integration point) rValues.resize(1, false); rValues[0]=this->GetValue(TAU); } else // Default behaviour (returns elemental data) { rValues.resize(1, false); } }
and then, from python, the command is :
gid_io.PrintOnGaussPoints(TAU,model_part,time)
Hope that helps,
Pablo
On 11 June 2015 at 18:14, VÃctor B <victorbzs en yahoo.es> wrote:
Hi everyone,
How I could write in the gid output from kratos variables by element?. I mean variables from the element database... I've tried with writeElementalResults but it doesn't work (I found a document from the internet with that method:Â writeElementalResults)
Thanks in advanced
Best
_______________________________________________
Kratos mailing list
Kratos en listas.cimne.upc.edu
http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/kratos
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: http://listas.cimne.upc.edu/pipermail/kratos/attachments/20150611/665af6d5/attachment.htm
Más información sobre la lista de distribución Kratos