Hi my prob statement is to create a new file or to append to the 1tst file the followign chages.
File 1: txt file.
portfolio No a b c d
abc 1 Any Any Any charString
cds 2 values values values charString
efd 3 can can can charString
fdg 4 come come come charString... (4 Replies)
Hi guys,
I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help.
I have 2 input files (example given below)
Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it... (5 Replies)
I have a file which has following contents:
localhost_IP_SIP_1233026552455.xml
localhost_IP_SIP_1233026552460.xml
localhost_IP_SIP_1233026552467.xml
localhost_IP_SIP_1233026552759.xml
localhost_IP_SIP_1233026552969.xml
localhost_IP_SIP_1233026552975.xml ... (2 Replies)
Hi all
I need to copy the entire contents of one file into an existing file at a specific location. I know the exact line number where I need to put it. It appears I would use either sed or awk to do this, but I have been unsuccessful so far:
File A
line 1
line 2
line 3
line 4
... (6 Replies)
Hi
Am having issue on appending time stamp
I know the exact file names in the directory like
a.dat
b.dat
c.dat
e.dat
f.dat
I want to read all these file names and append the timestamp to each files like
a.dat.20090604,b.dat.20090604 and move to the different directory.
... (3 Replies)
Hi Guys,
I need to read a file until I find a blank line. and in the next iteration I want to continue reading from the line I find a keyword.
For ex: my file looks like
PDS_JOB_ALIAS
CRITERIA_ITEM_TYPE
PDS_JOB_CRITERIA_ITEM
CRITERIA_ITEM_TYPE
First I want to read the file... (2 Replies)
Here is my dir structure:
/tmp/dave/myappend.txt
/tmp/dave/dir1/test.txt
/tmp/dave/dir2/test.txt
/tmp/dave/dir3/test.txt
/tmp/dave/dir4/test.txt
I want to append the contents of myappend.txt to the end of each file with the name "test.txt" in all dirs in /tmp/dave/
I have tried this:... (2 Replies)
So I'm stumped.
First... APOLOGIES... my work is offline in an office that has zero internet connectivity, as required by our client. If need be, I could print out my script attempts and retype them here. But on the off chance... here goes.
I have a text file (file_source) of terms, each line... (3 Replies)
Hi there,
i've got a file with this content
$ cat file1
Matt
Mar
The other file has the same number of lines with this content:
$ cat file2
20404=767294
23450=32427
is there a way with either using sed, awk or paste to insert the content of file1 before the "=" character? So... (3 Replies)
Discussion started by: nms
3 Replies
LEARN ABOUT DEBIAN
adapt
adapt(4rheolef) rheolef-6.1 adapt(4rheolef)NAME
adapt - mesh adaptation
SYNOPSYS
geo adapt (const field& phi);
geo adapt (const field& phi, const adapt_option_type& opts);
DESCRIPTION
The function adapt implements the mesh adaptation procedure,
based on the gmsh (isotropic) or bamg (anisotropic) mesh generators.
The bamg mesh generator is the default in two dimension.
For dimension one or three, gmsh is the only generator supported yet.
In the two dimensional case, the gmsh correspond to the opts.generator="gmsh".
The strategy based on a metric determined from the Hessian of
a scalar governing field, denoted as phi, and that is supplied by the user.
Let us denote by H=Hessian(phi) the Hessian tensor of the field phi.
Then, |H| denote the tensor that has the same eigenvector as H,
but with absolute value of its eigenvalues:
|H| = Q*diag(|lambda_i|)*Qt
The metric M is determined from |H|.
Recall that an isotropic metric is such that M(x)=hloc(x)^(-2)*Id
where hloc(x) is the element size field and Id is the
identity d*d matrix, and d=1,2,3 is the physical space dimension.
GMSH ISOTROPIC METRIC
max_(i=0..d-1)(|lambda_i(x)|)*Id
M(x) = -----------------------------------------
err*hcoef^2*(sup_y(phi(y))-inf_y(phi(y)))
Notice that the denominator involves a global (absolute) normalization
sup_y(phi(y))-inf_y(phi(y)) of the governing field phi
and the two parameters opts.err, the target error,
and opts.hcoef, a secondary normalization parameter (defaults to 1).
BAMG ANISOTROPIC METRIC
There are two approach for the normalization of the metric.
The first one involves a global (absolute) normalization:
|H(x))|
M(x) = -----------------------------------------
err*hcoef^2*(sup_y(phi(y))-inf_y(phi(y)))
The first one involves a local (relative) normalization:
|H(x))|
M(x) = -----------------------------------------
err*hcoef^2*(|phi(x)|, cutoff*max_y|phi(y)|)
Notice that the denominator involves a local value phi(x).
The parameter is provided by the optional variable opts.cutoff;
its default value is 1e-7.
The default strategy is the local normalization.
The global normalization can be enforced by setting
opts.additional="-AbsError".
When choosing global or local normalization ?
When the governing field phi is bounded,
i.e. when err*hcoef^2*(sup_y(phi(y))-inf_y(phi(y)))
will converge versus mesh refinement to a bounded value,
the global normalization defines a metric that is mesh-independent
and thus the adaptation loop will converge.
Otherwise, when phi presents singularities, with unbounded
values (such as corner singularity, i.e. presents peacks when represented
in elevation view), then the mesh adaptation procedure
is more difficult. The global normalization
divides by quantities that can be very large and the mesh adaptation
can diverges when focusing on the singularities.
In that case, the local normalization is preferable.
Moreover, the focus on singularities can also be controled
by setting opts.hmin not too small.
The local normalization has been choosen as the default since it is
more robust. When your field phi does not present singularities,
then you can swith to the global numbering that leads to a best
equirepartition of the error over the domain.
IMPLEMENTATION
struct adapt_option_type {
typedef std::vector<int>::size_type size_type;
std::string generator;
bool isotropic;
Float err;
Float errg;
Float hcoef;
Float hmin;
Float hmax;
Float ratio;
Float cutoff;
size_type n_vertices_max;
size_type n_smooth_metric;
bool splitpbedge;
Float thetaquad;
Float anisomax;
bool clean;
std::string additional;
bool double_precision;
Float anglecorner; // angle below which bamg considers 2 consecutive edge to be part of
// the same spline
adapt_option_type() :
generator(""),
isotropic(true), err(1e-2), errg(1e-1), hcoef(1), hmin(0.0001), hmax(0.3), ratio(0), cutoff(1e-7),
n_vertices_max(50000), n_smooth_metric(1),
splitpbedge(false), thetaquad(std::numeric_limits<Float>::max()),
anisomax(1e6), clean(false), additional("-RelError"), double_precision(false),
anglecorner(0)
{}
};
template <class T, class M>
geo_basic<T,M>
adapt (
const field_basic<T,M>& phi,
const adapt_option_type& options = adapt_option_type());
rheolef-6.1 rheolef-6.1 adapt(4rheolef)