On Fri, May 7, 2010 at 5:00 PM, John Peterson <[email protected] > wrote:
> On Fri, May 7, 2010 at 3:53 PM, Karen Lee <[email protected]> wrote: > > > >> Distinct, yes, but have you checked whether it is inverted? Assuming > >> this is a tet, it will be inverted (and thus have negative jacobians) > >> if you take one of the vertices and 'pull it through' the opposite > >> face. You say the solution came from a previous libmesh run, what > >> mesh format did you write in? > >> > >> > > It is a tet... I'm not sure how I check the Jacobian (using the standard > > shape function?). > > > > It seems strange to me that I would have to take one of the vertices and > > "move it through" the opposite face. I have literally a million elements > and > > I doubt I can do that for every element... Is there a way I can bypass > this > > and make it happy? > > Oh, I'm not saying you *should* move vertices, I was just trying to > explain how an element can become inverted by reading in nodes in the > wrong order. > > I see. Is there a way I can attach a function to be called by the system that does not involve computing the map? All I want is the gradient of a scalar field... > > > > I wrote in the gmv format, which I read in using the tetgen format (since > > I'm used to reading in tetgen...) Would this be the potential issue? > > I don't see how that's possible... the tetgen reader shouldn't work > with GMV files and vice-versa. > > Oh I'm saying that I manually changed the gmv file into the tetgen format and then have the program read in tetgen, since the original mesh was in tetgen... Now trying to directly read in the gmv file now... Didn't think of that before. Regarding my other question about wanting to get the gradients directly from the variable I solve for, it's a bit hard to navigate through the documentation to figure out the data structure (I tried). Can anyone provide me with a low-level way of getting the array of data associated with the variable I declared to be solved (which looks like just a string containing the name of the variable) and walking me through? For example, I couldn't find where those values are contained (in _variables?) All I need is the value equivalent to the data variable below: const std::vector<Number>& data = mesh_data.get_data(elem->get_node(i)); This is what I did for generating the gradient from a solution I read in from another solve. What is the variaable in the original solve that I can extract values from direclty? for ( ; el != end_el ; ++el) { const Elem* elem = *el; fe->reinit(elem); RealGradient E(0,0,0); for (unsigned int i = 0; i < dphi.size(); ++i) { const std::vector<Number>& data = mesh_data.get_data(elem->get_node(i)); E += dphi[i][0] * data[0]; } Thanks, Karen ------------------------------------------------------------------------------ _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
